SoTransformation(3) The SoTransformation class is the abstract base class for transformation nodes.

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

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) [protected]

Constructor.

SoTransformation::~SoTransformation () [protected], [virtual]

Destructor.

Member Function Documentation

SoType SoTransformation::getClassTypeId (void) [static]

This static method returns the SoType object associated with objects of this class.

Reimplemented from SoNode.

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.

SoType SoTransformation::getTypeId (void) const [virtual]

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 SoFieldData ** SoTransformation::getFieldDataPtr (void) [static], [protected]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer.

Reimplemented from SoNode.

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 SoFieldData * SoTransformation::getFieldData (void) const [protected], [virtual]

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.

void SoTransformation::initClass (void) [static]

Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system.

Reimplemented from SoNode.

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.