Click or drag to resize

UtilIntersectCircleYSphere Method (Double, Vector3, Double)

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.Common
Assembly:  Demo3D.Common (in Demo3D.Common.dll) Version: 15.0.2.11458
Syntax
C#
public static Vector3[] IntersectCircleYSphere(
	double circleRadius,
	Vector3 sphereCenter,
	double sphereRadius
)

Parameters

circleRadius
Type: SystemDouble
Radius of the circle.
sphereCenter
Type: Microsoft.DirectXVector3
Center of the sphere.
sphereRadius
Type: SystemDouble
Radius of the sphere.

Return Value

Type: 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
Equivalent to IntersectCircleSphere(Vector3, Vector3, Double, Vector3, Double) with first two arguments being Origin and YAxis.
See Also