Have added a #define USE_DEPRECATED_API to include/osg/Export, and

various
osg header and source files to optional compile in deprecated parts of
the
OSG API.

Have renamed osg::Transparency osg::BlendFunc to bring it in line with
the
rest of the OSG's StateAttribute classes which are named after their
OpenGL counterparts.  include/osg/Transparency still exists and is
simply
a typedef to BlendFunc and is enclosed in a #ifdef USE_DEPRECTATED_API
block.

The matrix methods in the osg::Transform class have been
moved/replicated in
a osg::MatrixTransform sublcass from osg::Transform.  The old matrix
functionality is still present in the osg::Transform class but is guard
by #ifdef USG_DEPRECATED_API blocks.  One should now think of
osg::Transform
as being a Transform Node base class.  MatrixTransform has all the
functionality of the original Transform class, so should be used
instead.
This commit is contained in:
Robert Osfield
2002-07-12 14:25:10 +00:00
parent 00470acb61
commit 8128265e09
23 changed files with 323 additions and 264 deletions

View File

@@ -6,30 +6,36 @@ Transform::Transform()
{
_referenceFrame = RELATIVE_TO_PARENTS;
_matrix = osgNew Matrix;
_inverse = osgNew Matrix;
_inverseDirty = false;
#ifdef USE_DEPRECATED_API
_deprecated_matrix = osgNew Matrix;
_deprecated_inverse = osgNew Matrix;
_deprecated_inverseDirty = false;
#endif
}
Transform::Transform(const Transform& transform,const CopyOp& copyop):
Group(transform,copyop),
_computeTransformCallback(transform._computeTransformCallback),
_referenceFrame(transform._referenceFrame),
_matrix(osgNew Matrix(*transform._matrix)),
_inverse(osgNew Matrix(*transform._inverse)),
_inverseDirty(transform._inverseDirty)
_referenceFrame(transform._referenceFrame)
#ifdef USE_DEPRECATED_API
,
_deprecated_matrix(osgNew Matrix(*transform._deprecated_matrix)),
_deprecated_inverse(osgNew Matrix(*transform._deprecated_inverse)),
_deprecated_inverseDirty(transform._deprecated_inverseDirty)
#endif
{
}
#ifdef USE_DEPRECATED_API
Transform::Transform(const Matrix& mat )
{
_referenceFrame = RELATIVE_TO_PARENTS;
_matrix = osgNew Matrix(mat);
_inverse = osgNew Matrix();
_inverseDirty = false;
_deprecated_matrix = osgNew Matrix(mat);
_deprecated_inverse = osgNew Matrix();
_deprecated_inverseDirty = false;
}
#endif
Transform::~Transform()
{