3ds Max C++ API Reference
IGameMesh Class Referenceabstract

Simple wrapper for tri mesh objects. More...

#include <IGameObject.h>

+ Inheritance diagram for IGameMesh:

Public Member Functions

virtual bool InitializeBinormalData ()=0
 Initialize Binormal and Tangents data NEW for 3DXI V 2.2 More...
 
virtual int GetNumberOfVerts ()=0
 Get number of Vertices. More...
 
virtual int GetNumberOfTexVerts ()=0
 Get number of Texture Vertices. More...
 
virtual Point3 GetVertex (int index, bool ObjectSpace=false)=0
 Get the actual Vertex. More...
 
virtual bool GetVertex (int index, Point3 &vert, bool ObjectSpace=false)=0
 Get the actual Vertex. More...
 
virtual Point2 GetTexVertex (int index)=0
 Get the actual Texture Vertex. More...
 
virtual bool GetTexVertex (int index, Point2 &tex)=0
 Get the actual Texture Vertex. More...
 
virtual void SetUseWeightedNormals ()=0
 [METHOD IS RETIRED] Specify whether normals are calculated based on face angles More...
 
virtual int GetNumberOfNormals ()=0
 Get number of normals. More...
 
virtual int GetNormalVertexIndex (int index)=0
 Get the Vertex Index associated with the Normal NEW for 3DXI V 2.2 More...
 
virtual Point3 GetNormal (int index, bool ObjectSpace=false)=0
 Get the actual normal. More...
 
virtual bool GetNormal (int index, Point3 &norm, bool ObjectSpace=false)=0
 Get the actual normal. More...
 
virtual bool GetNormal (int faceIndex, int corner, Point3 &norm, bool ObjectSpace=false)=0
 Get the normal based on face and corner. More...
 
virtual Point3 GetNormal (FaceEx *face, int corner, bool ObjectSpace=false)=0
 Get the normal based on face and corner. More...
 
virtual bool GetNormal (FaceEx *face, int corner, Point3 &norm, bool ObjectSpace=false)=0
 Get the normal based on face and corner. More...
 
virtual Point3 GetNormal (int faceIndex, int corner, bool ObjectSpace=false)=0
 Get the normal based on face and corner. More...
 
virtual int GetNumberOfIllumVerts ()=0
 Get number of Illuminated Vertices. More...
 
virtual int GetNumberOfAlphaVerts ()=0
 Get number of Alpha Vertices. More...
 
virtual int GetNumberOfColorVerts ()=0
 Get number of Vertex Colors. More...
 
virtual Point3 GetColorVertex (int index)=0
 Get the actual Color Vertex. More...
 
virtual bool GetColorVertex (int index, Point3 &col)=0
 Get the actual Color Vertex. More...
 
virtual float GetAlphaVertex (int index)=0
 Get the actual Alpha Vertex. More...
 
virtual bool GetAlphaVertex (int index, float &alpha)=0
 Get the actual Alpha Vertex. More...
 
virtual float GetIllumVertex (int index)=0
 Get the actual Illuminated Vertex. More...
 
virtual bool GetIllumVertex (int index, float &illum)=0
 Get the actual Illuminated Vertex. More...
 
virtual int GetNumberOfFaces ()=0
 Get the number of faces in the mesh. More...
 
virtual FaceExGetFace (int index)=0
 Get the actual face. More...
 
virtual int GetNumberOfMapVerts (int ch)=0
 The number of verts in a mapping channel. More...
 
virtual Point3 GetMapVertex (int ch, int index)=0
 Get the mapping vertex. More...
 
virtual bool GetMapVertex (int ch, int index, Point3 &mVert)=0
 Get the mapping vertex. More...
 
virtual int GetNumberOfBinormals (int mapChannel=1)=0
 The number of Binormals This function is only available in 3ds Max 6.0 and above More...
 
virtual Point3 GetBinormal (int index, int mapChannel=1)=0
 Get the actual Binormal This function is only available in 3ds Max 6.0 and above More...
 
virtual bool GetBinormal (int index, Point3 &biNormal, int mapChannel=1)=0
 Get the actual Binormal This function is only available in 3ds Max 6.0 and above More...
 
virtual int GetNumberOfTangents (int mapChannel=1)=0
 The number of Tangents This function is only available in 3ds Max 6.0 and above More...
 
virtual Point3 GetTangent (int index, int mapChannel=1)=0
 Get the actual Tangent This function is only available in 3ds Max 6.0 and above More...
 
