MAXRigidAnimConverter

This class contains methods that are used to capture and export simple rigid body animation.

When to use

This class is used by the MAXExporter class.

Interface Methods

Description

MAXRigidAnimConverter

Class constructor

~MAXRigidAnimConverter

Class destructor

Convert

Begins the export process of rigid animation data

Initialize

Initializes MAXRigidAnimConverter

CreateKeyList

Creates a list of positional and orientation keys

ExportMotionResource

Exports a motion (sequence of tracks) from a given MAX node to a Shockwave 3D§ node.

ScanKeyList

Scans a list of animation keys and determines whether that list contains any valid motion data

SampleController

Samples animation information from the animation controller of a given 3D Studio MAX§ node


MAXRigidAnimConverter::MAXRigidAnimConverter(MAXExporter* pMAXExporter)

This is the class constructor.

Parameters:

pMAXExporter

Reference to the MAXExporter class

Return Values:

None


MAXRigidAnimConverter::~MAXRigidAnimConverter()

This is the class destructor.

Parameters:

None

Return Values:

None


MAXRigidAnimConverter::Convert(MAXNodeList* pMaxNodeList, IFXNode* pIFXNode, IFXUnknown* pResource)

This method will begin the export process of rigid animation data if such information exists for a given MAX node.

Parameters:

pInMAXNodeList

Grouphead of the MAX node list for which animation is to be exported

pIFXNode

Shockwave 3D node for which animation data is to be added (Note: This node corresponds to the pInMAXNodeList parameter.)

pResource

The Shockwave 3D model resource to which the animation refers

Return Values


MAXRigidAnimConverter::Initialize ( MAXExporter* pMAXExporter )

This method initializes MAXRigidAnimConverter.

Parameters:

pMAXExporter

Reference to main exporter class

Return Values


MAXRigidAnimConverter::CreateKeyList(MAXNodeList* pMAXNodeList, vector<UnifiedKey>* pvMAXKeyList)

This method samples a given MAX node on a per-clock-tick basis and creates a list of positional and orientation keys based on this sampled data. If this data isn't static, (i.e. either position or orientation values vary) then this data will be used as keyframe data in Shockwave space. That is, each sample from MAX will end up as one keyframe in Shockwave space.

Parameters:

pMAXNodeList

MAX node for which animation sampling is performed

pvMAXKeyList

Vector to be populated with animation keys

Return Values


MAXRigidAnimConverter::ExportMotionResource(MAXNodeList* pMAXNodeList, IFXNode* pIFXNode,vector<UnifiedKey>* pvMAXKeyList, U32* pMotionResourceId)

This method exports a motion (sequence of tracks) from a given MAX node to a Shockwave 3D node.

Parameters:

pMAXNodeList

Grouphead of this node list is the node from which the tracks are exported

pIFXNode

Shockwave node to which the tracks are exported

pvMAXKeyList

List containing the sampled MAX keys

pMotionResourceId

Identifier for the exported motion

Return Values


MAXRigidAnimConverter::ScanKeyList(vector<UnifiedKey>* pvMAXKeyList, BOOL* pIsAnimated)

This method scans a list of animation keys and determines whether that list contains any valid motion data or if it contains only static information; meaning, all key values are the same except time.

Parameters:

pvMAXKeyList

The keylist to be scanned

pIsAnimated

True if any animation information is found in the keylist, false otherwise

Return Values


MAXRigidAnimConverter::SampleController( MAXNodeList* pMAXNodeList, TimeValue* pTime, Matrix3* pWorldMatrix)

This method samples animation information at a given instance in time from the animation controller of a given MAX node.

Parameters:

pvMAXNodeList

Grouphead of this list is the MAX node whose controller is to be sampled for animation data

pTime

Point in time in which the controller is to be queried

pWorldMatrix

World space transform matrix for the node at a given point in time

Return Values

§See asterisked (*) statement at Legal Information © 2001 Intel Corporation.