Back to class index
| OBB::ExtremePointsAlongDirectionSyntaxvoid OBB::ExtremePointsAlongDirection(const float4 &dir, const float4 *pointArray, int numPoints, int &idxSmallest, int &idxLargest); [28 lines of code]Finds the two extreme points along the given direction vector from the given point array. See Christer Ericson's book Real-Time Collision Detection, page 83. Parametersconst float4 &dirThe direction vector to project the point array to. This vector does not need to be normalized. const float4 *pointArray [in]The list of points to process.intnumPointsThe number of elements in pointArray. int &idxSmallest [out]The index of the smallest point along the given direction will be received here. This pointer may be left null, if this information is of no interest.int &idxLargest [out]The index of the largest point along the given direction will be received here. This pointer may be left null, if this information is of no interest. |