NewtonCollisionCalculateAABB

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

NewtonCollisionCalculateAABB

void NewtonCollisionCalculateAABB( const NewtonCollision* collisionPtr, const dFloat *offsetMatrix, dFloat *p0, dFloat* p1)

Usage

Returns a axis-aligned bounding box for this collision that the newton uses internally, the box is calculated relative to offsetMatrix and is not a precise AABB. The returned AABB will not take the scaling of a convex hull modifier into account, if you need that then use NewtonCollisionSupportVertex.

Limits

The aabb is newton is an optimal aabb for physics collision it is not a tight AABB around the shape.
If you want a tight and precise aabb then use funtion NewtonCollisionSupportVertex instead. For example see: 
http://newtondynamics.com/forum/viewtopic.php?f=12&t=5509#p39550

Parameters

  • const NewtonCollision *collisionPtr - pointer to the collision object.
  • const dFloat *offsetMatrix - pointer to the first element of an array of 16 floats containing the offset matrix used as the coordinate system and center of the AABB.
  • dFloat *p0 - pointer to the first element of an array of at least three floats to hold minimum value for the AABB.
  • dFloat *p1 - pointer to the first element of an array of at least three floats to hold maximum value for the AABB.

Return

  • Nothing.

See also

NewtonCollisionClosestPoint NewtonCollisionPointDistance NewtonCollisionCollide NewtonCollisionRayCast