Hello,
I am new in this group (and to openSceneGraph as well) and this is my first
E-Mail. I am experimenting a bit for own to brush up my C++ and 3D Graphics
skills. I am using Ecplise, mingw, Qt4 and OpenSceneGraph - it's really a
powerfull toolkit! -.
I am just coding around HUDtext and EventHandling.
I would like to display the local (mouse) and the corresponding model
coordinates as HUD text in my scene.
I have written a new GUIActionAdapter which should give back the coordinate to
the Qt GUI which updated then the HUD text.
bool QtOsgPickHandler::handle(const osgGA::GUIEventAdapter& ea,
osgGA::GUIActionAdapter& aa)
{
switch (ea.getEventType())
{
case (osgGA::GUIEventAdapter::MOVE):
{
float localX = ea.getX(); // the mouse position, Ok
float localY = ea.getY();
float modelX = ?
float modelY = ?
float modelZ = ?
emit updateHudText(modelX, modelY, modelZ); // Qt specific signal to update
the HUD text
...
What is the way to transform the mouse position to model coordinates?
Many thanks for a feedback.
Karl ...
__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen
Massenmails.
http://mail.yahoo.com _______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org