virtual bool GetTangent (int index, Point3 &Tangent, int mapChannel=1)=0
 Get the actual Tangent This function is only available in 3ds Max 6.0 and above More...
 
virtual Tab< intGetActiveMapChannelNum ()=0
 Get the active mapping channels. More...
 
virtual bool GetMapFaceIndex (int ch, int faceNum, DWORD *index)=0
 Get the face index into the mapping channel array. More...
 
virtual Tab< DWORD > GetActiveSmgrps ()=0
 Get all the smoothing groups found on a mesh. More...
 
virtual Tab< intGetActiveMatIDs ()=0
 Get all the material IDs found on a mesh. More...
 
virtual Tab< FaceEx * > GetFacesFromSmgrp (DWORD smgrp)=0
 Get the face for a particular smoothing group. More...
 
virtual Tab< intGetFaceIndexFromSmgrp (DWORD smgrp)=0
 Get the face index for a particular smoothing group. More...
 
virtual Tab< FaceEx * > GetFacesFromMatID (int matID)=0
 Get the faces for a particular Material ID. More...
 
virtual IGameMaterialGetMaterialFromFace (int FaceNum)=0
 The actual material used by the Face. More...
 
virtual IGameMaterialGetMaterialFromFace (FaceEx *face)=0
 The actual material used by the Face. More...
 
virtual MeshGetMaxMesh ()=0
 The actual 3ds Max Mesh representation. More...
 
virtual bool EvaluateSurface (int FaceIndex, Color *result)=0
 Access the color data for the face specified. More...
 
virtual void SetCreateOptimizedNormalList ()=0
 [METHOD IS RETIRED] Tell IGame to create a flattened Normals Array This function is only available in 3ds Max 6.0 and above More...
 
As alternative to FaceEx structure, separate channels can be accessed directly

Get Vertex Index for specified face and corner

virtual int GetFaceVertex (int faceIndex, int corner)=0
 
virtual int GetFaceTextureVertex (int faceIndex, int corner, int mapChannel=1)=0
 Get Map Vertex Index for specified face and corner. More...
 
virtual int GetFaceVertexNormal (int faceIndex, int corner)=0
 Get Normal Vertex Index for specified face and corner. More...
 
virtual int GetFaceVertexTangentBinormal (int faceIndex, int corner, int mapChannel=1)=0
 Get Tangent and Binormal Vertex Index for specified face and corner. More...
 
virtual DWORD GetFaceSmoothingGroup (int faceIndex)=0
 Get Smoothing Group for specified face. More...
 
virtual int GetFaceMaterialID (int faceIndex)=0
 Get Material ID for specified face. More...
 
virtual int GetFaceEdgeVisibility (int faceIndex, int edge)=0
 Get Edge Visibility value for specified face and edge. More...
 
virtual int GetNumberOfPolygons ()=0
 N-Polygon supportGet the number of polygons in the EPoly. More...
 
virtual int GetNumberOfPolygonNormals ()=0
 Get the number of Normals in the EPoly NEW for 3DXI V 2.2 More...
 
virtual int GetNumberOfPolygonCorners (int PolyIndex)=0
 Get Polygon polygon corners. More...
 
virtual Tab< INT > GetPolygonVertices (int PolyIndex)=0
 Get Polygon vertices. More...
 
virtual Tab< INT > GetPolygonNormals (int PolyIndex)=0
 Get Polygon normals. More...
 
virtual Tab< Point3GetPolygonNormalsArray (int PolyIndex=-1)=0
 Get Polygon normals array NEW for 3DXI V 2.2 More...
 
virtual Tab< INT > GetPolygonMapVertices (int PolyIndex, int MapChannel)=0
 Get Polygon map vertices. More...
 
virtual Tab< INT > GetPolygonEgdesVisibility (int PolyIndex)=0
 Get Polygon Edges Visibility. More...
 
virtual DWORD GetPolygonSmoothingGroup (int PolyIndex)=0
 Get Smoothing Group for specified Polygon. More...
 
virtual int GetPolygonMaterialID (int PolyIndex)=0
 Get Material ID for specified Polygon. More...
 
virtual Tab< INT > GetPolygonIndexFromMatID (int MatID)=0
 Get Polygon Indices based on Material ID. More...
 
virtual IGameMaterialGetMaterialFromPolygon (int PolyIndex)=0
 Get Polygon Material. More...
 
- Public Member Functions inherited from IGameObject
 IGameObject ()
 Default constructor. More...
 
