AlMotionAction
 
 
 

Basic interface to derived class of actions for motion path actions.

Synopsis

#include <AlMotionAction.h>
class AlMotionAction : public AlAction
AlMotionAction();
virtual	~AlMotionAction();
virtual AlObject*	copyWrapper() const;
virtual AlObjectType	type() const;
statusCode	create(AlCurveNode *);
AlCurveNode*	motionCurve() const;

Description

An AlMotionAction is derived from an AlAction. This particular kind of action uses an AlCurve (a 3-D NURBS curve) to evaluate itself at different times. The AlMotionAction is defined over the range of 0 to 100 (the pre- and post-extrapolation types of the action apply to the evaluation of times before 0 and after 100). An AlMotionAction is evaluated by interpreting the "time" between 0 and 100 as a percentage arc length along the AlCurve used by this action. This results in an (x, y, z) point on the curve from which one of the components is extracted into a double value using an "extract" component.

When this action is used in a channel, the channel will also supply an "extract" component (kX_COMPONENT, kY_COMPONENT or kZ_COMPONENT) to determine which of the (x, y, z) values to use as the final evaluation of the action.

In order to create an AlMotionAction, you must have a valid AlCurveNode with an AlCurve below it. If you delete the AlMotionAction, the AlCurveNode will not be deleted. However, if you delete the AlCurveNode (or the AlCurve below the curve node), this will delete the AlMotionAction that uses that AlCurveNode.

AlMotionAction::AlMotionAction()

Description

Constructs an AlMotionAction wrapper object. Use the create() method to initialize the AlMotionAction.

AlMotionAction::~AlMotionAction()

Description

Deletes an AlMotionAction wrapper object.

AlObject * AlMotionAction::copyWrapper() const

Description

Returns an exact duplicate of this AlMotionAction wrapper.

statusCode AlMotionAction::create(AlCurveNode *path)

Description

Creates a motion path action that uses the curve below the specified AlCurveNode as its path. The path curve must already be a valid, created curve. It cannot be a face. The curve or any of its ancestor DAG nodes must not be animated.

Arguments

< path - the node above the curve to use for the motion path

Return Codes

sSuccess - motion path action was successfully created

sFailure - the curve is animated and cannot be used as a motion path action

sInvalidArgument - ’path’ was not valid

sInsufficientMemory - not enough memory

AlObjectType AlMotionAction::type() const

Description

Returns the class identifier ’kMotionActionType’.

AlCurveNode* AlMotionAction::motionCurve() const

Description

Returns the curve node above the curve that this action uses as a motion path.