Creates a world ray that starts on the user screen at given coordinates and continues in the direction from the observer.

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

Syntax

C#
public XRay GetViewportWorldRay(
	XViewport viewport,
	int x,
	int y
)

Parameters

viewport
Type: SGP.XSpace..::.XViewport
View that the ray should be created for.
x
Type: System..::.Int32
X coordinate in the view.
y
Type: System..::.Int32
Y coordinate in the view.

Return Value

Returns the newly created ray.

Exceptions

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

See Also