NewtonCreateCompoundCollisionFromMesh

From Newton Wiki
Jump to: navigation, search

NewtonCreateCompoundCollisionFromMesh

 NewtonCollision* NewtonCreateCompoundCollisionFromMesh (const NewtonWorld* newtonWorld, const NewtonMesh* mesh, dFloat concavity, int maxShapeCount);

Usage

Creates a compound collision from a mesh primitive.

Parameters

  • const NewtonWorld* newtonWorld - pointer to the Newton world.
  • const NewtonMesh* mesh - pointer to the mesh used as input.
  • dFloat hullTolerance - ?
  • int shapeID
  • int subShapeID - ?

Return

  • The generated compound collision.

Description

  • The algorithm will separated the the original mesh into a series of sub meshes until either the worse concave point is smaller than the specified min concavity or the max number convex shapes is reached.
  • It is recommended that convex approximation are made by person with a graphics toll by physically overlaying collision primitives over the concave mesh, but for quick test of maybe for simple meshes and algorithm approximations can be used.
  • It is also recommended that for best performance this function is used in an off-line toll and serialized output is used.

Remarks

Added since Newton 2.0

See also

NewtonCreateConvexHullFromMesh NewtonCreateCompoundCollision