Rotating a 3D coordinate system object #1300
Replies: 1 comment 2 replies
-
I haven't closely stepped through your code but on a quick scan you are misusing vsg::Geode. vsg::Geode is a hang up from early days in the OSG project when you couldn't add drawables/geometry to group nodes. "Modern" OSG allows you to add drawables to osg::Group so it's the osg::Geode is no longer required, As part of these changes Geode all got the ability to add children beyond drawables but that only happened to keep the API glue backwards compatibility. What you should be doing in your code is just using a osg::Group where you are specifying a osg::Geode. I don't know if this will fix the problem but it will take you one step closer to having cleaner code. As a general comment I'd just use a single transform above the axis arrows and just create the arrows pointing along the appropriate axis. If you are new to the OSG so just learning this stuff for the first time then please take a look at VulkanSceneGraph, it's the successor to the OSG and a far more modern and future-proofed API. While the OSG, like OpenGL, is now just in maintenance mode. |
Beta Was this translation helpful? Give feedback.
-
I have created a coordinate system object similar to the one shown in the image. I want to rotate it along all the 3 axes by entering the respective angle entered via a windows forms textbox. I am not able to do this no matter how much I try. Please help. Below is my incomplete and incorrect code. It would be great if someone can correct this and provide guidance.
Beta Was this translation helpful? Give feedback.
All reactions