UtilIntersectPlaneSphere Method |
Calculate the intersection circle of a plane and a sphere surface.
Namespace: Demo3D.CommonAssembly: Demo3D.Common (in Demo3D.Common.dll) Version: 19.01.00
Syntaxpublic static bool IntersectPlaneSphere(
Vector3 pointOnPlane,
Vector3 planeNormal,
Vector3 sphereCenter,
double sphereRadius,
ref Vector3 intersectCenter,
ref double intersectRadius
)
Parameters
- pointOnPlane Vector3
- Point on the plane.
- planeNormal Vector3
- Normal to the plane.
- sphereCenter Vector3
- Center of the sphere.
- sphereRadius Double
- Radius of the sphere.
- intersectCenter Vector3
- Calculated center of the intersection circle.
- intersectRadius Double
- Calculated radies of the intersection circle.
Return Value
Boolean
false if no intersection, true if intersection.
intersectCenter and
intersectRadius are only set if true is returned.
Note, the intersection circle may have zero radius, meaning the plane just touches the
sphere surface.
See Also