[osg-users] About how to update the camera

2011-10-15 Thread ramy panda
Hi,

Now I have faced a problem is that when i import a model into my own 
application, the model is not show at the center of the viewport, only after 
interacted with the model using translate function i can see the model in the 
view. I'm wondering that how to update the camera to make sure the model is 
showed in the center of the viewport after i import the model into the scene. 
Please be detail as i am a new user. Thanks very very very much.

Thank you!

Cheers,
ramy

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Qt, Manipulator keyEvent, Seeking for Help in an Emergency

2011-08-05 Thread ramy panda
Hi,

In my codes, i rewrite keyPressEvent function like below:

 void AdapterWidget::keyPressEvent( QKeyEvent* event )
 {
 _gw-getEventQueue()-keyPress( (osgGA::GUIEventAdapter::KeySymbol) 
 *(event-text().toAscii().data() ) );
 }


In my osg codes, i write like this:

 bool ManipulatorEventHandler::handle(const osgGA::GUIEventAdapter ea, 
 osgGA::GUIActionAdapter aa,
 osg::Object*, osg::NodeVisitor*)
 {
 
 bool alt = (ea.getModKeyMask()  
 (osgGA::GUIEventAdapter::MODKEY_LEFT_ALT|osgGA::GUIEventAdapter::MODKEY_RIGHT_ALT))
  != 0;
 if (alt) return false;
 
 if (ea.getEventType() == osgGA::GUIEventAdapter::KEYDOWN)
 {
 switch (ea.getKey())
 {
 case 'r': resetTransform(); break;
 }
 }
 
 return true;
 }

but when i press alt key there is no reponse in my application. I need a help 
in an emergency and i'm waiting answer online. Thanks very much.

Thank you!

Cheers,
ramy

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Qt + OSG , ManipulatorEventHandler Keyevent

2011-08-04 Thread ramy panda
Hi,

I embeded osg in Qt in my program.Now I implement a class 
ManipulatorEventHndler to interact with the object in the view. But in my codes 
below

 bool ManipulatorEventHandler::handle(const osgGA::GUIEventAdapter ea, 
 osgGA::GUIActionAdapter aa,
 osg::Object*, osg::NodeVisitor*)
 {
 
 bool alt = (ea.getModKeyMask()  
 (osgGA::GUIEventAdapter::MODKEY_LEFT_ALT|osgGA::GUIEventAdapter::MODKEY_RIGHT_ALT))
  != 0;
 if (alt) return false;
 if (ea.getEventType() == osgGA::GUIEventAdapter::KEYDOWN)
 {
 switch (ea.getKey())
 {
   case 'd': deleteSelectedNode(); break;
 }
 }

when i press alt key there is no reponse in my program,but i press 'd' key it 
works. I don't know why. As i use Qt, is there something wrong when i implement 
the ManipulatorEventHandler?Hope someone can help to solve this problem. Thank 
you very very much.

Thank you!

Cheers,
ramy

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] TabBoxDragger Scale Problem

2011-08-03 Thread ramy panda
Hi,

Now in my codes, i use TabBoxDragger to interact with the model in the scene. 
But when i scale the model, the x, y ,z three directions scale factor is 
diffient. I want to scale like glScale(factor, factor, factor) in openGL 
which means i want scale model with a same factor in the scene. When i interact 
with the dragger the model can scale in the same size in three directions. I 
don't know how to solve this problem. Holp someone knows. Thanks very very much.

Thank you!

Cheers,
ramy

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] cross axes

2011-08-01 Thread ramy panda
Dear Sir,
I still don't know how to settle the scale problem. Would you please help 
me with that. Thank you very much.
 

Jonathan Richard wrote:
 Hi Gianni
 
 Thank you for your reply. It's ok I finally got it working.
 
 Jonathan
 
 On Wed, Aug 11, 2010 at 9:34 AM, Gianni Ambrosio  wrote:
 
  Sorry Jonathan for the delay. Unfortunately I don't remember exactly which 
  modifications I did but if you need I can give you my actual piece of code.
  
  Gianni
  
  --
  Read this topic online here:
  http://forum.openscenegraph.org/viewtopic.php?p=30691#30691
  
  
  
  
  
  ___
  osg-users mailing list
  
  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 ___
 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=41755#41755





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] how to judge the model renderering progress is over in my codes

2011-07-31 Thread ramy panda
Dear Jsaon,
thank you very very much. I had used another method to implement my needs. But 
i also read the example you recommanded. Thank you very much for you kindness 
answer.

Thank you!

Cheers,
ramy

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] how to judge the model renderering progress is over in my codes

2011-07-27 Thread ramy panda
Hi,

Now i have a problem in my codes that i want to get a large number of thumnail 
picture of the models. But i don't know when the model renderer progress  is 
over and the model is show in the OSG viewport, because until the model 
renderer progress is over and model is show in the osg viewport in my codes i 
capture the thumnail picture of the model. Is there any one can help me with 
this problem. I'm in a hurry. Thank you very much!

Thank you!

Cheers,
ramy

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org