- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# 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:

[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::Object * | cloneType () const
| clone an object of the same type as the node.
virtual osg::Object * | clone (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 AutoTransform * | asAutoTransform ()
virtual const AutoTransform * | asAutoTransform () const
void | setPosition (const Vec3 &pos)
const Vec3 & | getPosition () const
void | setRotation (const Quat &quat)
const Quat & | getRotation () const
void | setScale (float scale)
void | setScale (const Vec3 &scale)
const Vec3 & | getScale () const
void | setPivotPoint (const Vec3 &pivot)
const Vec3 & | getPivotPoint () 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
## 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
int | _previousWidth
int | _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

AutoTransform::AutoTransform | ( |  | ) |

AutoTransform::AutoTransform | ( | const AutoTransform & | pat,
|  | const CopyOp & | copyop = `CopyOp::SHALLOW_COPY`
| ) |

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

## Member Function Documentation

void AutoTransform::accept | ( | NodeVisitor & | nv | ) | `[virtual]`

| Visitor Pattern : calls the apply method of a NodeVisitor with this node's type. Reimplemented from osg::Node.

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

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

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

| return the name of the node's class type. 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 osg::Object* osg::AutoTransform::cloneType | ( |  | ) | const`[inline, virtual]`

| clone an object of the same type as the node. Reimplemented from osg::Node.

bool AutoTransform::computeLocalToWorldMatrix | ( | Matrix & | matrix,
|  | NodeVisitor * | nv
| ) | const`[virtual]`

| Reimplemented from osg::Transform.

void AutoTransform::computeMatrix | ( |  | ) | const`[protected]`

bool AutoTransform::computeWorldToLocalMatrix | ( | Matrix & | matrix,
|  | NodeVisitor * | nv
| ) | const`[virtual]`

| Reimplemented from osg::Transform.

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

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

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

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

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

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

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

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::libraryName | ( |  | ) | const`[inline, virtual]`

| return the name of the node's library. Reimplemented from osg::Node.

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

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

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

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

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

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

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

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

## Member Data Documentation

AutoRotateMode osg::AutoTransform::_autoRotateMode`[protected]`

bool osg::AutoTransform::_autoScaleToScreen`[protected]`

float osg::AutoTransform::_autoUpdateEyeMovementTolerance`[protected]`

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

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

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

Vec3 osg::AutoTransform::_pivotPoint`[protected]`

Vec3 osg::AutoTransform::_position`[protected]`

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

int osg::AutoTransform::_previousHeight`[mutable, protected]`

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

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

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

int osg::AutoTransform::_previousWidth`[mutable, protected]`

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

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

The documentation for this class was generated from the following files:

- AutoTransform
- AutoTransform.cpp