Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

TransformNode Class Reference

TransformNode is the abstract class for spatial transformation, from which all transformable nodes are derived. More...

Inheritance diagram for TransformNode:

ChildNode IParent ITransform Node Object Group Shape Viewpoint List of all members.

Public Member Functions

virtual IRenderableGroup * get_IRenderableGroup ()
 Interface implemented by any Emma node that can be a parent of other nodes returns the pointer to the corresponding renderable group for this parent the renderable group holds a pointer to the corresponding ogre scene node.

Detailed Description

TransformNode is the abstract class for spatial transformation, from which all transformable nodes are derived.

Authoring Interface:

        TransformNode {
            field SFVec3f       translation         0 0 0
            field SFRotation    rotation            0 1 0 0
            field SFVec3f       scale               1 1 1
            field SFRotation    scaleOrientation    0 1 0 0
            field SFVec3f       center              0 0 0
            field SFBoolean     visible             true
                // from PickableNode
            field SFBoolean     pickable            false
            eventOut SFDouble   clickTime
            eventOut SFString   pickEvent   // see table below for return values
        
            function localToWorld();
            function worldToLocal();
        }

Parameters:
translation specifies a translation of the coordinate system. Default value: 0 0 0
rotation specifies a rotation of the coordinate system. Default value: 0 1 0 0
scale specifies a non-uniform scale of the coordinate system. Default value: 1 1 1
scaleOrientation specifies a rotation of the coordinate system before the scale (in order to specify scale factors in an arbitrary orientation, e.g. skew). scaleOrientation is applied only to the scale operation. Default value: 0 1 0 0
center specifies a translation offset from the origin of the local coordinate system, to establish a new center of transformation. Default value: 0 0 0
visible specifies if the children of this node will be visible or not Default value: true
pickable specifies if the children of this node will be processed for pick testing or not Default value: false
clickTime returns the eventTime when the pointing device's Left button is pressed
pickEvent returns a string enumerating the occurance of a new pick event. Refer to the following table for a complete enumeration of these events.
The pickEvent string constants returned include:

"ENTERED"Pointing device has moved over this geometry
"EXITED"Pointing device has moved off of this geometry
"OVERMOVED"Pointing device has moved while over this geometry
"OVERBUTTONDOWNMOVED"Pointing device has moved while at least one of its buttons remains held down
"OVERBUTTONDOWN"Pointing device Left button has been pressed while over this geometry
"OVERMBUTTONDOWN"Pointing device Middle button has been pressed while over this geometry
"OVERRBUTTONDOWN"Pointing device Right button has been pressed while over this geometry
"OVERBUTTONUP"Pointing device Left button has been released
"OVERMBUTTONUP"Pointing device Middle button has been released
"OVERRBUTTONUP"Pointing device Right button has been released

Functions:

localToWorld
Converts given local coordinates to world coordinates

worldToLocal
Converts given world coordinates to local coordinates

Functionality:

TransformNode defines a coordinate system for its children that is relative to the coordinate systems of its ancestors. The translation, rotation, scale, scaleOrientation and center fields define a geometric 3D transformation consisting of the following three items:

For a description of coordinate systems and transformations, see Transformations.

The scale field specifies a non-uniform scale of the coordinate system. Values for scale must be greater than zero.

Given a 3-dimensional point P and a Transform node, P is transformed into point P' in its parent's coordinate system by a series of intermediate transformations. In matrix transformation notation, where T (translation), R (rotation), S (scale), C (center), and SR (scaleOrientation) are the equivalent transformation matrices,

P' = T נC נR נSR נS נ-SR נ-C נP

The following two Transform examples, although different in appearance, are equivalent:

Non-nested Transform node example:

        Transform {
            translation T
            rotation R
            scale S
            scaleOrientation SR
            center C
            children [...]
        }
Equivalent nested Transform nodes:
        Transform {
            translation T
            children Transform {
                translation C
                children Transform {
                    rotation R
                    children Transform {
                        rotation SR
                        children Transform {
                            scale S
                            children Transform {
                                rotation -SR
                                children Transform {
                                    translation -C
                                    children [...]
        }}}}}}}


Generated on Sat Apr 1 06:08:08 2006 for Emma Content Development Kit by  doxygen 1.4.3