IFXAuthorMesh

This class offers an authoring view, as opposed to a run-time view, of a 3-D mesh. This structure is easy to manipulate because it can contain faces that reference multiple materials and has vertex positions on material or attribute boundaries that are not replicated. As a result, this structure is not efficient for rendering until it is compiled into an IFXMesh structure.

Methods

Allocate

Allocates all memory required by the mesh

Deallocate

Releases allocated memory

GetAllocationDescriptor

Gets the allocation descriptor

GetNumFaces

Returns the current number of faces in the mesh

SetNumFaces

Sets the current number of faces in the mesh and returns the number once set

GetFace

Sets an IFXAuthorFace structure to point to a specific face in the mesh

GetNumberOfShaders

Returns the current number of shaders

GetNumPositions

Returns the current number of vertices in the mesh

SetNumPositions

Sets the current number of vertices in the mesh and returns the number once set

GetPosition

Returns a pointer to an IFXVector3 in the mesh that stores a position

GetNumNormals

Returns the current number of normals in the mesh

SetNumNormals

Returns the current number of normals in the mesh and returns the number once set

GetNormal

Returns a pointer to an IFXVector3 in the mesh that stores a normal

GetNumVertexColorLayers

Returns the current number of vertex color layers in the mesh

GetNumVertexColors

Returns the current number of vertex colors in the mesh

SetNumVertexColors

Sets the current number of vertex colors in the mesh

GetVertexColor

Returns a pointer to an IFXVector4 in the mesh that stores a vertex color

GetNumTexLayers

Returns the current number of texture color layers in the mesh

GetNumTexCoords

Returns the current number of texture coordinates

SetNumTexCoords

Sets the current number of texture coordinates

GetTexCoords

Returns a pointer to an IFXVector2 in the mesh that stores a texture coordinate

GetNumGenericVertexAttributes

Returns the number of user-defined vertex attributes in the mesh

SetNumGenericVertexAttributes

Sets the current number of user-defined vertex attributes in the mesh and returns the number once set

GetGenericVertexAttribute

Returns a pointer to an IFXGenericAttribute in the mesh that stores an attribute

GetNumGenericFaceAttributes

Returns the current number of user-defined face attributes in the mesh

SetNumGenericFaceAttributes

Sets the current number of user-defined face attributes in the mesh and returns the number once set

GetGenericFaceAttribute

Returns a pointer to an IFXGenericAttribute in the mesh that stores an attribute

GetUVMap

Returns IFXUVMap which stores the vertex map

SetUVMap

Sets IFXUVMap which stores the vertex map

GetBaseVertex

Returns whether there is a base vertex

SetBaseVertex

Sets a base vertex when there is one

GetNumBaseVertices

Returns the number of base vertices

SetVertexWeightCount

Sets the vertex weight count

SetVertexWeight

Sets the vertex weight value

GetVertexWeightCount

Returns the vertex weight count

GetVertexWeights

Returns the vertex weight value

GetName

Gets the name of the mesh

SetName

Sets the name of the mesh

GetParentName

Gets the name of parent mesh

SetPartentName

Sets the name of the parent mesh


IFXAuthorMesh::Allocate(IFXAuthorAllocationDescriptor *pAllocDescriptor)

This method allocates all memory required by the mesh.

Parameters:

pAllocDescriptor

Pointer to the IFXAuthorAllocationDescriptor

Return Values

Comments:

Must be called after construction and prior to mesh usage.


IFXAuthorMesh::Deallocate()

This method frees all allocated memory. Called automatically by IFXAuthorMesh::Release(). Can be called to facilitate a reallocation prior to a send call to IFXAuthorMesh::Allocate().

Parameters:

None

Return Values


IFXAuthorMesh::GetAllocationDescriptor(IFXAuthorAllocationDescriptor *pAllocDescriptor)

This method accesses the IFXAuthorAllocationDescriptor.

Parameters:

pAllocDescriptor

Pointer to the IFXAuthorAllocationDescriptor

Return Values:

None


IFXAuthorMesh::GetNumFaces()

This method returns the current number of faces in the mesh.

Parameters:

None

Return Values:

IFXAuthorGeomIndex (Either U16 or U32 depending on compile flags.)


IFXAuthorMesh::SetNumFaces(U32 numberFaces)

This method sets the current number of faces in the mesh and returns the number once set. Note that IFXAuthorGeomIndex is either U16 or U32 depending on compile flags.

Parameters:

U32 numberFaces

Current number of faces

Return Values:

IFXAuthorGeomIndex


IFXAuthorMesh::GetFace(U32 index, IFXAuthorFace *pFace)