IGAMEEXPORT void GetBoundingBox (Box3 &bb)
 The bounding box of the object. More...
 
IGAMEEXPORT bool IsRenderable ()
 Check if object renderable. More...
 
virtual ObjectTypes GetIGameType ()=0
 The IGame object type. More...
 
IGAMEEXPORT ObjectGetMaxObject ()
 Access to the actual 3ds Max object. More...
 
IGAMEEXPORT MaxType GetMaxType ()
 The 3ds Max object type. More...
 
IGAMEEXPORT int GetNumModifiers ()
 The number of modifiers active on the object. More...
 
IGAMEEXPORT IGameModifierGetIGameModifier (int index)
 Access to IGame modifier. More...
 
IGAMEEXPORT IGameObject (INode *node)
 The IGameObject constructor. More...
 
IGAMEEXPORT bool CastShadows ()
 Check if Object casts shadows. More...
 
IGAMEEXPORT bool IsObjectSkinned ()
 Check if object skinned. More...
 
IGAMEEXPORT IGameSkinGetIGameSkin ()
 Access to the Skin interface. More...
 
IGAMEEXPORT bool IsObjectXRef ()
 Check if XRef object. More...
 
IGAMEEXPORT GMatrix GetIGameObjectTM ()
 Access to the ObjectTM. More...
 
virtual bool InitializeData ()
 Extract the 3ds Max data into IGame data. More...
 
virtual ~IGameObject ()=0
 
- Public Member Functions inherited from IExportEntity
virtual ~IExportEntity ()
 Destructor. More...
 
virtual IPropertyContainerGetIPropertyContainer ()
 Retrieve the Property Container. More...
 
virtual bool IsEntitySupported ()
 Is the Entity directly supported. More...
 
virtual const MCHARGetClassName ()=0
 Retrieves the name of the entity class. More...
 

Additional Inherited Members

- Public Types inherited from IGameObject
enum  ObjectTypes {
  IGAME_UNKNOWN , IGAME_LIGHT , IGAME_MESH , IGAME_SPLINE ,
  IGAME_CAMERA , IGAME_HELPER , IGAME_BONE , IGAME_IKCHAIN ,
  IGAME_XREF
}
 Various IGame Object types. More...
 
enum  MaxType {
  IGAME_MAX_UNKNOWN , IGAME_MAX_GEOM , IGAME_MAX_SHAPE , IGAME_MAX_LIGHT ,
  IGAME_MAX_CAMERA , IGAME_MAX_BONE , IGAME_MAX_HELPER
}
 Various 3ds Max Object types. More...
 
- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 
- Protected Member Functions inherited from IGameObject
void SetNode (INode *n)
 
- Protected Attributes inherited from IGameObject
INodegameNode
 
ObjectgameObject
 

Detailed Description

Simple wrapper for tri mesh objects.

An IGame wrapper around the standard 3ds Max Mesh class. It provides unified support for Vertex colors and normals Mirroring is taken into account so the data you retrieve is swapped.
Many of the geometry lookups used by IGameObject use the 3ds Max Template Class Tab. You can use the Tab returned to find out whether the call was successful as the Tab count would be greater then zero.
In 3ds Max 6.0 and above version of IGame, Tangent space is calculated. For this to work, each face must be a member of a smoothing group.

Member Function Documentation

◆ InitializeBinormalData()

virtual bool InitializeBinormalData ( )
pure virtual

Initialize Binormal and Tangents data NEW for 3DXI V 2.2

Binormal and Tangents can be initialized and accessed separately from other mesh data see IGameObject::InitializeData() for more details To initialize entire mesh data (including Binormals and Tangents) IGameObject::InitializeData() should be called

Returns
true if successful, false otherwise

◆ GetNumberOfVerts()

virtual int GetNumberOfVerts ( )
pure virtual

Get number of Vertices.

The total number of vertices found in the mesh

Returns
The number of Vertices

◆ GetNumberOfTexVerts()

virtual int GetNumberOfTexVerts ( )
pure virtual

Get number of Texture Vertices.

The total number of Texture vertices found in the mesh

Returns
The number of TextureVertices

◆ GetVertex() [1/2]

virtual Point3 GetVertex ( int  index,
bool  ObjectSpace = false 
)
pure virtual

Get the actual Vertex.

Get the vertex at the specified index. This is in the World Space Coordinate System

Parameters
indexThe index of the vertex
ObjectSpaceDefines what space the vertex is in. This defaults to World space to be compatible with previous versions
Returns
A Point3 representing the position of the vertex

