DX::IDXMesh Struct Reference

#include <IDXMesh.h>

Inherits DX::IDXUserData, DX::IDXModelOwned, DX::IDXGroupOwned, and DX::IDXHasFileBinding.

Collaboration diagram for DX::IDXMesh:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual uint DXMCALL GetNumVertices () const =0
virtual uint DXMCALL GetNumFaces () const =0
virtual uint DXMCALL GetNumMaterialMaps () const =0
virtual uint DXMCALL GetNumUVChannels () const =0
virtual DXError DXMCALL GetVertex (uint index, IDXVertexPtr *out) const =0
virtual DXError DXMCALL GetVertices (uint start, uint count, IDXVertexArray out) const =0
virtual DXError DXMCALL GetVertices (IDXVertexArray out) const =0
virtual DXError DXMCALL GetFace (uint index, IDXFacePtr *out) const =0
virtual DXError DXMCALL GetFaces (uint start, uint count, IDXFaceArray out) const =0
virtual DXError DXMCALL GetFaces (IDXFaceArray out) const =0
virtual DXError DXMCALL GetMaterialMap (uint index, uint *out) const =0
virtual DXError DXMCALL GetSkin (IDXSkinPtr *out) const =0
virtual void DXMCALL SetNumUVChannels (uint numChannels)=0
virtual DXError DXMCALL SetMaterialMap (uint index, uint materialIndex)=0
virtual DXError DXMCALL SetMaterialMap (uint index, IDXMaterialPtr material)=0
virtual DXError DXMCALL SetMaterialMap (uint index, const char *materialID)=0
virtual IDXVertexPtr DXMCALL AddVertex (const DXVector &vector, const DXVector &normal, uint uvCount=0, const DXUV *uvs=0)=0
virtual DXError DXMCALL AddFace (uint v0, uint v1, uint v2, uint material, IDXFacePtr *out=0)=0
virtual DXError DXMCALL AddMaterialMap (const char *materialName, bool allowDuplicate, uint *out=0)=0
virtual DXError DXMCALL AddMaterialMap (uint index, bool allowDuplicate, uint *out=0)=0
virtual DXError DXMCALL RemoveVertex (IDXVertexPtr vertex)=0
virtual DXError DXMCALL RemoveVertex (uint index)=0
virtual DXError DXMCALL RemoveVertex (uint start, uint count)=0
virtual DXError DXMCALL RemoveFace (IDXFacePtr face)=0
virtual DXError DXMCALL RemoveFace (uint index)=0
virtual DXError DXMCALL RemoveFace (uint start, uint count)=0
virtual DXError DXMCALL RemoveMaterialMap (const char *materialName)=0
virtual DXError DXMCALL RemoveMaterialMap (IDXMaterialPtr map)=0
virtual DXError DXMCALL RemoveMaterialMap (uint index)=0
virtual DXError DXMCALL RemoveMaterialMap (uint start, uint count)=0
virtual void DXMCALL ClearVertices ()=0
virtual void DXMCALL ClearFaces ()=0
virtual void DXMCALL ClearMaterialMaps ()=0
virtual DXError DXMCALL CreateSkin (IDXSkinPtr *out=0)=0
virtual DXError DXMCALL DestroySkin ()=0
virtual void DXMCALL Optimize ()=0


Detailed Description

An IDXMesh can be added to a group and contains all the vertices and faces for a mesh. It can also have skin.

Member Function Documentation

virtual DXError DXMCALL DX::IDXMesh::AddFace ( uint  v0,
uint  v1,
uint  v2,
uint  material,
IDXFacePtr *  out = 0 
) [pure virtual]

Add a new face to this IDXMesh.

Parameters:
v0 The index of the zeroth vertex of the new face.
v1 The index of the first vertex of the new face.
v2 The index of the second vertex of the new face.
material The index of the material to use on the new face.
out An optional pointer to an IDXFacePtr where a pointer to the new face will be stored.
Returns:
Error_InvalidVertex if any of the vertex indices were out of range.
Error_InvalidMaterial if the material was out of range.
Error_Success if the face was added.

