SYNOPSIS

#include <Inventor/nodes/SoTransformation.h>

Inherits SoNode.

Inherited by SoAntiSquish, SoGeoLocation, SoMatrixTransform, SoResetTransform, SoRotation, SoRotationXYZ, SoScale, SoSurroundScale, SoTransform, SoTranslation, and SoUnits.

Public Member Functions

virtual SoType getTypeId (void) const

Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and 'downward' casting.

Static Public Member Functions

static SoType getClassTypeId (void)

static void initClass (void)

Protected Member Functions

virtual const SoFieldData * getFieldData (void) const

SoTransformation (void)

virtual ~SoTransformation ()

Static Protected Member Functions

static const SoFieldData ** getFieldDataPtr (void)

Additional Inherited Members

Detailed Description

The SoTransformation class is the abstract base class for transformation nodes.

To position and orient geometry within the 3D world space, various node types for transformations are used. These nodes all inherit the SoTransformation base class.

Note that transformations will be accumulated through the scene graph, unless used under SoSeparator nodes, where the transformation matrix stack will be pushed and popped. Here is a short example demonstrating this principle:

#Inventor V2.1 ascii

Separator {
   BaseColor { rgb 1 0 0 }
   Cone { }

   Translation { translation 3 0 0 }

   Separator {
      Rotation { rotation 1 0 0  1.57 }
      BaseColor { rgb 0 1 0 }
      Cone { }
   } # SoSeparator restores transformation matrix here

   Translation { translation 3 0 0 }

   Rotation { rotation 1 0 0  1.57 }
   BaseColor { rgb 0 0 1 }
   Cone { }

   Translation { translation 3 0 0 }

   # Last SoRotation was not within SoSeparator, so this next
   # SoRotation will accumulate with the previous.
   Rotation { rotation 1 0 0  1.57 }
   BaseColor { rgb 1 1 0 }
   Cone { }
}.fi


Which results in the following scene:


Constructor & Destructor Documentation

SoTransformation::SoTransformation (void)\fC [protected]\fP

Constructor.

SoTransformation::~SoTransformation ()\fC [protected]\fP, \fC [virtual]\fP

Destructor.

Member Function Documentation

\fBSoType\fP SoTransformation::getTypeId (void) const\fC [virtual]\fP

Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and 'downward' casting. Usage example:

void foo(SoNode * node)
{
  if (node->getTypeId() == SoFile::getClassTypeId()) {
    SoFile * filenode = (SoFile *)node;  // safe downward cast, knows the type
  }
}

For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on.

For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups.

Implements SoBase.

Reimplemented in SoTransformManip, SoPendulum, SoRotor, SoShuttle, SoGeoLocation, SoRotationXYZ, SoSurroundScale, SoTransform, SoAntiSquish, SoCenterballManip, SoHandleBoxManip, SoJackManip, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformerManip, SoMatrixTransform, SoResetTransform, SoRotation, SoScale, SoTranslation, and SoUnits.

const \fBSoFieldData\fP * SoTransformation::getFieldData (void) const\fC [protected]\fP, \fC [virtual]\fP

Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL.

Reimplemented from SoFieldContainer.

Reimplemented in SoTransformManip, SoPendulum, SoRotor, SoShuttle, SoGeoLocation, SoRotationXYZ, SoSurroundScale, SoTransform, SoAntiSquish, SoCenterballManip, SoHandleBoxManip, SoJackManip, SoTabBoxManip, SoTrackballManip, SoTransformBoxManip, SoTransformerManip, SoMatrixTransform, SoResetTransform, SoRotation, SoScale, SoTranslation, and SoUnits.

Author

Generated automatically by Doxygen for Coin from the source code.