Re: [osg-users] How to set DOFTransform?
On 09/19/2011 02:55 PM, Paul Martz wrote: Now I want to create an osgSim::DOFTransform ( http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00182.html ) to describe this DOF. Unfortunately I do not exactly what I have to do now. The DOFTransform neither has a setPosition() nor a setAxis() method. Do I have to use setPutMatrix()? If yes: How do I create this matrix? Is it just M = RotationY(90) * Translation(DOFPosition)? Do I also need to set the Inverse PutMatrix? The short answer is yes, you need to use the Put and Inverse Put matrices. The put matrix should translate the origin of the DOF to the local origin and align the axes correctly. The inverse put should do the opposite, that is, it should literally be the inverse of the put matrix. For the complete explanation, see the OpenFlight spec that Paul mentioned. --"J" ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to set DOFTransform?
On 9/19/2011 10:46 AM, Martin Haffner wrote: Hi, I have a wheel model (an .obj) that needs an DOF in the middle of the wheel (to make the wheel spin). I know the position of the DOF and I know the 3 axis of the DOF (x axis goes up, y goes in the depth and z to the left. So basically just the normal osg coordinate system rotated around y by 90 Degrees.). Now I want to create an osgSim::DOFTransform ( http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00182.html ) to describe this DOF. Unfortunately I do not exactly what I have to do now. The DOFTransform neither has a setPosition() nor a setAxis() method. Do I have to use setPutMatrix()? If yes: How do I create this matrix? Is it just M = RotationY(90) * Translation(DOFPosition)? Do I also need to set the Inverse PutMatrix? I don't know what you need to do in your specific case, but perhaps the OpenFlight spec would describe the operation of the DOFTransform a bit, as DOFTransform was designed to support OpenFlight DOF records: http://www.presagis.com/products_services/standards/openflight/more/openflight_specifications/ -Paul ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to set DOFTransform?
Hi, I have a wheel model (an .obj) that needs an DOF in the middle of the wheel (to make the wheel spin). I know the position of the DOF and I know the 3 axis of the DOF (x axis goes up, y goes in the depth and z to the left. So basically just the normal osg coordinate system rotated around y by 90 Degrees.). Now I want to create an osgSim::DOFTransform ( http://www.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a00182.html ) to describe this DOF. Unfortunately I do not exactly what I have to do now. The DOFTransform neither has a setPosition() nor a setAxis() method. Do I have to use setPutMatrix()? If yes: How do I create this matrix? Is it just M = RotationY(90) * Translation(DOFPosition)? Do I also need to set the Inverse PutMatrix? Thanks for any help! Cheers, Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=42866#42866 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org