# CSLAction Class Reference

`#include <Action.h>`

Inheritance diagram for CSLAction:

List of all members.

## Public Types
enum | EActionType { SI_AT_FCURVE, SI_AT_STATICVALUE, SI_AT_EXPRESSION, SI_AT_CLUSTERKEY, SI_AT_CONSTRAINT, SI_AT_COMPOUND, SI_AT_SHAPECOMPOUND, SI_AT_NONE }
| Enumeration of all possible action types. More...
## Public Member Functions
| CSLAction (CSLScene *in_pScene, CSLModel *in_pModel, CdotXSITemplate *in_pTemplate)
virtual | ~CSLAction ()
virtual SI_Error | Synchronize ()
CSLTemplate::ETemplateType | Type ()
EActionType | GetActionType ()
SI_Void | SetActionType (EActionType in_Type)
virtual SI_Float | GetEndTime ()
virtual SI_Void | SetEndTime (SI_Float in_fTime)
virtual SI_Float | GetStartTime ()
virtual SI_Void | SetStartTime (SI_Float in_fTime)
SI_Error | RemoveAnimation (SI_Int in_nIndex)
SI_Error | RemoveAnimation (CSLActionFCurve *io_pToRemove)
CSLActionFCurve ** | GetAnimationList ()
SI_Int | GetAnimationCount ()
virtual CSLActionFCurve * | AddAnimation ()
virtual CSLActionFCurve * | AddAnimation (EFCurveInterpolationType in_InterpolationType)
SI_Error | ClearAnimations ()
CSLActionFCurve * | ConnectAnimation (CSLActionFCurve *in_pNewAnimation)
SI_Error | RemoveStaticValue (SI_Int in_nIndex)
SI_Error | RemoveStaticValue (CSLStaticValue *io_pToRemove)
CSLStaticValue ** | GetStaticValueList ()
SI_Int | GetStaticValueCount ()
CSLStaticValue * | AddStaticValue ()
SI_Error | ClearStaticValues ()
CSLStaticValue * | ConnectStaticValue (CSLStaticValue *in_pNewStaticValue)
CSLXSIShapeReference * | AddXSIShapeReference ()
CSLXSIShapeReference * | GetXSIShapeReference ()
SI_Error | ClearXSIShapeReference ()
CSLXSIShapeReference * | ConnectXSIShapeReference (CSLXSIShapeReference *in_pNewXSIShape)

## Detailed Description

Actions, also known as action sources, are reusable animation segments (see the XSI_Action template reference). They can be created with the CSLMixer::AddAction method and instantiated in the mixer's tracks (CSLTrack) as action clips (CSLActionClip).

Note:
  Actions are not supported by SI3D

See also:
  CSLActionClip

  CSLActionFCurve

  CSLMixer

  CSLShapeAnimation

  CSLStaticValue

## Member Enumeration Documentation

enum EActionType

Enumeration of all possible action types.

Enumerator:

  SI_AT_FCURVE | Fcurve action source item
  SI_AT_STATICVALUE | Static value source
  SI_AT_EXPRESSION | Expression source
  SI_AT_CLUSTERKEY | Cluster key source
  SI_AT_CONSTRAINT | Constraint source
  SI_AT_COMPOUND | Compound Action item source.
  SI_AT_SHAPECOMPOUND | Shape compound Action item source.
  SI_AT_NONE | No flagged source

## Constructor & Destructor Documentation

CSLAction | ( | CSLScene * | in_pScene,
|  | CSLModel * | in_pModel,
|  | CdotXSITemplate * | in_pTemplate |
| ) |  |  |

Constructor

Parameters:

  | in_pScene | Pointer to the scene containing the CSLAction
  | in_pModel | Pointer to the model containing the CSLAction
  | in_pTemplate | Pointer to the CdotXSITemplate defining the CSLAction data

virtual ~CSLAction | ( |  | ) | `[virtual]`

Destructor

## Member Function Documentation

virtual SI_Error Synchronize | ( |  | ) | `[virtual]`

Synchronizes internal data to be coherent with the IO layer

Returns:
  success or failure

Reimplemented from CSLTemplate.

Reimplemented in CSLCOLLADAAction.

CSLTemplate::ETemplateType Type | ( |  | ) | `[inline, virtual]`

Returns the type of this template

Returns:
  CSLTemplate::XSI_ACTION

Implements CSLTemplate.

EActionType GetActionType | ( |  | ) |

Gets the action type

Returns:
  The action type

SI_Void SetActionType | ( | EActionType | in_Type | ) |

Sets the action type

Parameters:

  | in_Type | The action type

virtual SI_Float GetEndTime | ( |  | ) | `[virtual]`

Gets the end time

