MAXNodeUtils

This class contains utilities to manipulate 3D Studio MAX§ nodes.

Interface Methods

Description

MAXNodeUtils

Constructor

~MAXNodeUtils

Destructor

Initialize

Sets the node utils up for use

CheckMAXNode

Check a MAX node to see if it is a valid mesh

GetMAXTriObject

Converts MAX node to a tri-mesh

FixupMAXMesh

Performs cleanup on a MAX mesh

CheckClassID

Tests whether an INode belongs to the specified class

GetMAXNodeType

Gets the MAX node ID

HasGeomChildren

Tests a MAX node to see if it has in children that are geometry

IsMAXTriMesh

Tests whether a node is a MAX tri-Mesh

IsTriMesh

Determines if a m_BoneNode can be converted to a tri-mesh

IsMAXBipedNode

Tests a MAX node to see if it is a MAX Biped node

IsBipedNode

Tests whether a MAX node is MAX Biped node

IsMAXBipedBone

Tests a MAX node to see whether it is a MAX biped bone node

IsBipedRootNode

Checks whether a given MAX INode is the root of the biped

IsBipedFootNode

Tests the given MAX INode to see if it is a leaf node in the biped hierarchy

IsMAXBoneNode

Tests a given MAX INode to see if it is a MAX bone node

IsBoneNode

Tests a given MAX INode to see if it is a MAX bone node

IsMAXDummyNode

Tests a given MAX INode to see if it is a MAX dummy node

IsDummyNode

Tests a given MAX INode to see if it is a MAX dummy node.

IsRootBone

Tests a given MAX INode to see if it is a MAX Root bone node.

FindBipedRoot

Searches a list of MAX bones to find the root bone

BipedIntoReferenceMode

Throws a biped model into reference mode

BipedOutOfReferenceMode

Removes a Biped model from reference mode

BipedRemoveNonUniformScale

Removes the non-uniform scaling from a biped

BipedReturnNonUniformScale

Restores the non-uniform scale to a biped

BipedExportComplete

Is called when all Biped type exporting is done on a model

GetBipInterface

Gets the MAX Biped Interface

HaveBipedModel

Asks whether the Find BipedRoot been called successfully

TMNegParity

Tests a metrix to see if it has negative scaling applied to it

WillContainBipedRoot

Checks a node hiearchy to see if it has a biped root

CheckMaxClassID

Checks a node hiearchy for the MAX class ID

SelectNode

Selects a Node in the MAX Interface

GetPhysiqueModAppliedToNode

Checks a Node to see if the MAX Physique Modifier has been applied to it

ConvertINodeToTriObj

Converts MAX node to a tri-mesh

CheckMAXClassID

Checks to see if a bone node if of the same class ID as the one specified

ValidateTopology

Checks to see if vertex counts for object at end of pipeline and object as viewed by Physique both match

GetInterface

Gets the pointer to the MAX Interface


MAXNodeUtils::MAXNodeUtils ()

Constructor method.

Parameters:

None

Return Values:

None


MAXNodeUtils::~MAXNodeUtils ()

Destructor method.

Parameters:

None

Return Values:

None


MAXNodeUtils::BipedExportComplete ()

This method is called when all Biped type exporting is completed on a model.

Parameters:

None

Return Values


MAXNodeUtils::BipedIntoReferenceMode ()

This method throws a biped model into reference mode.

Parameters:

None

Return Values

Comments:

Must be called after a successful call to FindBipedRoot.


MAXNodeUtils::BipedOutOfReferenceMode ()

This method removes a Biped model from reference mode.

Parameters:

None

Return Values

Comments:

Complementry call to BipedIntoReferenceMode. Should be called after the bone export is done.


MAXNodeUtils::BipedRemoveNonUniformScale ()

This method removes the non-uniform scaling from a biped.

Parameters:

None

Return Values

Comments:

Must be called after a successful call to FindBipedRoot.


MAXNodeUtils::BipedReturnNonUniformScale ()

Restores the non-uniform scale to a biped.

Parameters:

None

Return Values

Comments:

Complementry call to BipedIntoReferenceMode. Should be called after the bone export is done.


MAXNodeUtils::CheckClassID (INode * pNode, ULONG ulClassID, int * pIsOne)

This method tests whether an INode belongs to the specified class.

Parameters:

pNode

The node to test

ulClassID

