Back to class index
| OBB::IntersectsSyntaxbool OBB::Intersects(const OBB &obb, float epsilon=1e-3f) const; [183 lines of code]bool OBB::Intersects(const AABB &aabb) const; [4 lines of code] bool OBB::Intersects(const Plane &plane) const; [10 lines of code] bool OBB::Intersects(const Ray &ray, float &dNear, float &dFar) const; [6 lines of code] bool OBB::Intersects(const Ray &ray) const; [6 lines of code] bool OBB::Intersects(const Line &line, float &dNear, float &dFar) const; [6 lines of code] bool OBB::Intersects(const Line &line) const; [6 lines of code] bool OBB::Intersects(const LineSegment &lineSegment, float &dNear, float &dFar) const; [6 lines of code] bool OBB::Intersects(const LineSegment &lineSegment) const; [6 lines of code] bool OBB::Intersects(const Sphere &sphere, float4 *closestPointOnOBB=0) const; [11 lines of code] bool OBB::Intersects(const Capsule &capsule) const; [4 lines of code] bool OBB::Intersects(const Triangle &triangle) const; [6 lines of code] bool OBB::Intersects(const Polygon &polygon) const; [4 lines of code] bool OBB::Intersects(const Frustum &frustum) const; [4 lines of code] bool OBB::Intersects(const Polyhedron &polyhedron) const; [4 lines of code] Tests whether this OBB and the given object intersect. Both objects are treated as "solid", meaning that if one of the objects is fully contained inside another, this function still returns true. (e.g. in case a line segment is contained inside this OBB, or this OBB is contained inside a Sphere, etc.) The first parameter of this function specifies the other object to test against. The OBB-OBB intersection test is from Christer Ericson's book Real-Time Collision Detection, p. 101-106. See http://realtimecollisiondetection.net/ The implementation of OBB-Plane intersection test follows Christer Ericson's Real-Time Collision Detection, p. 163. The implementation of the OBB-Sphere intersection test follows Christer Ericson's Real-Time Collision Detection, p. 166. Parametersconst OBB &obbThe other oriented bounding box to test intersection with. floatepsilonThe OBB-OBB test utilizes a SAT test to detect the intersection. A robust implementation requires an epsilon threshold to test that the used axes are not degenerate. float &dNear [out]If specified, receives the parametric distance along the line denoting where the line entered this OBB.float &dFar [out]If specified, receives the parametric distance along the line denoting where the line exited this OBB.float4 *closestPointOnOBB [out]If specified, receives the closest point on this OBB To the given sphere. This pointer may be null. See AlsoWork in progress:Todo: in bool OBB::Intersects(const OBB &obb, float epsilon=1e-3f) const: Add Intersects(Circle/Disc). |