Back to class index
| Sphere::IntersectsSyntaxint Sphere::Intersects(const LineSegment &lineSegment, float4 *intersectionPoint=0, float4 *intersectionNormal=0, float *d=0, float *d2=0) const; [23 lines of code]int Sphere::Intersects(const Line &line, float4 *intersectionPoint=0, float4 *intersectionNormal=0, float *d=0, float *d2=0) const; [19 lines of code] int Sphere::Intersects(const Ray &ray, float4 *intersectionPoint=0, float4 *intersectionNormal=0, float *d=0, float *d2=0) const; [26 lines of code] bool Sphere::Intersects(const Plane &plane) const; [4 lines of code] bool Sphere::Intersects(const AABB &aabb, float4 *closestPointOnAABB=0) const; [4 lines of code] bool Sphere::Intersects(const OBB &obb, float4 *closestPointOnOBB=0) const; [4 lines of code] bool Sphere::Intersects(const Triangle &triangle, float4 *closestPointOnTriangle=0) const; [4 lines of code] bool Sphere::Intersects(const Capsule &capsule) const; [4 lines of code] bool Sphere::Intersects(const Polygon &polygon) const; [4 lines of code] bool Sphere::Intersects(const Frustum &frustum) const; [4 lines of code] bool Sphere::Intersects(const Polyhedron &polyhedron) const; [4 lines of code] bool Sphere::Intersects(const Sphere &sphere) const; [4 lines of code] Tests whether this sphere 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 sphere, or this sphere is contained inside a polyhedron, etc.) Parametersfloat4 *intersectionPoint [out]If specified, receives the actual point of intersection. This pointer may be null.float4 *intersectionNormal [out]If specified, receives the sphere normal at the point of intersection. This pointer may be null.float *d [out]If specified, receives the distance along the Line/LineSegment/Ray to the intersection. This pointer may be null. Return ValueIn the case of Ray/Line/LineSegment intersection tests, the number of intersections is returned (0, 1 or 2). For other functions, true is returned if an intersection occurs or one of the objects is contained inside the other, and false otherwise. See Also |