◆ GetVertex() [2/2]

virtual bool GetVertex ( int  index,
Point3 vert,
bool  ObjectSpace = false 
)
pure virtual

Get the actual Vertex.

Get the vertex at the specified index. This is in the World Space Coordinate System

Parameters
indexThe index of the vertex
&vertA Point3 to receive the data
ObjectSpaceDefines what space the vertex is in. This defaults to World space to be compatible with previous versions
Returns
TRUE if successful

◆ GetTexVertex() [1/2]

virtual Point2 GetTexVertex ( int  index)
pure virtual

Get the actual Texture Vertex.

Get the Texture vertex at the specified index

Parameters
indexThe index of the Texture vertex
Returns
A Point2 representing the Texture vertex

◆ GetTexVertex() [2/2]

virtual bool GetTexVertex ( int  index,
Point2 tex 
)
pure virtual

Get the actual Texture Vertex.

Get the Texture vertex at the specified index

Parameters
indexThe index of the Texture vertex
&texA Point2 to receive the data.
Returns
TRUE if successful

◆ SetUseWeightedNormals()

virtual void SetUseWeightedNormals ( )
pure virtual

[METHOD IS RETIRED] Specify whether normals are calculated based on face angles

To tell IGame to calculate normals based on a weight made from the angle of the edges at the vertex, the developer needs to call this before IGameObject::InitializeData() is called. The default is not to use weighted normals which is also the default in 3ds Max 4.0

◆ GetNumberOfNormals()

virtual int GetNumberOfNormals ( )
pure virtual

Get number of normals.

The total number of normals found in the mesh

Returns
The number of normals

◆ GetNormalVertexIndex()

virtual int GetNormalVertexIndex ( int  index)
pure virtual

Get the Vertex Index associated with the Normal NEW for 3DXI V 2.2

Get the Vertex Index associated with the Normal index.

Parameters
indexThe index of the normal in the flat list
Returns
Vertex Index associated with the Normal inex

◆ GetNormal() [1/6]

virtual Point3 GetNormal ( int  index,
bool  ObjectSpace = false 
)
pure virtual

Get the actual normal.

Get the normal at the specified index.

Parameters
indexThe index of the normal in the flat list
ObjectSpacedefines what space the normal is in. This defaults to World space to be compatible with previous versions
Returns
A Point3 representing the normal

◆ GetNormal() [2/6]

virtual bool GetNormal ( int  index,
Point3 norm,
bool  ObjectSpace = false 
)
pure virtual

Get the actual normal.

Get the normal at the specified index in the flat list

Parameters
indexThe index of the normal
&normA Point3 to receive the data.
ObjectSpaceDefines what space the normal is in. This defaults to World space to be compatible with previous versions
Returns
TRUE if successful

◆ GetNormal() [3/6]

virtual bool GetNormal ( int  faceIndex,
int  corner,
Point3 norm,
bool  ObjectSpace = false 
)
pure virtual

Get the normal based on face and corner.

Parameters
faceIndexThe index into the face array
cornerThe vertex whose normal is requested
&normA point3 to receive the data
ObjectSpaceDefines what space the normal is in. This defaults to World space to be compatible with previous versions
Returns
TRUE if successful

◆ GetNormal() [4/6]

virtual Point3 GetNormal ( FaceEx face,
int  corner,
bool  ObjectSpace = false 
)
pure virtual

Get the normal based on face and corner.

Parameters
faceThe pointer of the face whose normals are to be accessed
cornerThe vertex whose normal is requested
ObjectSpaceDefines what space the normal is in. This defaults to World space to be compatible with previous versions
Returns
A Point3 containing the normal

◆ GetNormal() [5/6]

virtual bool GetNormal ( FaceEx face,
int  corner,
Point3 norm,
bool  ObjectSpace = false 
)
pure virtual

Get the normal based on face and corner.

Parameters
faceThe pointer of the face whose normals are to be accessed
cornerThe vertex whose normal is requested
&normA point3 to receive the data
ObjectSpaceDefines what space the normal is in. This defaults to World space to be compatible with previous versions
Returns
TRUE if successful

◆ GetNormal() [6/6]

virtual Point3 GetNormal ( int  faceIndex,
int  corner,
bool  ObjectSpace = false 
)
pure virtual

Get the normal based on face and corner.

Parameters
faceIndexThe index into the face array
cornerThe vertex whose normal is requested
Returns
A Point3 containing the normal
Parameters
ObjectSpaceDefines what space the normal is in. This defaults to World space to be compatible with previous versions

