Click or drag to resize
AB4D logo

BaseCameraPoint3DTo2D(Point3D) Method

Converts a Point3D to the Point 2D on the screen.

Namespace: Ab3d.Cameras
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public Point Point3DTo2D(
	Point3D point3D
)

Parameters

point3D  Point3D
Original Point3D

Return Value

Point
Point2D in the screen coordinates
Remarks

Point3DTo2D converts a Point3D to the Point 2D on the screen.

The matrix to convert 3D point to 2D point 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 point to 2D point cannot be calculated (for example if TargetViewport3D is not set), the returned point will be Point(double.NaN, double.NaN).

To use Point3DTo2D method without attaching the camera to real Viewport3D you can use Point3DTo2D(Point3D, Size).

See Also