Back to class index
| Plane::IntersectsSyntaxbool Plane::Intersects(const Plane &plane, const Plane &plane2, Line *outLine=0, float4 *outPoint=0) const; [45 lines of code]Computes the intersection of three planes. This function computes the intersection of this plane, and the given two planes. ParametersLine *outLine [out]If the three planes are configured in such a manner that intersection is a line, this parameter receives the line of intersection. This pointer may be null.float4 *outPoint [out]If the three planes are configured in such a manner that the interesction is a point, this parameter receives the point of intersection. This pointer may be null. Return ValueTrue if the intersection was a point, in which case outPoint is written to. See AlsoWork in progress:Bug: in bool Plane::Intersects(const Plane &plane, const Plane &plane2, Line *outLine=0, float4 *outPoint=0) const: This function never outputs outLine. Syntaxbool Plane::Intersects(const Plane &plane, Line *outLine=0) const; [26 lines of code]bool Plane::Intersects(const Ray &ray, float *d=0) const; [8 lines of code] bool Plane::Intersects(const Line &line, float *d=0) const; [8 lines of code] bool Plane::Intersects(const LineSegment &lineSegment, float *d=0) const; [9 lines of code] bool Plane::Intersects(const Sphere &sphere) const; [4 lines of code] bool Plane::Intersects(const AABB &aabb) const; [12 lines of code] bool Plane::Intersects(const OBB &obb) const; [4 lines of code] bool Plane::Intersects(const Polygon &polygon) const; [4 lines of code] bool Plane::Intersects(const Polyhedron &polyhedron) const; [10 lines of code] bool Plane::Intersects(const Triangle &triangle) const; [7 lines of code] bool Plane::Intersects(const Frustum &frustum) const; [8 lines of code] bool Plane::Intersects(const Capsule &capsule) const; [4 lines of code] Tests whether this plane and the given object intersect. The Plane-AABB intersection is implemented according to Christer Ericson's Real-Time Collision Detection, p.164. ParametersLine *outLine [out]The intersection of two planes forms a line. If an intersection occurs, this parameter will receive the line of intersection. This pointer may be null.float *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. Return ValueTrue if the given object intersects with this plane. Work in progress:Todo: in bool Plane::Intersects(const AABB &aabb) const: Use the above form when Plane is SSE'ized. Todo: in bool Plane::Intersects(const Triangle &triangle) const: Add a version of Plane-Triangle intersection which returns the line segment of intersection. Syntaxint Plane::Intersects(const Circle &circle, float4 *pt1, float4 *pt2) const; [21 lines of code]int Plane::Intersects(const Circle &circle) const; [4 lines of code] Tests if this plane intersects with the given circle. Parametersfloat4 *pt1 [out]If specified, receives the first point of intersection. This pointer may be null.float4 *pt2 [out]If specified, receives the second point of intersection. This pointer may be null. Return ValueThe number of intersections that occurred: 0, 1 or 2. |