UtilIntersectCircleYSphere(Double, Vector3, Double, Double) Method |
Calculate the intersection points of a circle (centered at
Origin and in the XZ plane) and a sphere surface (using 10^-6 as a tolerance in equality).
Namespace: Demo3D.CommonAssembly: Demo3D.Common (in Demo3D.Common.dll) Version: 19.01.00
Syntaxpublic static Vector3[] IntersectCircleYSphere(
double circleRadius,
Vector3 sphereCenter,
double sphereRadius,
double epsilon
)
Parameters
- circleRadius Double
- Radius of the circle.
- sphereCenter Vector3
- Center of the sphere.
- sphereRadius Double
- Radius of the sphere.
- epsilon Double
- Tolerance for floating point comparisons.
Return Value
Vector3
null meaning no intersections (includes case where circle is contained in the sphere, or circle is completely on the surface),
or a
Vector3[2], containing the two intersections (which could be the same).
Remarks
See Also