The class ID to test for

pIsOne

Boolean result returned

Return Values:

BOOL


MAXNodeUtils::CheckMAXNode (INode * pNode)

This method checks a MAX node to see if it is a valid mesh.

Parameters:

pNode

The node to test

Return Values:

BOOL


MAXNodeUtils::CheckMaxClassID (INode * pNode, ULONG ulClassID)

This method tests whether an INode has a MAX class ID.

Parameters:

pNode

The node to test

ulClassID

The class ID to test for

Return Values:

BOOL


MAXNodeUtils::ConvertINodeToTriObj (INode * node, TimeValue t, bool * deleteIt)

This method converts a MAX node to a tri-mesh.

Parameters:

node

The node to convert

t

Time at which to convert it

deleteIt

Indicates whether the Node needs to be deleted after usage

Return Values:

TriObject

Pointer to tri-mesh


MAXNodeUtils::FindBipedRoot (MAXNodeList * pMAXNodeList)

This method searches a list of MAX bones to find the root bone. It sets the root bone variable on this object.

Parameters:

pMAXNodeList

The list of MAX nodes to search

Return Values


MAXNodeUtils::FixupMAXMesh (Mesh * pMesh)

This method performs clean up on a MAX Mesh.

Parameters:

pMesh

The mesh to clean up

Return Values

Comments:

The mesh to clean up should not be an active MAX mesh. This method causes the mesh geometry to change.


MAXNodeUtils::GetBipInterface ()

This method gets the MAX Biped Interface.

Parameters:

None

Return Values


MAXNodeUtils::GetInterface ()

This method gets the pointer to the MAX Interface.

Parameters:

None

Return Values:

Interface*

The MAX Core interface


MAXNodeUtils::GetMAXNodeType (INode * pMAXNode, I32 * pMAXNodeType)

This method gets the MAX node ID.

Parameters:

pMAXNode

The node to query

pMAXNodeType

The node type

Return Values


MAXNodeUtils::GetMAXTriObject (INode * pNode, Object ** ppMaxObject, TriObject ** ppTriObject)

This method converts a MAX node to a tri-mesh. It queries the INode passed in and converts it to a MAX tri-mesh, if posssible.

Parameters:

pNode

The node to be converted

ppMaxObject

The MAX object from the INode

ppTriObject

The MAX tri-mesh object from the INode

Return Values

Comments:

Use the following code to clean up the tri-object retrieved from this call,

ir = m_pNodeUtils->GetMAXTriObject(in_pMAXNode, &pObj, &pTriObj);
Do Stuff
if(pObj != (Object *)pTriObj) { pTriObj->DeleteMe(); }


MAXNodeUtils::GetPhysiqueModAppliedToNode (INode * pNode)

This method checks a Node to see if the MAX Physique Modifier has been applied to it.

Parameters:

pNode

The node to test

Return Values


MAXNodeUtils::HasGeomChildren (INode * pCurrentMAXNode, BOOL * pHasGeomChildren)

This method tests a MAX node to see if it has any children that are geometry.

Parameters:

pCurrentMAXNode

The node to test

pHasGeomChildren

 Indicates whether geometry children exist

Return Values


MAXNodeUtils::HaveBipedModel ()

This method indicates if the Find BipedRoot been called successfully.

Parameters:

None

Return Values


MAXNodeUtils::Initialize (ExpInterface * pMAXExportInterface, Interface * pMAXCoreInterface)

This method sets up the node utils for use.

Parameters:

None

Return Values


MAXNodeUtils::IsBipedFootNode (INode * m_BoneNode)

This method tests the given MAX INode to see if it is a leaf node in the biped heirarchy.

Parameters:

m_BoneNode

The MAX node to test

Return Values:

BOOL

True if it is a leaf node, False otherwise


bool MAXNodeUtils::IsBipedNode (INode * m_BoneNode)

This method tests whether a MAX node is a MAX Biped node.

Parameters:

m_BoneNode

The node to test

Return Values:

BOOL

True if it is a leaf node, False otherwise


MAXNodeUtils::IsBipedRootNode (INode * node)

This method checks whether a given MAX INode is the root of the biped.

Parameters:

node

The node to test

Return Values:

BOOL

True if it is a leaf node, False otherwise


MAXNodeUtils::IsBoneNode (INode * m_BoneNode)

This method tests a given MAX INode to see if it is a MAX bone node.

