NewtonMeshCreateFromCollision

From Newton Wiki
Jump to: navigation, search

NewtonMeshCreateFromCollision


 NewtonMesh* NewtonMeshCreateFromCollision (const NewtonCollision* collision);

Usage

Creates a mesh primitive from collision geometry.

Parameters

  • const NewtonCollision* collision - is the pointer to the collision primitive of whose geometry will be stored in the mesh primitive.

Return

  • Pointer to the mesh primitive.

Description

Creates a mesh primitive from collision geometry. Meshes represent generic geometric objects.

In Newton mesh primitives accomplish the goal to exchange geometry data between the physics sub-system and the rendering sub-system. Mesh primitives contain vertex and index streams. For vertices not just the position is stored in this object but also vertex normals and UV texture coordinates.

This function is eventually useful to convert the stored geometry of the collision in an object that can be used to transfer collision data to the rendering engine.

Remarks

  • Added in Newton 2.0

See also

NewtonMeshCreate NewtonMeshDestroy