Hello Ami,
On 28/3/09 8:50 AM, ami guru wrote:
virtual void operator()(osg::Node *node,
osg::NodeVisitor *nv)
{
osg::Matrix mR;
mR.makeRotate(m_angle, osg::Vec3(0.0f,0.0f,1.0f));
mtLeft->setMatrix(mR);
...
osg::Vec3f teapotTransVec = osg::Vec3f(5,2,-12);
osg::Vec3f teapotScaleVec = osg::Vec3f(20.1f,20.1f,20.1f);
teapotTransMat.makeTranslate(teapotTransVec);
teapotScaleMat.makeScale(teapotScaleVec);
teapotPos->setMatrix(teapotTransMat * teapotScaleMat);
You're originally including a scaling transform in the Matrix.
The Callback operator replaces this with only a rotation matrix i.e. the scaling part is
lost hence the object looks smaller.
Cheers,
/ulrich
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org