Public Types | Public Member Functions

IGameSkin Class Reference

This reference page is linked to from the following overview topics: 3DXI Modifiers.


Search for all occurrences

Detailed Description

A skin wrapper Class.

This class provides an unified interface to the various skin options present in 3ds Max. This includes Physique and Skin. All the data from skin and physique are stored in the same way, but options exist to find out what skinning option was used. The vertex indexes used here are the same as those for the actual mesh, so this provides a one to one corelation.
The version of the Character Studio that is used for IGame is 3.2.1 - Anything earlier is unsupported
The bones need to be parsed by IGame before this interface can be used.

See also:
IGameModifier

#include <IGameModifier.h>

Inheritance diagram for IGameSkin:
Inheritance graph
[legend]

List of all members.

Public Types

enum   SkinType { IGAME_PHYSIQUE, IGAME_SKIN }
 

Skinning Modifier Types.

More...
enum   VertexType { IGAME_RIGID, IGAME_RIGID_BLENDED, IGAME_UNKNOWN }
 

Vertex types.

More...

Public Member Functions

virtual int  GetNumOfSkinnedVerts ()=0
  Get the numbers of vertices effected by this instance of the modifier.
virtual int  GetNumberOfBones (int vertexIndex)=0
  Get the numbers of bones effecting the vertex.
virtual float  GetWeight (int vertexIndex, int boneIndex)=0
  Get the weight for the bone and vertex index passed in.
virtual INode GetBone (int vertexIndex, int boneIndex)=0
  Get the 3ds Max bone effecting the vertex.
virtual IGameNode GetIGameBone (int vertexIndex, int boneIndex)=0
  Get the IGameNode equivalent of the bone effecting the vertex.
virtual int  GetBoneID (int vertexIndex, int boneIndex)=0
  Get the IGameNode ID equivalent of the bone effecting the vertex.
virtual VertexType  GetVertexType (int vertexIndex)=0
  Get Vertex Type.
virtual SkinType  GetSkinType ()=0
  Get the Skinning type.
virtual bool  GetInitBoneTM (IGameNode *boneNode, GMatrix &intMat)=0
  Get the bone TM when skin was added.
virtual bool  GetInitBoneTM (INode *boneNode, GMatrix &intMat)=0
  Get the bone TM when skin was added.
virtual void  GetInitSkinTM (GMatrix &intMat)=0
  Get the original TM for the node with skin.
virtual int  GetTotalBoneCount ()=0
  Get the number of bones used by the skinning modifiers.
virtual int  GetTotalSkinBoneCount ()=0
  Receive the total number of bones used by the skinning system - this will include bones that are not assigned to any vertex.
virtual IGameMesh GetInitialPose ()=0
  Returns the mesh before the skin modifier was added.
virtual int  GetBoneIndex (IGameNode *boneNode, bool usedList=false)=0
  use the usedList to define if you want to the search all the bones or just the bones actually effecting a vertex
virtual int  GetBoneIndex (INode *boneNode, bool usedList=false)=0
  use the usedList to define if you want to the search all the bones or just the bones actually effecting a vertex
virtual IGameNode GetIGameBone (int index, bool usedList=false)=0
  use the usedList to define if you want to the search all the bones or just the bones actually effecting a vertex
virtual INode GetBone (int index, bool usedList=false)=0
  use the usedList to define if you want to the search all the bones or just the bones actually effecting a vertex
  IGameSkin (Modifier *mod, INode *node)
  The IGameSkin constructor.

Member Enumeration Documentation

enum SkinType

Skinning Modifier Types.

These are the Skin modifiers known to IGame

Enumerator:
IGAME_PHYSIQUE 

A Physique Modifier.

IGAME_SKIN 

A 3ds Max Skin Modifier.

enum VertexType

Vertex types.

These are the types used by the modifiers

Enumerator:
IGAME_RIGID 

A RIGID vertex.

IGAME_RIGID_BLENDED 

A BLENED vertex.

IGAME_UNKNOWN 

Error or unsupported vertex.


Constructor & Destructor Documentation

IGameSkin ( Modifier mod,
INode node 
) [inline]

The IGameSkin constructor.

Parameters:
*mod The 3ds Max modifier to initialise
*node The 3ds Max node to initialise
:IGameModifier(mod, node){};

Member Function Documentation

virtual int GetNumOfSkinnedVerts ( ) [pure virtual]

Get the numbers of vertices effected by this instance of the modifier.

If the modifier is attached to more than one node, then this will be the count of vertices on the current node

Returns:
The number of vertices
virtual int GetNumberOfBones ( int  vertexIndex ) [pure virtual]

