I'm using PositionAttitudeTransform to add multiple instances of a geometry node. It appears that the rotation and translation are specified with separate methods, setAttitude() and setPosition() respectively. Is that correct?
Can it somehow be done with a single matrix like in homogeneous coordinates?
Thanks in advance,
Regards,
AP
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18629#18629
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
If you use a MatrixTransform you specify a matrix. I believe you can create the matrix you want (representing all 3 operations) using:
Code:
void makeTranslate( const Vec3f& );
void setRotate(const Quat& q);
void setTrans( const Vec3f& v );
Check the matrix include for the full list of functions. Then:
Code:
void setMatrix(const Matrix& mat)
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18635#18635
osg::Matrixd mat;
mat.set ( 1, 0, 0, 0
0, 1, 0, 20,
0, 0, 1, 0,
0, 0, 0, 1 );
Then I tried the following to get some rigid body rotation. What I'm seeing is almost like a rotation with a shear.
osg::Matrixd mat;
mat2.set ( 1, 1.57, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1 );
What am I doing wrong?
Thanks,
Regards,
Ash
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18641#18641
Regards,
Ash
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=18788#18788