From Newton Wiki
Jump to: navigation, search

Shape ID is a custom user-defined identifier added to each newton collision.

This can be assigned to whole bodies, or individual faces in trimesh, or individual parts of compound collision.

This identificator can be later obtained for example while iterating contacts and can be used to distinguish between different parts of shapes.

For example a compound collision has different parts, and you trimesh might have faces which collide with shapes, but otherwise pass thru bullet raycasts (glass) - with ShapeID you can filter this accordingly.

See: NewtonCreateCylinder, NewtonCreateBox, NewtonCreateConvexHull ,NewtonCreateCapsule, NewtonCreateTreeCollision, NewtonCreateUserMeshCollision, NewtonWorldRayFilterCallback, NewtonCreateCompoundCollision, NewtonCreateCompoundCollisionFromMesh, NewtonCreateConvexHullFromMesh, NewtonCreateHeightFieldCollision, NewtonCreateSceneCollision, NewtonMaterialGetBodyCollidingShape