NewtonMeshFirstMaterial

From Newton Wiki
Jump to: navigation, search

NewtonMeshFirstMaterial

int NewtonMeshFirstMaterial (const NewtonMesh* const mesh, void* const handle)

Usage

Returns the first material handle used by the given mesh primitive.

Parameters

  • const NewtonMesh* mesh - pointer to the mesh primitive.

Return

  • The handle of the first material used by the mesh.

Description

Returns the first material handle used by the given mesh primitive.

The function acts like an iterator together with NewtonMeshNextMaterial.

Remarks

  • Added since Newton 2.0
  • To get the graphical material (usually a texture object) corresponding to the mesh material handle use NewtonMeshMaterialGetMaterial

See also

NewtonMeshNextMaterial NewtonMeshMaterialGetMaterial