NewtonTreeCollisionSetFaceAttribute

From Newton Wiki
Revision as of 08:02, 10 June 2019 by Unknown user (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NewtonTreeCollisionSetFaceAttribute

void NewtonTreeCollisionSetFaceAttribute (const NewtonCollision* const treeCollision, const int* const faceIndexArray, int indexCount, int attribute)

Usage

Change the user defined collision attribute stored with faces of the collision mesh.

Parameters

  • const NewtonCollision* const treeCollision
  • const int* const faceIndexArray - pointer to the face index list passed to the function NewtonTreeCollisionCallback userCallback
  • int indexCount
  • int attribute - value of the user defined attribute to be stored with the face.

Return

  • (Procedure)

Description

  • This function is used to obtain the user data stored in faces of the collision geometry.
  • The application can use this user data to achieve per polygon material behavior in large static collision meshes.
  • By changing the value of this user data the application can achieve modifiable surface behavior with the collision geometry.
  • For example, in a driving game, the surface of a polygon that represents the street can changed from pavement to oily or wet after
  • some collision event occurs.

See also

NewtonTreeCollisionGetFaceAttribute NewtonCreateTreeCollision