Microsoft DirectX 8.1 (Visual Basic)

D3DX8.ValidMesh

Validates a mesh.

object.ValidMesh( _ 
    MeshIn As D3DXMesh, _ 
    Adjacency As Long) As Boolean

Parts

object
Object expression that resolves to a D3DX8 object.
MeshIn
D3DXMesh object representing the mesh to tessellate.
Adjacency
First element of an array of three Long values per face that specify the three neighbors for each face in the source mesh.

Return Values

Returns 1 if the mesh is valid; otherwise returns 0.

Error Codes

If the method fails, an error is raised and Err.Number can be set to one of the following values.

D3DERR_INVALIDCALL
D3DXERR_INVALIDDATA
D3DXERR_INVALIDMESH
E_OUTOFMEMORY

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

The following code fragment shows how to use a D3DXBuffer object to pass adjacency information.

Dim Mesh As D3DXMesh
Dim D3DXbAdjacency As D3DXBuffer

' This code fragment assumes that all arguments
' have been properly initialized.
Call D3DX8.GeneratePMesh(Mesh, ByVal D3DXbAdjacency.GetBufferPointer)