Click or drag to resize

UtilIntersectRaySphere Method

Intersects a ray with a sphere.

Namespace: Demo3D.Common
Assembly: Demo3D.Common (in Demo3D.Common.dll) Version: 19.01.00
Syntax
C#
public static bool IntersectRaySphere(
	Ray ray,
	BSphere sphere,
	out float distance
)

Parameters

ray  Ray
The ray. Note: The ray's direction must be normalized.
sphere  BSphere
The sphere.
distance  Single
The distance along the ray at which the first point of intersection occurs.

Return Value

Boolean
Whether the ray intersects the sphere.
See Also