Click or drag to resize
AB4D logo

BaseCameraRect3DTo2D Method

Converts a Rect3D to the Rect 2D on the screen.

Namespace: Ab3d.Cameras
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.2.9104.2045
Syntax
C#
public Rect Rect3DTo2D(
	Rect3D rect3D
)

Parameters

rect3D  Rect3D
Original Rect3D

Return Value

Rect
Rect in the screen coordinates
Remarks

Rect3DTo2D converts a Rect3D to the Rect 2D on the screen.

The matrix to convert 3D points to 2D points is calculated from the used Ab3d.Camera. The matrix value is cached and is only recalculated when the camera is changed.

If the matrix to convert 3D points to 2D points cannot be calculated (for example if TargetViewport3D is not set), the returned Rect will be Empty (Rect.Empty).

See Also