From Brede Johansen, "The previous submission didn't handle Objects with transforms. The

attached file corrects this.

I also removed the multitexture macro for the Object record.  Only
Face and Mesh records are valid targets."
This commit is contained in:
Robert Osfield
2006-09-06 09:46:32 +00:00
parent 5868bab4d9
commit 5a08afeb07

View File

@@ -784,8 +784,20 @@ public:
META_setID(_object)
META_setComment(_object)
META_setMatrix(_object)
META_setMultitexture(_object)
virtual void setMatrix(osg::Matrix& matrix)
{
if (_object.valid())
insertMatrixTransform(*_object,matrix);
else
{
_object = new osg::MatrixTransform(matrix);
_object->setDataVariance(osg::Object::STATIC);
if (_parent.valid())
_parent->addChild(*_object);
}
}
virtual void addChild(osg::Node& child)
{