Public Member Functions
StaticKinematicState Class Reference

## Detailed Description

The StaticKinematicState object represents the base pose of an object. Objects that have access to the StaticKinematicState object include:

- X3DObject
- Cluster

The static kinematic state on objects is created when applying envelopes, deform-by-spine or deform-by-curve operators. Currently an object can only have one static kinematic state. It represents a snapshot of the pose of the object when the Envelope, DeformBySpine or DeformByCage operator was applied. It is also changed when doing Set Reference Pose in the Animate|Deform|Envelope menu (see the SetEnvelopeRefPoses command). If an object has all 3 operations applied on the same object they will all share the same static kinematic state. When doing a cage deform on top of an envelope for example the later operation will reset the static kinematic state. This means that it's usually better to be in the reference pose when adding these deforms ( ResetActor).

The static kinematic state on clusters is created when the cluster is translated, rotated or scaled by the movecomponentop MoveComponent operator . The static kinematic state is the transformation applied by the MoveComponent operator on the cluster. There is one or possibly two static kine state per move component on a cluster. Therefore you end-up with multiple static kine on a cluster if you transform the cluster many times. The second static kine state on the cluster is created when moving clusters in relative mode.

See also:
  Cluster::HasStaticKinematicState, Cluster::GetStaticKinematicStates, KinematicState, X3DObject::HasStaticKinematicState, X3DObject::GetStaticKinematicState

Example:

            using namespace XSI;
            Application app;
            Model root = app.GetActiveSceneRoot();

            Null myNull;
            root.AddNull( L"", myNull );

            KinematicState nullGlobalKineState(myNull.GetKinematics().GetGlobal());
            Parameter param(nullGlobalKineState.GetParameters().GetItem(L"posx"));
            param.PutValue( (double)4.0 );

            param = nullGlobalKineState.GetParameters().GetItem(L"posy");
            param.PutValue( (double)3.0 );

            X3DObject mySphere;
            root.AddGeometry( L"Sphere", L"MeshSurface", L"", mySphere );
            param = mySphere.GetKinematics().GetGlobal().GetParameters().GetItem(L"posz");
            param.PutValue( (double)2.0 );

            CRefArray deformers(1);
            deformers[0] = myNull;

            Envelope myEnvelop;
            mySphere.ApplyEnvelope( deformers, siUnspecified, siUnspecified, myEnvelop );
            app.LogMessage( mySphere.GetStaticKinematicState().GetClassIDName() );

`#include <xsi_statickinematicstate.h>`

Inheritance diagram for StaticKinematicState:
[legend]

List of all members.

## Public Member Functions
| StaticKinematicState ()
| ~StaticKinematicState ()
| StaticKinematicState (const CRef &in_ref)
| StaticKinematicState (const StaticKinematicState &in_obj)
bool | IsA (siClassID in_ClassID) const
siClassID | GetClassID () const
StaticKinematicState & | operator= (const StaticKinematicState &in_obj)
StaticKinematicState & | operator= (const CRef &in_ref)
MATH::CTransformation | GetTransform (double in_dFrame=0) const
CStatus | PutTransform (const MATH::CTransformation &in_transf, double in_dFrame=0)

## Constructor & Destructor Documentation

StaticKinematicState | ( |  | ) |

Default constructor.

~StaticKinematicState | ( |  | ) |

Default destructor.

StaticKinematicState | ( | const CRef & | in_ref | ) |

Constructor.

Parameters:

  in_ref | constant reference object.

StaticKinematicState | ( | const StaticKinematicState & | in_obj | ) |

Copy constructor.

Parameters:

  in_obj | constant class object.

## Member Function Documentation

bool IsA | ( | siClassID | in_ClassID | ) | const`[virtual]`

Returns true if a given class type is compatible with this API class.

Parameters:

  in_ClassID | class type.

Returns:
  true if the class is compatible, false otherwise.

Reimplemented from Property.

siClassID GetClassID | ( |  | ) | const`[virtual]`

Returns the type of the API class.

Returns:
  The class type.

Reimplemented from Property.

StaticKinematicState& operator= | ( | const StaticKinematicState & | in_obj | ) |

Creates an object from another object. The newly created object is set to empty if the input object is not compatible.

Parameters:

  in_obj | constant class object.

Returns:
  The new StaticKinematicState object.

StaticKinematicState& operator= | ( | const CRef & | in_ref | ) |

Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.

Parameters:

  in_ref | constant class object.

Returns:
  The new StaticKinematicState object.

Reimplemented from Property.

MATH::CTransformation GetTransform | ( | double | in_dFrame = `0` | ) | const

Returns the base pose from an object.

Parameters:

  in_dFrame | Frame at which to get the transform.

Returns:
  The transformation object.

CStatus PutTransform | ( | const MATH::CTransformation & | in_transf,
|  | double | in_dFrame = `0`
| ) |  |

Sets the base pose of an object.

Parameters:

  in_transf | The transformation object.
  in_dFrame | Frame at which to set the transform.

Returns:
  CStatus::OK success
  CStatus::Fail failure

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

- xsi_statickinematicstate.h