Difference between revisions of "NewtonTreeCollisionGetVertexListTriangleListInAABB"

From Newton Wiki
Jump to: navigation, search
m (1 revision imported)
Line 20: Line 20:
  
 
== Return ==
 
== Return ==
* int
+
* int - number of faces
 +
* vertexStrideInBytes - gets filled with a value telling you the stride between vertexarray vertices (12 bytes)
 +
* vertexArray - here you receive a pointer to array of vertexes in newton memory (data is not copied to your buffer, here you receive pointer to newton's data)
 +
* faceAttribute and indexList get filled with data constructing the faces, returned geometry is always returned as triangles (3 indexes per face, and 1 faceattribute per face).
  
 
== Description ==
 
== Description ==
 
* indexList should be a list 3 * maxIndexCount the number of elements.
 
* indexList should be a list 3 * maxIndexCount the number of elements.
 
* faceAttributet should be a list 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.
+
* 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.
* 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 ==
 
== See also ==

Revision as of 07:55, 13 April 2020

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 - number of faces
  • vertexStrideInBytes - gets filled with a value telling you the stride between vertexarray vertices (12 bytes)
  • vertexArray - here you receive a pointer to array of vertexes in newton memory (data is not copied to your buffer, here you receive pointer to newton's data)
  • faceAttribute and indexList get filled with data constructing the faces, returned geometry is always returned as triangles (3 indexes per face, and 1 faceattribute per face).

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