Back to class index
| Triangle::IntersectsSyntaxbool Triangle::Intersects(const LineSegment &lineSegment, float *d=0, float4 *intersectionPoint=0) const; [16 lines of code]bool Triangle::Intersects(const Line &line, float *d=0, float4 *intersectionPoint=0) const; [13 lines of code] bool Triangle::Intersects(const Ray &ray, float *d=0, float4 *intersectionPoint=0) const; [13 lines of code] bool Triangle::Intersects(const Plane &plane) const; [4 lines of code] bool Triangle::Intersects(const Sphere &sphere, float4 *closestPointOnTriangle) const; [9 lines of code] bool Triangle::Intersects(const Sphere &sphere) const; [4 lines of code] bool Triangle::Intersects(const Triangle &triangle, LineSegment *outLine=0) const; [88 lines of code] bool Triangle::Intersects(const AABB &aabb) const; [202 lines of code] bool Triangle::Intersects(const OBB &obb) const; [4 lines of code] bool Triangle::Intersects(const Polygon &polygon) const; [4 lines of code] bool Triangle::Intersects(const Frustum &frustum) const; [4 lines of code] bool Triangle::Intersects(const Polyhedron &polyhedron) const; [4 lines of code] bool Triangle::Intersects(const Capsule &capsule) const; [4 lines of code] Tests whether this triangle 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 triangle, or this triangle is contained inside a sphere, etc.) The Triangle-Line/LineSegment/Ray intersection tests are based on M For Triangle-Sphere intersection code, see Christer Ericson's Real-Time Collision Detection, p.167. The Triangle-Triangle test implementation is based on pseudo-code from Tomas M The AABB-Triangle test implementation is based on the pseudo-code in Christer Ericson's Real-Time Collision Detection, pp. 169-172. It is practically a standard SAT test. Parametersfloat *d [out]If specified, this parameter will receive the parametric distance of the intersection point along the line object. Use the GetPoint(d) function of the line class to get the actual point of intersection. This pointer may be null.float4 *intersectionPoint [out]If specified, receives the actual point of intersection. This pointer may be null.float4 *closestPointOnTriangle [out]If specified, receives the point of intersection between the Sphere and this Triangle. Even if no intersection occurred, this parameter will receive the closest point on the Triangle to the Sphere. This pointer may be null.LineSegment *outLine [out]If specified, receives the line segment of the common points shared by the two intersecting triangles. If the two triangles do not intersect, this pointer is not written to. This pointer may be null. Return ValueTrue if an intersection occurs or one of the objects is contained inside the other, false otherwise. See Also |