osg::AutoTransform Class Reference

AutoTransform is a derived form of Transform that automatically scales or rotates to keep its children aligned with screen coordinates. More...

Inheritance diagram for osg::AutoTransform:

Inheritance graph
[legend]

List of all members.

Public Types

enum  AutoRotateMode { NO_ROTATION, ROTATE_TO_SCREEN, ROTATE_TO_CAMERA }

Public Member Functions

 AutoTransform ()
 AutoTransform (const AutoTransform &pat, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
virtual osg::ObjectcloneType () const
 clone an object of the same type as the node.
virtual osg::Objectclone (const osg::CopyOp &copyop) const
 return a clone of a node, with Object* return type.
virtual bool isSameKindAs (const osg::Object *obj) const
 return true if this and obj are of the same kind of object.
virtual const char * className () const
 return the name of the node's class type.
virtual const char * libraryName () const
 return the name of the node's library.
virtual void accept (NodeVisitor &nv)
 Visitor Pattern : calls the apply method of a NodeVisitor with this node's type.
virtual AutoTransformasAutoTransform ()
virtual const
AutoTransform
asAutoTransform () const
void setPosition (const Vec3 &pos)
const Vec3getPosition () const
void setRotation (const Quat &quat)
const QuatgetRotation () const
void setScale (float scale)
void setScale (const Vec3 &scale)
const Vec3getScale () const
void setPivotPoint (const Vec3 &pivot)
const Vec3getPivotPoint () const
void setAutoUpdateEyeMovementTolerance (float tolerance)
float getAutoUpdateEyeMovementTolerance () const
void setAutoRotateMode (AutoRotateMode mode)
AutoRotateMode getAutoRotateMode () const
void setAutoScaleToScreen (bool autoScaleToScreen)
bool getAutoScaleToScreen () const
virtual bool computeLocalToWorldMatrix (Matrix &matrix, NodeVisitor *nv) const
virtual bool computeWorldToLocalMatrix (Matrix &matrix, NodeVisitor *nv) const
virtual BoundingSphere computeBound () const
 Overrides Group's computeBound.

Protected Member Functions

virtual ~AutoTransform ()
void computeMatrix () const

Protected Attributes

Vec3 _position
Vec3 _pivotPoint
float _autoUpdateEyeMovementTolerance
AutoRotateMode _autoRotateMode
bool _autoScaleToScreen
Quat _rotation
Vec3 _scale
bool _firstTimeToInitEyePoint
osg::Vec3 _previousEyePoint
osg::Vec3 _previousLocalUp
Viewport::value_type _previousWidth
Viewport::value_type _previousHeight
osg::Matrix _previousProjection
osg::Vec3 _previousPosition
bool _matrixDirty
osg::Matrix _cachedMatrix


Detailed Description

AutoTransform is a derived form of Transform that automatically scales or rotates to keep its children aligned with screen coordinates.

Member Enumeration Documentation

enum osg::AutoTransform::AutoRotateMode

Enumerator:
NO_ROTATION 
ROTATE_TO_SCREEN 
ROTATE_TO_CAMERA 


Constructor & Destructor Documentation

osg::AutoTransform::AutoTransform (  ) 

osg::AutoTransform::AutoTransform ( const AutoTransform pat,
const CopyOp copyop = CopyOp::SHALLOW_COPY 
)

virtual osg::AutoTransform::~AutoTransform (  )  [inline, protected, virtual]


Member Function Documentation

virtual osg::Object* osg::AutoTransform::cloneType (  )  const [inline, virtual]

clone an object of the same type as the node.

Reimplemented from osg::Node.

virtual osg::Object* osg::AutoTransform::clone ( const osg::CopyOp copyop  )  const [inline, virtual]

return a clone of a node, with Object* return type.

Reimplemented from osg::Node.

virtual bool osg::AutoTransform::isSameKindAs ( const osg::Object obj  )  const [inline, virtual]

return true if this and obj are of the same kind of object.

Reimplemented from osg::Node.

virtual const char* osg::AutoTransform::className (  )  const [inline, virtual]

return the name of the node's class type.

Reimplemented from osg::Node.

virtual const char* osg::AutoTransform::libraryName (  )  const [inline, virtual]

return the name of the node's library.

Reimplemented from osg::Node.

virtual void osg::AutoTransform::accept ( NodeVisitor nv  )  [virtual]

Visitor Pattern : calls the apply method of a NodeVisitor with this node's type.

Reimplemented from osg::Node.

virtual AutoTransform* osg::AutoTransform::asAutoTransform (  )  [inline, virtual]

virtual const AutoTransform* osg::AutoTransform::asAutoTransform (  )  const [inline, virtual]

void osg::AutoTransform::setPosition ( const Vec3 pos  )  [inline]

const Vec3& osg::AutoTransform::getPosition (  )  const [inline]

void osg::AutoTransform::setRotation ( const Quat quat  )  [inline]

const Quat& osg::AutoTransform::getRotation (  )  const [inline]

void osg::AutoTransform::setScale ( float  scale  )  [inline]

void osg::AutoTransform::setScale ( const Vec3 scale  )  [inline]

const Vec3& osg::AutoTransform::getScale (  )  const [inline]

void osg::AutoTransform::setPivotPoint ( const Vec3 pivot  )  [inline]

const Vec3& osg::AutoTransform::getPivotPoint (  )  const [inline]

void osg::AutoTransform::setAutoUpdateEyeMovementTolerance ( float  tolerance  )  [inline]

float osg::AutoTransform::getAutoUpdateEyeMovementTolerance (  )  const [inline]

void osg::AutoTransform::setAutoRotateMode ( AutoRotateMode  mode  )  [inline]

AutoRotateMode osg::AutoTransform::getAutoRotateMode (  )  const [inline]

void osg::AutoTransform::setAutoScaleToScreen ( bool  autoScaleToScreen  )  [inline]

bool osg::AutoTransform::getAutoScaleToScreen (  )  const [inline]

virtual bool osg::AutoTransform::computeLocalToWorldMatrix ( Matrix matrix,
NodeVisitor nv 
) const [virtual]

Reimplemented from osg::Transform.

virtual bool osg::AutoTransform::computeWorldToLocalMatrix ( Matrix matrix,
NodeVisitor nv 
) const [virtual]

Reimplemented from osg::Transform.

virtual BoundingSphere osg::AutoTransform::computeBound (  )  const [virtual]

Overrides Group's computeBound.

There is no need to override in subclasses from osg::Transform since this computeBound() uses the underlying matrix (calling computeMatrix if required).

Reimplemented from osg::Transform.

void osg::AutoTransform::computeMatrix (  )  const [protected]


Member Data Documentation

Vec3 osg::AutoTransform::_position [protected]

Vec3 osg::AutoTransform::_pivotPoint [protected]

float osg::AutoTransform::_autoUpdateEyeMovementTolerance [protected]

AutoRotateMode osg::AutoTransform::_autoRotateMode [protected]

bool osg::AutoTransform::_autoScaleToScreen [protected]

Quat osg::AutoTransform::_rotation [mutable, protected]

Vec3 osg::AutoTransform::_scale [mutable, protected]

bool osg::AutoTransform::_firstTimeToInitEyePoint [mutable, protected]

osg::Vec3 osg::AutoTransform::_previousEyePoint [mutable, protected]

osg::Vec3 osg::AutoTransform::_previousLocalUp [mutable, protected]

Viewport::value_type osg::AutoTransform::_previousWidth [mutable, protected]

Viewport::value_type osg::AutoTransform::_previousHeight [mutable, protected]

osg::Matrix osg::AutoTransform::_previousProjection [mutable, protected]

osg::Vec3 osg::AutoTransform::_previousPosition [mutable, protected]

bool osg::AutoTransform::_matrixDirty [mutable, protected]

osg::Matrix osg::AutoTransform::_cachedMatrix [mutable, protected]


The documentation for this class was generated from the following file:
Generated at Sun Oct 14 02:12:05 2007 for the OpenSceneGraph by doxygen 1.5.3.