◆ GetNumberOfIllumVerts()

virtual int GetNumberOfIllumVerts ( )
pure virtual

Get number of Illuminated Vertices.

The total number of Illuminated Vertices found in the mesh

Returns
The number of Illuminated Vertices

◆ GetNumberOfAlphaVerts()

virtual int GetNumberOfAlphaVerts ( )
pure virtual

Get number of Alpha Vertices.

The total number of Alpha Vertices found in the mesh

Returns
The number of Alpha Vertices

◆ GetNumberOfColorVerts()

virtual int GetNumberOfColorVerts ( )
pure virtual

Get number of Vertex Colors.

The total number of Vertex Colors found in the mesh

Returns
The number of Vertex Colors

◆ GetColorVertex() [1/2]

virtual Point3 GetColorVertex ( int  index)
pure virtual

Get the actual Color Vertex.

Get the color vertex at the specified index

Parameters
indexThe index of the color vertex
Returns
A Point3 representing the color of the vertex. Return Point3(-1,-1,-1) if the index is invalid

◆ GetColorVertex() [2/2]

virtual bool GetColorVertex ( int  index,
Point3 col 
)
pure virtual

Get the actual Color Vertex.

Get the color vertex at the specified index

Parameters
indexThe index of the color vertex
&colA Point3 to receive the color data
Returns
TRUE if successful

◆ GetAlphaVertex() [1/2]

virtual float GetAlphaVertex ( int  index)
pure virtual

Get the actual Alpha Vertex.

Get the Alpha vertex at the specified index

Parameters
indexThe index of the Alpha vertex
Returns
A float representing the Alpha value of the vertex. Return -1 if the index is invalid

◆ GetAlphaVertex() [2/2]

virtual bool GetAlphaVertex ( int  index,
float &  alpha 
)
pure virtual

Get the actual Alpha Vertex.

Get the Alpha vertex at the specified index

Parameters
indexThe index of the Alpha vertex
&alphaA float to receive the value
Returns
TRUE if successful

◆ GetIllumVertex() [1/2]

virtual float GetIllumVertex ( int  index)
pure virtual

Get the actual Illuminated Vertex.

Get the Illuminated vertex at the specified index

Parameters
indexThe index of the Illuminated vertex
Returns
A float representing the Illuminated value of the vertex. Return -1 if the index is invalid

◆ GetIllumVertex() [2/2]

virtual bool GetIllumVertex ( int  index,
float &  illum 
)
pure virtual

Get the actual Illuminated Vertex.

Get the Illuminated vertex at the specified index

Parameters
indexThe index of the Illuminated vertex
&illumA float to receive the data
Returns
TRUE if successful

◆ GetNumberOfFaces()

virtual int GetNumberOfFaces ( )
pure virtual

Get the number of faces in the mesh.

The total number of faces contained in the mesh

Returns
The number of faces

◆ GetFace()

virtual FaceEx* GetFace ( int  index)
pure virtual

Get the actual face.

The face represented by the index. The data in FaceEx can be used to lookup into the various arrays

Parameters
indexThe index of the face to return
Returns
A pointer to FaceEx, or NULL if an invalid index is passed in

◆ GetNumberOfMapVerts()

virtual int GetNumberOfMapVerts ( int  ch)
pure virtual

The number of verts in a mapping channel.

Get the number of the vertices for a particular mapping channel

Parameters
chThe mapping channel to use
Returns
The number of verts

◆ GetMapVertex() [1/2]

virtual Point3 GetMapVertex ( int  ch,
int  index 
)
pure virtual

Get the mapping vertex.

Get the actual mapping vertex for the channel

Parameters
chThe channel to query
indexThe vertex index
Returns
The actual mapping data. This will be 0 if the Mapping channel is not found

◆ GetMapVertex() [2/2]

virtual bool GetMapVertex ( int  ch,
int  index,
Point3 mVert 
)
pure virtual

Get the mapping vertex.

Get the actual mapping vertex for the channel

Parameters
chThe channel to query
indexThe vertex index
&mVertA Point3 to receive the data
Returns
TRUE if successful

◆ GetNumberOfBinormals()

virtual int GetNumberOfBinormals ( int  mapChannel = 1)
pure virtual

The number of Binormals This function is only available in 3ds Max 6.0 and above

Get the number of the binormals

Parameters
mapChannelThe valid MESH MAP channel, range (-2...99), default - Texture Coordinates
Returns
The number of binormals for specified map channel

◆ GetBinormal() [1/2]

