IFXNeighborMesh

The IFXNeighborMesh interface acts as a container class for a neighbor mesh, which provides information about the adjacency of faces, shared vertices, and shared edges.

Note: The default layout is Compact, which uses 16 bytes per face. To compile Neighbor Mesh with the Huge layout (28 bytes per face), define the preprocessor symbol IFX_NEIGHBOR_HUGE.

Use IFXNeighborMeshUtil class to build a neighbor mesh from an IFXMeshGroup.

Interface Method

Description

IFXNeighborMesh

Class constructor

~IFXNeighborMesh

Class destructor

Allocate

Allocates memory for a neighbor mesh in a parallel array fashion, according to the sizes in IFXMeshGroup

Deallocate

Frees memory for neighbor mesh

IsAllocated

Returns TRUE if method successfully called

IsValid

Returns TRUE if neighbor mesh connectivity is current

SetValid

Returns TRUE if the neighbor mesh is current

GetNumMeshes

Returns number of meshes in the attached IFXMeshGroup

GetNeighborFaceArray

Returns a pointer to the array of neighbor faces

GetCornerIter

Gets the lightweight corner iterator for a corner of a face on a mesh

GetFatCornerIter

Gets the general purpose corner iterator for a corner of a face on a mesh


IFXNeighborMesh::IFXNeighborMesh()

Class constructor.

Parameters:

None

Return Values:

None


IFXNeighborMesh::~IFXNeighborMesh()

Class destructor.

Parameters:

None

Return Values:

None


IFXNeighborMesh::Allocate(IFXMeshGroup* pMeshGroup)

Allocates memory for a neighbor mesh in a parallel array fashion, according to the sizes in IFXMeshGroup.

Parameters:

pMeshGroup

Pointer to an IFXMeshGroup

Return Values


IFXNeighborMesh::Deallocate()

Frees memory for neighbor mesh.

Parameters:

None

Return Values:

None


IFXNeighborMesh::IsAllocated()

Returns TRUE if Allocate() has been successfully called.

Parameters:

None

Return Values:

BOOL


IFXNeighborMesh::IsValid()

Returns TRUE if neighbor mesh connectivity is current or FALSE if the neighbor mesh connectivity does not match the connectivity in the IFXMeshGroup.

Parameters:

None

Return Values:

BOOL


IFXNeighborMesh::SetValid( BOOL state)

Returns TRUE if the neighbor mesh is current, or FALSE if a mesh was added/deleted from IFXMeshGroup, or if an associated IFXMesh has had a change in connectivity (faces have been changed/added/deleted).

Parameters:

state

Returns TRUE or FALSE

Return Values:

None


IFXNeighborMesh::GetNumMeshes()

Returns number of meshes (partitions) in attached IFXMeshGroup. Returns 0 if Allocate() has not been called.

Parameters:

None

Return Values:

U32


IFXNeighborMesh::GetNeighborFaceArray( U32 meshIndex)

Returns a pointer to the array of neighbor faces.This is used to perform an operation that requires iterating through all the neighbor faces. An example of this is initializing the neighbor links.

Allocate must have been successfully called before this method is used. Call GetNumMeshes() to determine maximum meshIndex. Call GetNumFaces() from the associated IFXMesh to determine the maximum index into the IFXNeighborFace array.

Parameters:

state

Returns TRUE or FALSE

Return Values:

IFXNeighborFace*


IFXNeighborMesh::GetCornerIter(U32 meshIndex, U32 faceIndex, U32 cornerIndex, IFXCornerIter* pCornerIter)

Gets the lightweight corner iterator for a corner of a face on a mesh. The corner iterator is used for moving from one face to its neighbor faces. Call GetNumMeshes() to determine maximum meshIndex.

Parameters:

meshIndex

Mesh number

faceIndex

Face number

cornerIndex

Corner number

pCornerIter

Pointer to a corner iterator

Return Values:

None


IFXNeighborMesh::GetFatCornerIter(U32 textureLayer, U32 meshIndex, U32 faceIndex, U32 cornerIndex, IFXFatCornerIter* pCornerIter)

Gets the general purpose corner iterator for a corner of a face on a mesh. This iterator provides methods that access face and vertex attribute information on the mesh. For performance reasons, specify which texture layer you want access to. Call GetNumMeshes() to determine maximum meshIndex.

Parameters:

textureLayer

Layer number

meshIndex

Mesh number

faceIndex

Face number

cornerIndex

Corner number

pCornerIter

Pointer to a corner iterator

Return Values:

None

 

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