Returns:
  The end time

Reimplemented in CSLCOLLADAAction.

virtual SI_Void SetEndTime | ( | SI_Float | in_fTime | ) | `[virtual]`

Sets the end time of the action

Parameters:

  | in_fTime | The end time

Reimplemented in CSLCOLLADAAction.

virtual SI_Float GetStartTime | ( |  | ) | `[virtual]`

Gets the start time of the action

Returns:
  The start time

Reimplemented in CSLCOLLADAAction.

virtual SI_Void SetStartTime | ( | SI_Float | in_fTime | ) | `[virtual]`

Sets the start time of the action

Parameters:

  | in_fTime | The new start time

Reimplemented in CSLCOLLADAAction.

SI_Error RemoveAnimation | ( | SI_Int | in_nIndex | ) |

Removes an animation

Parameters:

  | in_nIndex | Index of the animation to remove

Return values:

  | SI_SUCCESS | The animation was removed
  | SI_ERR_BAD_ARGUMENT | Invalid index

SI_Error RemoveAnimation | ( | CSLActionFCurve * | io_pToRemove | ) |

Removes an animation

Parameters:

  | in_pToRemove | Pointer to the animation to remove

Return values:

  | SI_SUCCESS | The animation was removed
  | SI_ERR_BAD_ARGUMENT | Animation was not found

CSLActionFCurve** GetAnimationList | ( |  | ) |

Gets the list of all animations

Returns:
  Pointer to the list of pointer of all animations

SI_Int GetAnimationCount | ( |  | ) |

Get the total number of Animations

Returns:
  The number of Animations

virtual CSLActionFCurve* AddAnimation | ( |  | ) | `[virtual]`

Adds a new animation with default interpolation ( constant interpolation )

Returns:
  Pointer to the newly added Animation

Reimplemented in CSLCOLLADAAction.

virtual CSLActionFCurve* AddAnimation | ( | EFCurveInterpolationType | in_InterpolationType | ) | `[virtual]`

Adds a new animation

Parameters:

  | in_InterpolationType | FCurve interpolation type

Returns:
  Pointer to the newly added Animation

Reimplemented in CSLCOLLADAAction.

SI_Error ClearAnimations | ( |  | ) |

Removes all animations

Return values:

  | SI_SUCCESS |

CSLActionFCurve* ConnectAnimation | ( | CSLActionFCurve * | in_pNewAnimation | ) |

Adds a preallocated animation to the animation list

Parameters:

  | CSLActionFCurve | Pointer to the animation to add

Returns:
  The newly added Animation or null if it was already added

SI_Error RemoveStaticValue | ( | SI_Int | in_nIndex | ) |

Removes a static value

Parameters:

  | in_nIndex | Index of the static value to remove

Return values:

  | SI_SUCCESS | The static value was removed
  | SI_ERR_BAD_ARGUMENT | Invalid index

SI_Error RemoveStaticValue | ( | CSLStaticValue * | io_pToRemove | ) |

Removes a static value

Parameters:

  | in_pToRemove | Pointer to the static value to remove

Return values:

  | SI_SUCCESS | The static value was removed
  | SI_ERR_BAD_ARGUMENT | static value was not found

CSLStaticValue** GetStaticValueList | ( |  | ) |

Gets the list of all static values

Returns:
  Pointer to the list of pointer of all static values

SI_Int GetStaticValueCount | ( |  | ) |

Get the total number of static values

Returns:
  The number of static values

CSLStaticValue* AddStaticValue | ( |  | ) |

Adds a new static value

Returns:
  Pointer to the newly added static value

SI_Error ClearStaticValues | ( |  | ) |

Removes all static values

Return values:

  | SI_SUCCESS |

CSLStaticValue* ConnectStaticValue | ( | CSLStaticValue * | in_pNewStaticValue | ) |

Adds a preallocated static value to the static value list

Parameters:

  | CSLStaticValue | Pointer to the static value to add

Returns:
  The newly added static value or null if it was already added

CSLXSIShapeReference* AddXSIShapeReference | ( |  | ) |

Adds a new shape reference

Returns:
  Pointer to the shape

CSLXSIShapeReference* GetXSIShapeReference | ( |  | ) |

Gets the associated shape

Returns:
  Pointer to the shape

SI_Error ClearXSIShapeReference | ( |  | ) |

Removes the associated shape

Return values:

  | SI_SUCCESS |

CSLXSIShapeReference* ConnectXSIShapeReference | ( | CSLXSIShapeReference * | in_pNewXSIShape | ) |

Connect a preallocated shape to the action shape parameter

Parameters:

  | CSLXSIShape | Pointer to the shape to connect

Returns:
  The newly added shape or null if it was already added

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

- Action.h