Creates the ray and performs the intersection with the 3D world.

Namespace:  SGP.XSpace
Assembly:  SGPRTL (in SGPRTL.dll)
Version: 1.2.3019.18825

Syntax

C#
public Vector3 RayIntersect(
	XSprite origin,
	Vector3 direction,
	out XSprite sprite,
	out float distance
)

Parameters

origin
Type: SGP.XSpace..::.XSprite
The XSprite sprite defines the world coordinate of the ray origin.
direction
Type: Vector3
The ray direction Vector3 vector .
sprite
Type: SGP.XSpace..::.XSprite %
Returns the first XSprite sprite that the ray intersected.
distance
Type: System..::.Single %
Returns the distance of the sprite sprite intersection from the observer.

Return Value

Returns the coordinates that the ray was pointed to.

Exceptions

ExceptionCondition
System..::.ArgumentNullException origin is nullNothingnullptra null reference (Nothing in Visual Basic).

See Also