Back to class index
| OBB::DistanceSyntaxfloat OBB::Distance(const float4 &point) const; [7 lines of code]float OBB::Distance(const Sphere &sphere) const; [4 lines of code] Computes the distance between this OBB and the given object. This function finds the nearest pair of points on this and the given object, and computes their distance. If the two objects intersect, or one object is contained inside the other, the returned distance is zero. See AlsoWork in progress:Todo: in float OBB::Distance(const float4 &point) const: Add OBB::Distance(Line/Ray/LineSegment/Plane/Triangle/Polygon/Circle/Disc/AABB/OBB/Capsule/Frustum/Polyhedron). Todo: in float OBB::Distance(const float4 &point) const: This code can be optimized a bit. See Christer Ericson's Real-Time Collision Detection, p.134. |