WeatherMakerSphereCreatorRaySphereIntersect Method |
Ray sphere intersect on CPU
Namespace:
DigitalRuby.WeatherMaker
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax public static bool RaySphereIntersect(
Vector3 rayOrigin,
Vector3 rayDir,
float rayLength,
Vector4 spherePosition,
out float intersectAmount,
out float distanceToSphere
)
Public Shared Function RaySphereIntersect (
rayOrigin As Vector3,
rayDir As Vector3,
rayLength As Single,
spherePosition As Vector4,
<OutAttribute> ByRef intersectAmount As Single,
<OutAttribute> ByRef distanceToSphere As Single
) As Boolean
public:
static bool RaySphereIntersect(
Vector3 rayOrigin,
Vector3 rayDir,
float rayLength,
Vector4 spherePosition,
[OutAttribute] float% intersectAmount,
[OutAttribute] float% distanceToSphere
)
static member RaySphereIntersect :
rayOrigin : Vector3 *
rayDir : Vector3 *
rayLength : float32 *
spherePosition : Vector4 *
intersectAmount : float32 byref *
distanceToSphere : float32 byref -> bool
Parameters
- rayOrigin
- Type: Vector3
Ray origin - rayDir
- Type: Vector3
Ray dir - rayLength
- Type: SystemSingle
Ray max length - spherePosition
- Type: Vector4
Sphere center - intersectAmount
- Type: SystemSingle
Receives intersection amount - distanceToSphere
- Type: SystemSingle
Receives distance to sphere
Return Value
Type:
BooleanTrue if hit, false if not
See Also