Get the numbers of bones effecting the vertex.

Parameters:
vertexIndex The index of the vertex
Returns:
The number of bones
virtual float GetWeight ( int  vertexIndex,
int  boneIndex 
) [pure virtual]

Get the weight for the bone and vertex index passed in.

Parameters:
vertexIndex The index of the vertex
boneIndex The bone index
Returns:
The weight
virtual INode* GetBone ( int  vertexIndex,
int  boneIndex 
) [pure virtual]

Get the 3ds Max bone effecting the vertex.

Parameters:
vertexIndex The index of the vertex
boneIndex The bone index
Returns:
A pointer to a 3ds Max INode for the bone
virtual IGameNode* GetIGameBone ( int  vertexIndex,
int  boneIndex 
) [pure virtual]

Get the IGameNode equivalent of the bone effecting the vertex.

Parameters:
vertexIndex The index of the vertex
boneIndex The bone index
Returns:
A pointer to a IGameNode for the bone
virtual int GetBoneID ( int  vertexIndex,
int  boneIndex 
) [pure virtual]

Get the IGameNode ID equivalent of the bone effecting the vertex.

The IGameNode ID can be used if the nodes pass out first and use this value as an index when upon import

Parameters:
vertexIndex The index of the vertex
boneIndex The bone index
Returns:
A Node ID
virtual VertexType GetVertexType ( int  vertexIndex ) [pure virtual]

Get Vertex Type.

Specifies whether the Vertex is either Rigid or blended

Parameters:
vertexIndex The vertex to query
Returns:
The vertex type. It can be one of the following
IGAME_RIGID
IGAME_RIGID_BLENDED
See also:
IGameSkin::VertexType
virtual SkinType GetSkinType ( ) [pure virtual]

Get the Skinning type.

This can be used to find out whether 3ds Max's Skin or Physique was used

Returns:
The skinning type. It can be one of the following
IGAME_PHYSIQUE
IGAME_SKIN
See also:
IGameSkin::SkinType
virtual bool GetInitBoneTM ( IGameNode boneNode,
GMatrix intMat 
) [pure virtual]

Get the bone TM when skin was added.

This provides access to the intial Bone TM when the skin modifier was applied.

Parameters:
boneNode THe IGameNode bone whose matrix is needed
&intMat THe matrix to receive the intial TM
Returns:
True if the bone was found
virtual bool GetInitBoneTM ( INode boneNode,
GMatrix intMat 
) [pure virtual]

Get the bone TM when skin was added.

This provides access to the intial Bone TM when the skin modifier was applied.

Parameters:
boneNode The Max INode bone whose matrix is needed
&intMat The matrix to receive the intial TM
Returns:
True if the bone was found
virtual void GetInitSkinTM ( GMatrix intMat ) [pure virtual]

Get the original TM for the node with skin.

This provides access to the intial node TM when the skin modifier was applied.

Parameters:
&intMat The matrix to receive the intial TM
virtual int GetTotalBoneCount ( ) [pure virtual]

Get the number of bones used by the skinning modifiers.

This provides the toal number of bones used by the modifiers. This shouldn't be confused with IGameSkin::GetNumberOfBones, which returns the numbers of bones associated with a vertex.

Returns:
The total number of bones in the system
virtual int GetTotalSkinBoneCount ( ) [pure virtual]

Receive the total number of bones used by the skinning system - this will include bones that are not assigned to any vertex.

virtual IGameMesh* GetInitialPose ( ) [pure virtual]

Returns the mesh before the skin modifier was added.

virtual int GetBoneIndex ( IGameNode boneNode,
bool  usedList = false 
) [pure virtual]

use the usedList to define if you want to the search all the bones or just the bones actually effecting a vertex

virtual int GetBoneIndex ( INode boneNode,
bool  usedList = false 
) [pure virtual]

use the usedList to define if you want to the search all the bones or just the bones actually effecting a vertex

virtual IGameNode* GetIGameBone ( int  index,
bool  usedList = false 
) [pure virtual]

use the usedList to define if you want to the search all the bones or just the bones actually effecting a vertex

virtual INode* GetBone ( int  index,
bool  usedList = false 
) [pure virtual]

use the usedList to define if you want to the search all the bones or just the bones actually effecting a vertex


IGameSkin IGameSkin IGameSkin IGameSkin IGameSkin IGameSkin IGameSkin IGameSkin IGameSkin IGameSkin
IGameSkin IGameSkin IGameSkin IGameSkin IGameSkin IGameSkin IGameSkin IGameSkin IGameSkin IGameSkin