[osg-users] Can i use MatrixTransform to transform a HUD node?

Chen Gao gaochen010 at sina.com
Tue Jan 8 04:49:07 PST 2019


Yeah,Terry. #1 is the exactly the right way to use HUD. I've been trying these days to use MT transformation method to operate the child HUD node but it will never be able to control it because i found that I've used the following line of code:

    camera->setReferenceFrame(osg::Transform::ABSOLUTE_RF); 

         When I looked up the detailed explanation of this code on the net,I realized that MT will never be working on it.If we want to control its position, we only have to and only need to use the camera node itself.That will be Ok.

               I haven't tried to delete this line code and then use MT to control the camera node, but I guess that will result in a bad effect and I haven't seen anyone on the net to use HUD this way. So |-) just don't care about it.     


Terry Welsh wrote:
> I have only done #1, where the HUD node is derived from osg::Camera. I
> set the view matrix and projection matrix to provide a simple box in
> which to render all HUD elements. The individual elements can be
> positioned within that box with MatrixTransforms.
> 
> It's not very hard to get this working. Try prototyping it with one
> osgText::Text element and one simple box or sphere under a
> MatrixTransform.
> 
> - Terry
> _______________________________________________
> osg-users mailing list
> 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
>  ------------------
> Post generated by Mail2Forum


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=75428#75428







More information about the osg-users mailing list