virtual Point3 GetBinormal ( int  index,
int  mapChannel = 1 
)
pure virtual

Get the actual Binormal This function is only available in 3ds Max 6.0 and above

Get the Binormal at the specified index

Parameters
indexThe index of the Binormal
mapChannelThe valid MESH MAP channel, range (-2...99), default - Texture Coordinates
Returns
A Point3 representing the Binormal for specified map channel

◆ GetBinormal() [2/2]

virtual bool GetBinormal ( int  index,
Point3 biNormal,
int  mapChannel = 1 
)
pure virtual

Get the actual Binormal This function is only available in 3ds Max 6.0 and above

Get the Binormal at the specified index

Parameters
indexThe index of the Binormal
biNormalA point3 to receive the Binormal for specified map channel
mapChannelThe valid MESH MAP channel, range (-2...99), default - Texture Coordinates
Returns
TRUE if successful

◆ GetNumberOfTangents()

virtual int GetNumberOfTangents ( int  mapChannel = 1)
pure virtual

The number of Tangents This function is only available in 3ds Max 6.0 and above

Get the number of the Tangents

Parameters
mapChannelThe valid MESH MAP channel, range (-2...99), default - Texture Coordinates
Returns
The number of Tangents for specified map channel

◆ GetTangent() [1/2]

virtual Point3 GetTangent ( int  index,
int  mapChannel = 1 
)
pure virtual

Get the actual Tangent This function is only available in 3ds Max 6.0 and above

Get the Tangent at the specified index

Parameters
indexThe index of the Tangent
mapChannelThe valid MESH MAP channel, range (-2...99), default - Texture Coordinates
Returns
A Point3 representing the Tangent for specified map channel

◆ GetTangent() [2/2]

virtual bool GetTangent ( int  index,
Point3 Tangent,
int  mapChannel = 1 
)
pure virtual

Get the actual Tangent This function is only available in 3ds Max 6.0 and above

Get the Tangent at the specified index

Parameters
indexThe index of the Tangent
TangentA point3 to receive the Tangent for specified map channel
mapChannelThe valid MESH MAP channel, range (-2...99), default - Texture Coordinates
Returns
TRUE if successful

◆ GetActiveMapChannelNum()

virtual Tab<int> GetActiveMapChannelNum ( )
pure virtual

Get the active mapping channels.

Extracts the active mapping channels in use by the object. Starting with 3DXI V2.0 this returns all active channels including the standard ones such as Texture Coordinates, Vertex Colors, Illum, and Alpha.

Returns
A tab containing the active Mapping channels.

◆ GetMapFaceIndex()

virtual bool GetMapFaceIndex ( int  ch,
int  faceNum,
DWORD *  index 
)
pure virtual

Get the face index into the mapping channel array.

Get the actual index into the mapping channel for the supplied face.

Parameters
chThe mapping channel to use
faceNumThe face to use
indexAn array of three indices to receive the indexing into the vertices
Returns
TRUE if the channel was accessed correctly. False will mean that the channel was not present.

◆ GetActiveSmgrps()

virtual Tab<DWORD> GetActiveSmgrps ( )
pure virtual

Get all the smoothing groups found on a mesh.

Returns
A tab containing the smoothing groups. If the count is zero it means that no smoothing groups were found

◆ GetActiveMatIDs()

virtual Tab<int> GetActiveMatIDs ( )
pure virtual

Get all the material IDs found on a mesh.

Returns
A tab containing the Material IDs

◆ GetFacesFromSmgrp()

virtual Tab<FaceEx *> GetFacesFromSmgrp ( DWORD  smgrp)
pure virtual

Get the face for a particular smoothing group.

Get all the faces belonging to a particular smoothing group

Parameters
smgrpThe smoothing group to use
Returns
A tab containing all the faces

◆ GetFaceIndexFromSmgrp()

virtual Tab<int> GetFaceIndexFromSmgrp ( DWORD  smgrp)
pure virtual

Get the face index for a particular smoothing group.

Get all the faces belonging to a particular smoothing group as a set of indexes into the main face list

Parameters
smgrpThe smoothing group to use
Returns
A tab containing all the indexes

◆ GetFacesFromMatID()

virtual Tab<FaceEx *> GetFacesFromMatID ( int  matID)
pure virtual

Get the faces for a particular Material ID.

Get all the faces belonging to a particular material ID

Parameters
matIDThe material ID to use
Returns
A tab containing all the faces

◆ GetMaterialFromFace() [1/2]

