UtilIntersectRaySphere Method |
Intersects a ray with a sphere.
Namespace:
Demo3D.Common
Assembly:
Demo3D.Common (in Demo3D.Common.dll) Version: 15.0.2.11458
Syntaxpublic static bool IntersectRaySphere(
Ray ray,
BSphere sphere,
out float distance
)
Parameters
- ray
- Type: Demo3D.VisualsRay
The ray. Note: The ray's direction must be normalized. - sphere
- Type: Demo3D.VisualsBSphere
The sphere. - distance
- Type: SystemSingle
The distance along the ray at which the first point of intersection occurs.
Return Value
Type:
BooleanWhether the ray intersects the sphere.
See Also