UtilIntersectRaySphere Method |
Intersects a ray with a sphere.
Namespace: Demo3D.CommonAssembly: Demo3D.Common (in Demo3D.Common.dll) Version: 19.01.00
Syntaxpublic 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
BooleanWhether the ray intersects the sphere.
See Also