How to draw the 3 axes with vsg? #714
-
I'm a new bee of vsg. and I know how to draw the 3 axes with osg hud and camera like the sceenshot, but what should I do with vsg? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Arrows and axis rendering like you show is something I've been considering as an addition to vsg::Builder. Right now Builder can created cones and cylinders which is what is needed in for the axis arrows so could be used to build up each part. To see how to use vsg::Builder have a look at the vsgbuilder examples. The HUD side could be implemented with with a separate View with the Camera's View and Projection matrices set up to do the HUD. The vsgcamera and vsgmultiviews examples illustrate how this can be done. For a hud you just want to clear the depth buffer. To sync the rotation of the axis you'll want to modify the HUD View's Camera View matrix so that the rotate component is the same as the main Camera's view matrix. |
Beta Was this translation helpful? Give feedback.
-
@robertosfield ,thank for your advice. |
Beta Was this translation helpful? Give feedback.
-
ok, let me try it. thanks a lot! once i finish the code , i will commit it as a sample. |
Beta Was this translation helpful? Give feedback.
Arrows and axis rendering like you show is something I've been considering as an addition to vsg::Builder.
Right now Builder can created cones and cylinders which is what is needed in for the axis arrows so could be used to build up each part. To see how to use vsg::Builder have a look at the vsgbuilder examples.
The HUD side could be implemented with with a separate View with the Camera's View and Projection matrices set up to do the HUD. The vsgcamera and vsgmultiviews examples illustrate how this can be done. For a hud you just want to clear the depth buffer.
To sync the rotation of the axis you'll want to modify the HUD View's Camera View matrix so that the rotate component is the sam…