virtual IGameMaterial* GetMaterialFromFace ( int  FaceNum)
pure virtual

The actual material used by the Face.

This will provide access to the material used by the Face whose index is passed in. This means the mesh can be broken down into smaller meshes if the material is a subObject material. This can be used in conjunction with IGameMesh::GetFacesFromMatID to rebuild a face with the material assigned via a material ID.

Parameters
FaceNumThe index of the face whose material is needed.
Returns
A pointer to a material. The is the actual material, so in the case of the SubObject material the material whose mat ID matches.

◆ GetMaterialFromFace() [2/2]

virtual IGameMaterial* GetMaterialFromFace ( FaceEx face)
pure virtual

The actual material used by the Face.

This will provide access to the material used by the Face. This means the mesh can be broken down into smaller meshes if the material is a subObject material. This can be used in conjunction with IGameMesh::GetFacesFromMatID to rebuild a face with the material assigned via a material ID.

Parameters
faceA pointer to the face whose material is needed.
Returns
A pointer to a material. The is the actual material, so in the case of the SubObject material the material whose mat ID matches.

◆ GetMaxMesh()

virtual Mesh* GetMaxMesh ( )
pure virtual

The actual 3ds Max Mesh representation.

The Mesh pointer used by 3ds Max. This allows the developer further access if required to the mesh or data structures

Returns
A Mesh pointer

◆ GetFaceVertex()

virtual int GetFaceVertex ( int  faceIndex,
int  corner 
)
pure virtual
Parameters
faceIndexThe face ID to use
cornerThe face corner to use
Returns
Vertex Index

◆ GetFaceTextureVertex()

virtual int GetFaceTextureVertex ( int  faceIndex,
int  corner,
int  mapChannel = 1 
)
pure virtual

Get Map Vertex Index for specified face and corner.

Texture Vertex by default Should be used to get vertex index for Vertex Color, Alpha, Illum, etc

Parameters
faceIndexThe face ID to use
cornerThe face corner to use
mapChannelThe valid MESH MAP channel, range (-2...99), default - Texture Coordinates
Returns
Map Vertex Index

◆ GetFaceVertexNormal()

virtual int GetFaceVertexNormal ( int  faceIndex,
int  corner 
)
pure virtual

Get Normal Vertex Index for specified face and corner.

Parameters
faceIndexThe face ID to use
cornerThe face corner to use
Returns
Normal Vertex Index

◆ GetFaceVertexTangentBinormal()

virtual int GetFaceVertexTangentBinormal ( int  faceIndex,
int  corner,
int  mapChannel = 1 
)
pure virtual

Get Tangent and Binormal Vertex Index for specified face and corner.

Parameters
faceIndexThe face ID to use
cornerThe face corner to use
mapChannelThe valid MESH MAP channel, range (-2...99), default - Texture Coordinates
Returns
Tangent and Binormal Vertex Index if successful, -1 otherwise

◆ GetFaceSmoothingGroup()

virtual DWORD GetFaceSmoothingGroup ( int  faceIndex)
pure virtual

Get Smoothing Group for specified face.

Parameters
faceIndexThe face ID to use
Returns
Smoothing Group value

◆ GetFaceMaterialID()

virtual int GetFaceMaterialID ( int  faceIndex)
pure virtual

Get Material ID for specified face.

Parameters
faceIndexThe face ID to use
Returns
Material ID value

◆ GetFaceEdgeVisibility()

virtual int GetFaceEdgeVisibility ( int  faceIndex,
int  edge 
)
pure virtual

Get Edge Visibility value for specified face and edge.

Parameters
faceIndexThe face ID to use
edgeThe edge to use
Returns
1 if edge visible, 0 otherwise

◆ EvaluateSurface()

virtual bool EvaluateSurface ( int  FaceIndex,
Color result 
)
pure virtual

Access the color data for the face specified.

The surface color can be obtained from the RenderedSurface interface. Before this function can be used the Surface data needs to be initialised before hand. Please see the IGameRenderedSurface for more information

Parameters
FaceIndexThe face index whose color is being evaluated
*resultA pointer to a Color Array that receives the 3 vertices for the face. This should initialised as Color res[3]
Returns
TRUE is successful. Possible errors include the object not being renderable or is hidden.
See also
IGameRenderedSurface

◆ SetCreateOptimizedNormalList()

virtual void SetCreateOptimizedNormalList ( )
pure virtual

[METHOD IS RETIRED] Tell IGame to create a flattened Normals Array This function is only available in 3ds Max 6.0 and above