Parameters:

m_BoneNode

The MAX node to test

Return Values:

BOOL

True if it is a leaf node, False otherwise


MAXNodeUtils::IsDummyNode (INode * m_BoneNode)

This method tests a given MAX INode to see if it is a MAX dummy node.

Parameters:

m_BoneNode

The MAX node to test

Return Values:

BOOL

True if it is a leaf node, False otherwise


MAXNodeUtils::IsMAXBipedBone (INode * pNode, int * pItIs)

This method tests a MAX node to see if it is a MAX biped bone node.

Parameters:

pNode

The Node to test

pItIs

Returns whether it is a bone node

Return Values


MAXNodeUtils::IsMAXBipedNode (INode * pNode, int * pItIs)

This method tests a MAX node to see if it is a MAX Biped node.

Parameters:

pNode

The Node to test

pItIs

Returns whether it is a biped

Return Values


MAXNodeUtils::IsMAXBoneNode (INode * pNode, int * pIsOne)

This method tests a given MAX INode to see if it is a MAX bone node.

Parameters:

pNode

The node to test

pIsOne

Returns TRUE (1) if it is

Return Values


MAXNodeUtils::IsMAXDummyNode (INode * pNode, int * pIsOne)

This method tests a given MAX INode to see if it is a MAX dummy node.

Parameters:

pNode

The node to test

pIsOne

Returns TRUE (1) if it is

Return Values


MAXNodeUtils::IsMAXTriMesh (INode * pNode, int * pItIs)

This method tests whether a node is a Max tri-mesh.

Parameters:

pNode

The node to test

pIsOne

Returns TRUE (1) if it is a tri-mesh

Return Values


MAXNodeUtils::IsMaxBoneNode (INode * m_BoneNode)

This method tests a given MAX INode to see if it is a MAX bone node.

Parameters:

m_BoneNode

The node to test

Return Values:

BOOL

TRUE if it is, FALSE otherwise


MAXNodeUtils::IsRootBone (INode * bone_node)

This method tests a given MAX INode to see if it is a MAX Root bone node.

Parameters:

bone_node

The MAX node to test

Return Values:

BOOL

True if it is, False otherwise


MAXNodeUtils::IsTriMesh (INode * m_BoneNode)

This method determines if an m_BoneNode can be converted to a tri-mesh.

Parameters:

m_BoneNode

The node to test

Return Values:

BOOL

True if it is, False otherwise

 


MAXNodeUtils::SelectNode (INode * bone_node)

This method selects a node in the Max Interface.

Parameters:

bone_node

The node to select

Return Values:

None


MAXNodeUtils::TMNegParity (Matrix3 & m)

This method tests a matrix to see if it has negative scaling applied to it.

Parameters:

m

Reference to the matrix to test

Return Values:

BOOL


MAXNodeUtils::WillContainBipedRoot (INode * pCurrentMAXNode, BOOL * pHasBipedRoot)

This method checks a node hierarchy to see if it has a biped root. It recursively scans all children of this node to determine if any one of those children is a biped root node. If one is found, then TRUE is returned.

Parameters:

pCurrentMAXNode

Pointer to the Max node in question

pHasBipedRoot

Whether or not a biped root exists

Return Values:

BOOL

Comments:

This method stops traversing if it comes to a light node, a view node or a group node. In other words, this method scans all child nodes that are part of the MAX node list whose parent node is the grouphead.


MAXNodeUtils::CheckMaxClassID (INode* pNode, ULONG ulClassID)

This method checks to see if a m_BoneNode if of the same class ID as the one specified. Because of the possibility that the m_BoneNode may be part of a modifier stack, it is not immediately identified as the desired type. The m_BoneNode's modifier stack is checked for a m_BoneNode of the desired type.

Parameters:

pNode

Pointer to the Max node in question

ulClassID

ClassID to check against

Return Values:

BOOL


MAXNodeUtils::ValidateTopology ( MAXNodeList* in_pMAXNodeList, AuthConstraints* in_pAuthConstraints, BOOL* out_pOK )

This method checks to see if vertex counts for object at end of pipeline and object as viewed by Physique both match.

Parameters:

in_pMAXNodeList

MAX node list to be scanned

in_pAuthConstraints

Warnings dialog class instance

out_pOK

Status of whether any topological problems were found (False = problems found)

Return Values

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