This method sets an IFXAuthorFace structure to point to a specific face in the mesh. This method must be called for each face to be accessed. This method can be used for getting and setting the face.

Parameters:

U32 index

Index of the specific face

IFXAuthorFace pFace

Pointer to the IFXAuthorFace

Return Values


IFXAuthorMesh::GetNumberOfShaders()

This method returns the number of shaders associated with the mesh.

Parameters:

None

Return Values:

Integer


IFXAuthorMesh::GetNumPositions()

This method returns the current position of vertices in the mesh.

Parameters:

None

Return Values:

IFXAuthorGeomIndex (either U16 or U32 depending on compile flags.)


IFXAuthorMesh::SetNumPositions(U32 numberVertices)

This method sets the current number of vertices in the mesh and returns the number once set. Note that IFXAuthorGeomIndex is either U16 or U32 depending on compile flags.

Parameters:

U32 numberVertices

Current number of vertices

Return Values:

IFXAuthorGeomIndex (either U16 or U32 depending on compile flags.)


IFXAuthorMesh::GetPosition(U32 index)

This method returns a pointer to an IFXVector3 in the mesh that stores a position. GetPosition() must be called for each position to be accessed. This method can be used for getting and setting the position.

Parameters:

U32 index

Index of the specific vertex

Return Values:

IFXVector3*


IFXAuthorMesh::GetNumNormals()

This method returns the current position of normals in the mesh.

Parameters:

None

Return Values:

IFXAuthorGeomIndex (either U16 or U32 depending on compile flags.)


IFXAuthorMesh::SetNumNormals(U32 numberVertices)

This method sets the current number of normals in the mesh and returns the number once set. IFXAuthorGeomIndex is either U16 or U32 depending on compile flags.

Parameters:

U32 numberVertices

Current number of vertices

Return Values:

IFXAuthorGeomIndex (either U16 or U32 depending on compile flags.)


IFXAuthorMesh::GetNormal(U32 index)

This method returns a pointer to an IFXVector3 in the mesh that stores a normal. GetNormal() must be called for each normal to be accessed. This method can be used for getting and setting the normal.

Parameters:

U32 index

Index of the specific vertex

Return Values:

IFXVector3*


IFXAuthorMesh::GetNumVertexColorLayers()

This method returns the current number of vertex color layers in the mesh.

Parameters:

None

Return Values:

Integer


IFXAuthorMesh::GetNumVertexColors(U32 layerNum = 0)

This method returns the current number of vertex colors in the mesh.

Parameters:

U32 LayerNum=0

Defaults to layer 0 if no layer is specified

Return Values:

IFXAuthorGeomIndex


IFXAuthorMesh::SetNumVertexColors(U32 numberVertices, U32 layerNum = 0)

This method sets the current number of vertex colors in the mesh and returns the number once set.

Parameters:

U32 numberVertices

Current number of vertices

U32 LayerNum=0

Defaults to layer 0 if no layer is specified

Return Values:

IFXAuthorGeomIndex


IFXAuthorMesh::GetVertexColor(U32 index, U32 layerNum = 0)

This method returns a pointer to an IFXVector4 in the mesh that stores a vertex color. GetVertexColor() must be called for each color to be accessed. This method can be used for getting and setting the vertex color.

Parameters:

U32 index

Index of the specific normal

U32 LayerNum=0

Defaults to layer 0 if no layer is specified

Return Values:

IFXVector4*


IFXAuthorMesh::GetNumTexLayers()

This method returns the current number of texture color layers in the mesh.

Parameters:

None

Return Values:

Integer


IFXAuthorMesh::GetNumTexCoords(U32 layerNum = 0)

This method returns the current number of texture coordinates in the mesh.

Parameters:

U32 LayerNum=0

Defaults to layer 0 if no layer is specified

Return Values:

IFXAuthorGeomIndex


IFXAuthorMesh::SetNumTexCoords(U32 numberVertices, U32 layerNum=0)

This method sets the current number of texture coordinates in the mesh and returns the number once set.

Parameters:

U32 numberVertices

Current number of vertices

U32 LayerNum=0

Defaults to layer 0 if no layer is specified

Return Values:

IFXAuthorGeomIndex


IFXAuthorMesh::GetTexCoord(U32 index, U32 layerNum=0)

This method returns a pointer to an IFXVector2 in the mesh that stores a texture coordinate. GetTexCoord()must be called for each texture coordinate to be accessed. This method can be used for getting and setting the texture coordinates.

Parameters:

U32 index

Index of the specific normal

U32 LayerNum=0

Defaults to layer 0 if no layer is specified

Return Values:

IFXVector2*


