Difference between revisions of "NewtonTreeCollisionSetFaceAttribute"

From Newton Wiki
Jump to: navigation, search
m (1 revision imported)
(No difference)

Latest revision as of 08:02, 10 June 2019


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


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


  • 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.


  • (Procedure)


  • 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