Click or drag to resize

UtilIntersectPlaneSphere Method

Calculate the intersection circle of a plane and a sphere surface.

Namespace:  Demo3D.Common
Assembly:  Demo3D.Common (in Demo3D.Common.dll) Version: 15.0.2.11458
Syntax
C#
public static bool IntersectPlaneSphere(
	Vector3 pointOnPlane,
	Vector3 planeNormal,
	Vector3 sphereCenter,
	double sphereRadius,
	ref Vector3 intersectCenter,
	ref double intersectRadius
)

Parameters

pointOnPlane
Type: Microsoft.DirectXVector3
Point on the plane.
planeNormal
Type: Microsoft.DirectXVector3
Normal to the plane.
sphereCenter
Type: Microsoft.DirectXVector3
Center of the sphere.
sphereRadius
Type: SystemDouble
Radius of the sphere.
intersectCenter
Type: Microsoft.DirectXVector3
Calculated center of the intersection circle.
intersectRadius
Type: SystemDouble
Calculated radies of the intersection circle.

Return Value

Type: 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