NewtonTreeCollisionGetVertexListTriangleListInAABB

From Newton Wiki
Jump to: navigation, search

NewtonTreeCollisionGetVertexListTriangleListInAABB

int NewtonTreeCollisionGetVertexListTriangleListInAABB (const NewtonCollision* const treeCollision, const dFloat* const p0, const dFloat* const p1, const dFloat** const vertexArray, int* const vertexCount, int* const vertexStrideInBytes, const int* const indexList, int maxIndexCount, const int* const faceAttribute)

Usage

collect the vertex list index list mesh intersecting the AABB in collision mesh.

Parameters

  • const NewtonCollision* const treeCollision
  • const dFloat* const p0
  • const dFloat* const p1
  • const dFloat** const vertexArray
  • int* const vertexCount
  • int* const vertexStrideInBytes
  • const int* const indexList
  • int maxIndexCount
  • const int* const faceAttribute

Return

  • int

Description

  • indexList should be a list 3 * maxIndexCount the number of elements.
  • faceAttributet should be a list maxIndexCount the number of elements.
  • this function could be used by the application for many purposes.
  • for example it can be used to draw the collision geometry intersecting a collision primitive instead
  • of drawing the entire collision tree in debug mode.
  • Another use for this function is to to efficient draw projective texture shadows.

See also