virtual DXError DXMCALL DX::IDXMesh::AddMaterialMap ( uint  index,
bool  allowDuplicate,
uint *  out = 0 
) [pure virtual]

Add a material map to this IDXMesh.

Parameters:
index This is the index of a material that has been created on the model.
out This is an optional paremeter, a pointer to an uint variable which will be set to the index of the map that has been added. If the function returns Error_Success, this will be set to the index for the material that has been added. If the function returns Error_Duplicate, this will be set to the index of the map that already exists in the IDXMesh.
Returns:
Error_OutOfRange if the material was not found.
Error_Duplicate if the material is already a map.
Error_Success if the material map was added.

virtual DXError DXMCALL DX::IDXMesh::AddMaterialMap ( const char *  materialName,
bool  allowDuplicate,
uint *  out = 0 
) [pure virtual]

Add a material map to this IDXMesh.

Parameters:
materialName This is the name of a material that has been created on the model.
out This is an optional paremeter. a pointer to an uint variable which will be set to the index of the map that has been added. If the function returns Error_Success, this will be set to the index for the material that has been added. If the function returns Error_Duplicate, this will be set to the index of the map that already exists in the IDXMesh.
Returns:
Error_NullParam if materialName was null.
Error_OutOfRange if the material was not found.
Error_Duplicate if the material is already a map.
Error_Success if the material map was added.

virtual IDXVertexPtr DXMCALL DX::IDXMesh::AddVertex ( const DXVector &  vector,
const DXVector &  normal,
uint  uvCount = 0,
const DXUV *  uvs = 0 
) [pure virtual]

Add a new vertex to this IDXMesh.

Parameters:
vector The position value of the vertex.
normal The normal to this vertex.
uvCount The number of UV coordinates that this vertex has. Defaults to 0
uvs If uvCount is non-zero, then this should be a point to an array of DXUV, of length equal to uvCount.
Returns:
A pointer to the new vertex.

virtual void DXMCALL DX::IDXMesh::ClearFaces (  )  [pure virtual]

Remove all faces from this mesh.

virtual void DXMCALL DX::IDXMesh::ClearMaterialMaps (  )  [pure virtual]

Remove all material maps.

virtual void DXMCALL DX::IDXMesh::ClearVertices (  )  [pure virtual]

Remove all vertices from the mesh. Any faces that reference these vertices will have the appropriate index set to DXMESH_UNASSIGNED_VERTEX.

virtual DXError DXMCALL DX::IDXMesh::CreateSkin ( IDXSkinPtr *  out = 0  )  [pure virtual]

Create a skin on this mesh.

Parameters:
out An optional pointer to an IDXSkinPtr where a pointer to the skin will be stored.
Returns:
Error_Duplicate if a skin already exists on this mesh.
Error_Success if the skin was created.

virtual DXError DXMCALL DX::IDXMesh::DestroySkin (  )  [pure virtual]

Destroy any skin that exists on this mesh.

Returns:
Error_NotFound if there was no skin to destroy on this mesh.
Error_Success if the skin was destroyed.

virtual DXError DXMCALL DX::IDXMesh::GetFace ( uint  index,
IDXFacePtr *  out 
) const [pure virtual]

Get the face at the specified index.

Parameters:
index The index of the face to retrieve.
out A pointer to an IDXFacePtr where the result will be stored.
Returns:
Error_NullParam if out was null.
Error_OutOfRange if index was out of range.
Error_Success if the result was stored in out.

virtual DXError DXMCALL DX::IDXMesh::GetFaces ( IDXFaceArray  out  )  const [pure virtual]

Fill a user allocated array with face data. The user must create and delete this array.

Parameters:
out A pointer to an array of IDXFacePtr of length equal to GetNumFaces
Returns:
Error_NullParam if out was null.
Error_Success if the result was stored in out.

virtual DXError DXMCALL DX::IDXMesh::GetFaces ( uint  start,
uint  count,
IDXFaceArray  out 
) const [pure virtual]

Fill a user allocated array with faces data. The user must create and delete this array. Takes a range from the faces data.

Parameters:
start The inclusive index to start retrieving data from.
count The number of vertices to retrieve.
out An array of IDXFacePtr of at least equal to count.
Returns:
Error_NullParam if out was null.
Error_OutOfRange if start was out of range.
Error_Success if the result was stored in out.

