class SG_EXPORT osg::MatrixTransform

Transform - is group which all children are transformed by the the Transform's osg::Matrix.

Inheritance:


Public Methods

[more] MatrixTransform()
[more] MatrixTransform(const MatrixTransform&, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy
[more] MatrixTransform(const Matrix& matix)
[more] META_Node(osg, MatrixTransform)
[more]void setMatrix(const Matrix& mat)
Set the transform's matrix
[more]inline const Matrix& getMatrix() const
Get the transform's matrix.
[more]void preMult(const Matrix& mat)
preMult transform
[more]void postMult(const Matrix& mat)
postMult transform
[more]virtual const bool computeLocalToWorldMatrix(Matrix& matrix, NodeVisitor*) const
[more]virtual const bool computeWorldToLocalMatrix(Matrix& matrix, NodeVisitor*) const

Protected Fields

[more]ref_ptr<Matrix> _matrix
[more]mutable ref_ptr<Matrix> _inverse
[more]mutable bool _inverseDirty

Protected Methods

[more]virtual ~MatrixTransform()
[more]inline void computeInverse() const


Inherited from Transform:

Public Methods

ovoid setReferenceFrame(ReferenceFrame rf)
oconst ReferenceFrame getReferenceFrame() const
ovoid setComputeTransformCallback(ComputeTransformCallback* ctc)
oComputeTransformCallback* getComputeTransformCallback()
oconst ComputeTransformCallback* getComputeTransformCallback() const
oinline const bool getLocalToWorldMatrix(Matrix& matrix, NodeVisitor* nv) const
oinline const bool getWorldToLocalMatrix(Matrix& matrix, NodeVisitor* nv) const

Public Members

oenum ReferenceFrame
ostruct ComputeTransformCallback: public osg::Referenced

Protected Fields

oref_ptr<ComputeTransformCallback> _computeTransformCallback
oReferenceFrame _referenceFrame
oref_ptr<Matrix> _deprecated_matrix
omutable ref_ptr<Matrix> _deprecated_inverse
omutable bool _deprecated_inverseDirty

Protected Methods

ovirtual const bool computeBound() const


Inherited from Group:

Public Methods

ovirtual void traverse(NodeVisitor& nv)
ovirtual bool addChild( Node* child )
ovirtual bool removeChild( Node* child )
ovirtual bool replaceChild( Node* origChild, Node* newChild )
oinline const unsigned int getNumChildren() const
oinline Node* getChild( const unsigned int i )
oinline const Node* getChild( const unsigned int i ) const
oinline bool containsNode( const Node* node ) const
oinline ChildList::iterator findNode( const Node* node )
oinline ChildList::const_iterator findNode( const Node* node ) const

Protected Fields

oChildList _children


Documentation

Transform - is group which all children are transformed by the the Transform's osg::Matrix. Typical uses of the Transform is for positioning objects within a scene or producing trackball functionality or for animation. The Transform node can be customized via the ComputeTransfromCallback which can be attached to the node, this might be used to convert internal representations of the transformation into generic osg::Matrix'c which are used during scene grpah traversal, such as CullTraversal and IntersectionTraversal. Note, if the transformation matrix scales the subgraph then the normals of the underlying geometry will need to be renormalized to be unit vectors once more. One can done transparently through OpenGL's use of either GL_NORMALIZE and GL_SCALE_NORMALIZE modes. Further background reading see the glNormalize documentation in the OpenGL Reference Guide (the blue book). To enable it in the OSG, you simple need to attach a local osg::StateSet to the osg::Transform, and set the appropriate mode to on via stateset->setMode(GL_NORMALIZE,osg::StateAttribute::ON);.
o MatrixTransform()

o MatrixTransform(const MatrixTransform&, const CopyOp& copyop=CopyOp::SHALLOW_COPY)
Copy constructor using CopyOp to manage deep vs shallow copy

o MatrixTransform(const Matrix& matix)

o META_Node(osg, MatrixTransform)

ovoid setMatrix(const Matrix& mat)
Set the transform's matrix

oinline const Matrix& getMatrix() const
Get the transform's matrix.

ovoid preMult(const Matrix& mat)
preMult transform

ovoid postMult(const Matrix& mat)
postMult transform

ovirtual const bool computeLocalToWorldMatrix(Matrix& matrix, NodeVisitor*) const

ovirtual const bool computeWorldToLocalMatrix(Matrix& matrix, NodeVisitor*) const

ovirtual ~MatrixTransform()

oinline void computeInverse() const

oref_ptr<Matrix> _matrix

omutable ref_ptr<Matrix> _inverse

omutable bool _inverseDirty


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.