Renamed osg::Matric::makeIdent() to osg::Matrix::makeIdentity() to make

it consistent with the rest of the osg::Matrix naming.  Updated OSG
distribution to account for new name.

Added support for the STATIC/DYNAMIC osg::Transform::Type to the .osg
ASCII reader/writer plugin and the flt reader plugin.

Removed the non cost version of osg::Transform::getMatrix() as this could
by pass the dirty mechinism.
This commit is contained in:
Robert Osfield
2001-12-15 16:56:39 +00:00
parent def6234d8c
commit cb8025d913
13 changed files with 85 additions and 60 deletions

View File

@@ -39,6 +39,22 @@ bool Transform_readLocalData(Object& obj, Input& fr)
Transform& transform = static_cast<Transform&>(obj);
if (fr[0].matchWord("Type"))
{
if (fr[1].matchWord("DYNAMIC"))
{
transform.setType(osg::Transform::DYNAMIC);
fr +=2 ;
}
else if (fr[1].matchWord("STATIC"))
{
transform.setType(osg::Transform::STATIC);
fr +=2 ;
}
}
static Matrix s_matrix;
if (Matrix* tmpMatrix = static_cast<Matrix*>(fr.readObjectOfType(s_matrix)))
@@ -59,6 +75,12 @@ bool Transform_writeLocalData(const Object& obj, Output& fw)
{
const Transform& transform = static_cast<const Transform&>(obj);
switch(transform.getType())
{
case(osg::Transform::STATIC): fw.indent() << "Type STATIC" << std::endl;
default: fw.indent() << "Type DYNAMIC" << std::endl;
}
fw.writeObject(transform.getMatrix());
return true;