virtual DXError DXMCALL DX::IDXMesh::GetMaterialMap ( uint  index,
uint *  out 
) const [pure virtual]

Get the index of the material map at the specified index.

Parameters:
index The index of the material map to retrieve
out A uint pointer where the index will be stored.
Returns:
Error_NullParam if out was null.
Error_OutOfRange if index was not in range.
Error_Success if the index was output.

virtual uint DXMCALL DX::IDXMesh::GetNumFaces (  )  const [pure virtual]

Get the number of faces in the IDXMesh

Returns:
The number of faces in the mesh.

virtual uint DXMCALL DX::IDXMesh::GetNumMaterialMaps (  )  const [pure virtual]

Get the number of material maps that are on this IDXMesh

virtual uint DXMCALL DX::IDXMesh::GetNumUVChannels (  )  const [pure virtual]

Get the number of uv channels that this mesh has.

Returns:
The number of channels

virtual uint DXMCALL DX::IDXMesh::GetNumVertices (  )  const [pure virtual]

Get the number of vertices that are in the IDXMesh.

Returns:
The number of vertices in the mesh.

virtual DXError DXMCALL DX::IDXMesh::GetSkin ( IDXSkinPtr *  out  )  const [pure virtual]

Get the skin on this mesh.

Parameters:
A pointer to an IDXSkinPtr where the result will be stored.
Returns:
Error_NullParam if out was null.
Error_NotFound if there was no skin on this mesh.
Error_Success if the skin was stored in out.

virtual DXError DXMCALL DX::IDXMesh::GetVertex ( uint  index,
IDXVertexPtr *  out 
) const [pure virtual]

Get the vertex at the specified index.

Parameters:
index The index of the vertex to retrieve.
out A pointer to an IDXVertexPtr which will receive the result.
Returns:
Error_NullParam if out was null.
Error_OutOfRange if index was out of range.
Error_Success if the result was stored in out.

virtual DXError DXMCALL DX::IDXMesh::GetVertices ( IDXVertexArray  out  )  const [pure virtual]

Fill a user allocated array with vertex data. The user must create and delete this array.

Parameters:
out A pointer to an array of IDXVertex of length at least equal to GetNumVertices.
Returns:
Error_NullParam if out was null.
Error_Success if the result was stored in out.

virtual DXError DXMCALL DX::IDXMesh::GetVertices ( uint  start,
uint  count,
IDXVertexArray  out 
) const [pure virtual]

Fill a user allocated array with vertex data. The user must create and delete this array. Takes a range from the vertices data.

Parameters:
start The inclusive index to start retrieving data from.
count The number of vertices to retrieve.
out An array of IDXVertexPtr of at least equal to count.
Returns:
Error_NullParam if out was null.
Error_OutOfRange if start was out of range.
Error_Success if the result was stored in out.

virtual void DXMCALL DX::IDXMesh::Optimize (  )  [pure virtual]

Optimize the mesh for a faster render.

virtual DXError DXMCALL DX::IDXMesh::RemoveFace ( uint  start,
uint  count 
) [pure virtual]

Remove a range of faces.

Parameters:
start The index of the first element to remove.
count The number of elements to remove.
Returns:
Error_OutOfRange if start was out of range.
Error_Success if the range was removed.

virtual DXError DXMCALL DX::IDXMesh::RemoveFace ( uint  index  )  [pure virtual]

Remove the face at the specified index,

Parameters:
index The index of the face to remove.
Returns:
Error_OutOfRange if index was out of range.
Error_Success if the face was removed.

virtual DXError DXMCALL DX::IDXMesh::RemoveFace ( IDXFacePtr  face  )  [pure virtual]

Remove the given face from the mesh.

Parameters:
face An IDXFacePtr to remove from the mesh.
Returns:
Error_NullParam if face was null.
Error_NotFound if the face was not found on this mesh.
Error_Success if the face was removed.

virtual DXError DXMCALL DX::IDXMesh::RemoveMaterialMap ( uint  start,
uint  count 
) [pure virtual]

Remove a range of materials from this mesh's material maps.

