Hi, How do I retrieve the body axis of the model? I'm thinking of retrieving 
the body axis of the model and use it to rotate the model by osg::Quat 
rotation(osg::Quat(yaw, body_axis_z)*osg::Quat(roll, 
body_axis_y)*osg::Quat(pitch, body_axis_x)); pat->setAttitude(rotation);instead 
of osg::Quat rotation(osg::Quat(yaw, osg::Vec3(0,0,1))*osg::Quat(roll, 
osg::Vec3(0,1,0))*osg::Quat(pitch, osg:Vec3(1,0,0))); 
pat->setAttitude(rotation); so that the aircraft will be rotated correctly. 
Thanks. Regards,Cg


From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 4 Jun 2008 18:04:43 
+0100Subject: Re: [osg-users] finding normal of models



HI
 
A loaded model/node  really does not in itself have a normal, its surfaces/tris 
etc that make up a model will have (or should have ) normal's. So sorry its not 
possible to retrieve a nodes normal's.
 
In all my years of being involved with vis-sim, you really have to know before 
hand how your models are orientated, scaled etc , typically your modelling 
specs should state what is north, what is up, what units are used etc, then 
these need to be enforced on and followed by the content creators. 
 
Personally I don't know a way of figuring out, in arbitary models what are 
north, up, right etc.. you have a chance with scale/units. you have to know the 
orientation details of the models 
 
Sorry not much help really
 


__________________________________________________________Gordon Tomlinson 
Email   : [EMAIL PROTECTED] : www.vis-sim.com www.gordontomlinson.com 
__________________________________________________________"Self defence is not 
a function of learning tricks but is a function of how quickly and intensely 
one can arouse one's instinct for survival" -Master Tambo Tetsura 
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of CGSent: 04 June 
2008 17:27To: OpenSceneGraph UsersSubject: [osg-users] finding normal of models
Hi, Is it possible to retrieve the Normal of a loaded node (i.e. an aircraft in 
openflt format)? I need to find out the normal to compute the forward and right 
axis to construct my rotation matrix to rotate the aircraft correctly in every 
tick. Right now, when I roll my aircraft to 90 degrees follow by a 90 degrees 
pitch, the aircraft instead of banking to the right, it rolls 90 degrees to the 
right and pitches up 90 degrees (as the rotation axis is unchanged). I'm using 
positiontransformattitude node for the setting of Attitude. Thanks. Regards,Cg

Always-on security tools provide safer ways to connect and share anywhere. Find 
out more. Windows Live 
_________________________________________________________________
Manage multiple email accounts with Windows Live Mail effortlessly.
http://www.get.live.com/wl/all
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to