IGame can create a flattened list of normals for export much like Vertices and Texture Coordinates. However this operation can be expensive especially on large objects with mixed smoothing groups. This method determines whether this is available for use. If it is not set, then vertex normals can only be looked up on a per face basis .

Due to some internal changes, this method is not really needed. However some builds of IGame did require it so it has been kept in.

◆ GetNumberOfPolygons()

virtual int GetNumberOfPolygons ( )
pure virtual

N-Polygon supportGet the number of polygons in the EPoly.

The total number of polygons contained in the EPoly

Returns
The number of polygons, zero if mesh can not be converted to EPoly

◆ GetNumberOfPolygonNormals()

virtual int GetNumberOfPolygonNormals ( )
pure virtual

Get the number of Normals in the EPoly NEW for 3DXI V 2.2

The total number of Normalscontained in the EPoly

Returns
The number of Normals, zero if mesh can not be converted to EPoly

◆ GetNumberOfPolygonCorners()

virtual int GetNumberOfPolygonCorners ( int  PolyIndex)
pure virtual

Get Polygon polygon corners.

The degree (corners) for given polygon in the EPoly

Parameters
PolyIndexThe polygon index is being evaluated
Returns
The degree (corners) for polygon, zero if mesh can not be converted to EPoly

◆ GetPolygonVertices()

virtual Tab<INT> GetPolygonVertices ( int  PolyIndex)
pure virtual

Get Polygon vertices.

The vertices ID's for given polygon in the EPoly

Parameters
PolyIndexThe polygon index is being evaluated
Returns
The vertices ID's as an array, empty if mesh can not be converted to EPoly

◆ GetPolygonNormals()

virtual Tab<INT> GetPolygonNormals ( int  PolyIndex)
pure virtual

Get Polygon normals.

The normals ID's for given polygon in the EPoly

Parameters
PolyIndexThe polygon index is being evaluated
Returns
The normals ID's as an array, empty if mesh can not be converted to EPoly

◆ GetPolygonNormalsArray()

virtual Tab<Point3> GetPolygonNormalsArray ( int  PolyIndex = -1)
pure virtual

Get Polygon normals array NEW for 3DXI V 2.2

The normals array

Parameters
PolyIndexThe polygon index is being evaluated. Default is -1, returning all normals for EPoly If parameter defined (other than -1) returns normals for provided polygon only.
Returns
The normals as an array, empty if mesh can not be converted to EPoly

◆ GetPolygonMapVertices()

virtual Tab<INT> GetPolygonMapVertices ( int  PolyIndex,
int  MapChannel 
)
pure virtual

Get Polygon map vertices.

The map vetrices ID's for given polygon in the EPoly

Parameters
PolyIndexThe polygon index is being evaluated
MapChannelThe map channel is being evaluated
Returns
The map vertices ID's as an array, empty if mesh can not be converted to EPoly

◆ GetPolygonEgdesVisibility()

virtual Tab<INT> GetPolygonEgdesVisibility ( int  PolyIndex)
pure virtual

Get Polygon Edges Visibility.

The Edges Visibility values for given polygon in the EPoly

Parameters
PolyIndexThe polygon index is being evaluated
Returns
The Edges Visibility array (1 if edge visible, 0 otherwise), empty if mesh can not be converted to EPoly

◆ GetPolygonSmoothingGroup()

virtual DWORD GetPolygonSmoothingGroup ( int  PolyIndex)
pure virtual

Get Smoothing Group for specified Polygon.

Parameters
PolyIndexThe polygon index is being evaluated
Returns
Smoothing Group value

◆ GetPolygonMaterialID()

virtual int GetPolygonMaterialID ( int  PolyIndex)
pure virtual

Get Material ID for specified Polygon.

Parameters
PolyIndexThe polygon index is being evaluated
Returns
Material ID value

◆ GetPolygonIndexFromMatID()

virtual Tab<INT> GetPolygonIndexFromMatID ( int  MatID)
pure virtual

Get Polygon Indices based on Material ID.

The Polygon ID's for given Material ID in the EPoly

Parameters
MatIDThe face index is being evaluated
Returns
The vertices ID's as an array, empty if mesh can not be converted to EPoly

◆ GetMaterialFromPolygon()

virtual IGameMaterial* GetMaterialFromPolygon ( int  PolyIndex)
pure virtual

Get Polygon Material.

The Material for given polygon in the EPoly

Parameters
PolyIndexThe polygon index is being evaluated
Returns
The Polygon Material, NULL if not exists