Parameters:
start The index of the first element to remove.
count The number of elements to remove.
Returns:
Error_OutOfRange if start was out of range.
Error_Success if the range was removed.

virtual DXError DXMCALL DX::IDXMesh::RemoveMaterialMap ( uint  index  )  [pure virtual]

Remove the material map at the specified index.

Parameters:
index The index of the material map to remove.
Returns:
Error_OutOfRange if index was out of range.
Error_Success if the material was removed.

virtual DXError DXMCALL DX::IDXMesh::RemoveMaterialMap ( IDXMaterialPtr  map  )  [pure virtual]

Remove the specified material from this mesh's material maps.

Parameters:
map The material to remove.
Returns:
Error_NullParam if map was null.
Error_NotFound if there were no instances of map on this mesh.
Error_Success if meterials were removed.

virtual DXError DXMCALL DX::IDXMesh::RemoveMaterialMap ( const char *  materialName  )  [pure virtual]

Remove any material maps with the specified name from this mesh.

Parameters:
materialName The name of the material to remove.
Returns:
Error_NullParam if materialName was null.
Error_NotFound if there were no material maps with this name.
Error_Success if materials matching this name were removed.

virtual DXError DXMCALL DX::IDXMesh::RemoveVertex ( uint  start,
uint  count 
) [pure virtual]

Remove a range of vertices from the mesh. Any faces that reference these vertices will have the appropriate index set to DXMESH_UNASSIGNED_VERTEX.

Parameters:
start The index of the first element to remove.
count The number of elements to remove.
Returns:
Error_OutOfRange if start was out of range.
Error_Success if the range was removed.

virtual DXError DXMCALL DX::IDXMesh::RemoveVertex ( uint  index  )  [pure virtual]

Remove the vertex at the specified index from the mesh. Any faces that reference this vertex will have the appropriate index set to DXMESH_UNASSIGNED_VERTEX.

Parameters:
index The index of the vertex to remove.
Returns:
Error_OutOfRange if index was out of range.
Error_Success if the vertex was removed.

virtual DXError DXMCALL DX::IDXMesh::RemoveVertex ( IDXVertexPtr  vertex  )  [pure virtual]

Remove the specified vertex from the mesh. Any faces that reference this vertex will have the appropriate index set to DXMESH_UNASSIGNED_VERTEX.

Parameters:
vertex The vertex to remove.
Returns:
Error_NullParam if vertex was null.
Error_NotFound if the vertex was not found on the mesh.
Error_Success if the vertex was removed.

virtual DXError DXMCALL DX::IDXMesh::SetMaterialMap ( uint  index,
const char *  materialID 
) [pure virtual]

Set the material map at the specified index.

Parameters:
index The index of the material map to set.
materialID The id of the material to use.
Returns:
Error_NullParam if materialID was null.
Error_OutOfRange if index was out of range.
Error_NotFound if the material was not found on the model.
Error_Success if the material map was updated.

virtual DXError DXMCALL DX::IDXMesh::SetMaterialMap ( uint  index,
IDXMaterialPtr  material 
) [pure virtual]

Set the material map at the specified index.

Parameters:
index The index of the material map to set.
material An IDXMaterialPtr which is the the material to use.
Returns:
Error_NullParam if material was null.
Error_OutOfRange if index was out of range.
Error_NotFound if the material was not found on the model.
Error_Success if the material map was updated.

virtual DXError DXMCALL DX::IDXMesh::SetMaterialMap ( uint  index,
uint  materialIndex 
) [pure virtual]

Set the material map at the specified index.

Parameters:
index The index of the material map to set.
materialIndex The index of the material in the model to use.
Returns:
Error_OutOfRange if index was out of range.
Error_OutOfRange2 if materialIndex was out of range and was not DXMESH_UNASSIGNED_MATERIAL.
Error_Success if the material was updated.

virtual void DXMCALL DX::IDXMesh::SetNumUVChannels ( uint  numChannels  )  [pure virtual]

Set the number of uv channels that this mesh has.

Parameters:
numChannels The number of channels to set this to.


Generated on Wed Jun 17 17:24:51 2009 for DXMesh API by  doxygen 1.5.7.1