IFXAuthorMesh::GetNumGenericVertexAttributes()

This method returns the number of user-defined vertex attributes in the mesh.

Return Values:

IFXAuthorGeomIndex


IFXAuthorMesh::SetNumGenericVertexAttributes (U32 numAttribs)

This method sets the current number of user-defined vertex attributes in the mesh and returns the number once set.

Parameters:

U32 numAttribs

Current number of attributes

Return Values:

IFXAuthorGeomIndex


IFXAuthorMesh::GetGenericVertexAttribute(U32 index)

This method returns a pointer to an IFXGenericAttribute in the mesh that stores an attribute. GetGenericVertexAttribute() must be called for each attribute to be accessed. This method can be used for getting and setting the vertex attributes.

Parameters:

U32 index

Index of the specific attribute

Return Values:

IFXGenericAttribute*


IFXAuthorMesh::GetNumGenericFaceAttributes()

This method returns the number of user-defined face attributes in the mesh.

Return Values:

IFXAuthorGeomIndex


IFXAuthorMesh::SetNumGenericFaceAttributes ()

This method sets the current number of user-defined face attributes in the mesh and returns the number once set.

Parameters:

U32 numAttribs

Current number of attributes

Return Values:

IFXAuthorGeomIndex


IFXAuthorMesh::GetGenericFaceAttribute(U32 index)

This method returns a pointer to an IFXGenericAttribute in the mesh that stores an attribute. GetGenericFaceAttribute() must be called for each attribute to be accessed. This method can be used for getting and setting the face attributes.

Parameters:

U32 index

Index of the specific attribute

Return Values:

IFXGenericFaceAttribute*


IFXAuthorMesh::GetUVMap(U32 layerNum)

This method returns a pointer to the IFXUVMap which stores the vertex map. GetUVMap() must be called.

Parameters:

U32 layerNum

The layer number

Return Values:

IFXUVMap*


IFXAuthorMesh::SetUVMap(U32 layerNum)

This method sets the IFXUVMap to point to a specific Vertex Map.

Parameters:

U32 index

Index of the specific vertex map

IFXUVMap *pUVMap

Pointer to the IFX Vertex Map

Return Values:

IFXUVMap*


IFXAuthorMesh::SetBaseVertex(U32 index, bool in_base)

This method sets the base vertex.

Parameters:

U32 index

Index of the specific base vertex

in_base

The base vertex provided it exists in the mesh

Return Values


IFXAuthorMesh::GetBaseVertex(U32 index)

This method gets the base vertex.

Parameters:

U32 index

Index of the specific base vertex

Return Values:

BOOL


IFXAuthorMesh::GetNumBaseVertices()

This method returns the number of base vertices.

Parameters:

None

Return Values:

Integer


IFXAuthorMesh::SetVertexWeightCount(U32 in_PositionIndex, U32 in_Cnt)

This method sets the vertex weight count.

Parameters:

in_PositionIndex

Index of the specific vertex weight

in_Cnt

The vertex weight count

Return Values


IFXAuthorMesh::SetVertexWeight(U32 in_PositionIndex, U32 in_WghtIdx, U32 in_BoneID, F32 in_Weight)

This method sets the vertex weight.

Parameters:

in_PositionIndex

Index of the specific vertex weight

in_WghtIdx

Weight index number

in_BoneID

Bone ID number

in_Weight

Vertex weight amount

Return Values


IFXAuthorMesh::GetVertexWeightCount(U32 in_PositionIndex)

This method returns the vertex weight count.

Parameters:

in_PositionIndex

Index of the specific vertex weight

Return Values:

Integer


IFXAuthorMesh::GetVertexWeight(U32 in_PositionIndex, U32 in_ArraySize, U32* out_BoneIDs, F32 out_Weights)

This method returns the vertex weight.

Parameters:

in_PositionIndex

Index of the specific vertex weight

in_ArraySize

Array size

out_BoneIDs

Bone ID number

out_Weights

Vertex weight amount

Return Values


IFXAuthorMesh::GetName()

This method returns the name of the mesh.

Parameters:

None

Return Values:

CIFXString


IFXAuthorMesh::SetName(CIFXString *pMeshName)

This method sets the name of the mesh.

Parameters:

pMeshName

Pointer to the name string of the mesh

Return Values:

None


IFXAuthorMesh::GetParentName()

This method returns the parent name of the mesh.

Parameters:

None

Return Values:

CIFXString


IFXAuthorMesh::SetParentName(CIFXString *pMeshName)

This method sets the parent name of the mesh.

Parameters:

pMeshName

Pointer to the name string of the mesh

Return Values:

None

 

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