Hello.
I'm new to OpenSG and have a question since i'm working on the whole day without success :). I hope this is the right place to ask such a question, if not, please forgive me. I have searched a lot for for this but haven't found anything helping so far.
For my project I have the following things:
- A OSG::Quaternion which represents an input device (something similar to a Razer hydra)
- A OSG::Line to calculate intersections
- A OSG::Line to calculate intersections
With the device I want to point onto things (something like a laser pointer) in my scene. Unfortunately, to calculate intersections OpenSG uses the OSG::Line class, so I need to translate my Quaternion into a Line. The position is no problem, but with the calculation from a rotation as a Quaternion to a direction as Vec3f I have problems.
To get my direction vector I use "device.getEulerAngleRad(ray_direction)".
However the angles don't seem to be right. When I move my device left, my line goes "up left" for example. Somehow the transformation doesn't work completly. What am i missing? Or is there maybe even a better way to calculate intersections with my pointing device?
Thank you.
Greetings,
Gekko
------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds
_______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users