 |
SceneViewPoints3DTo2D(Vector3, Vector2, Transform, Boolean, Boolean) Method |
Points3DTo2D calculates 2D screen positions from the specified 3D positions.
To calculate the 2D positions for the final UI element, set the adjustByDpiScale to true otherwise the 2D positions will be positioned inside the view defined by SceneView's
Width and
Height.
Calculated 2D positions are stored into the specified points2D array (its size must be at least the size of the 3D positions).
Namespace: Ab4d.SharpEngineAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.1.9316+94bbd23b55747f096f056a5602f7dd90558b3673
Syntaxpublic bool Points3DTo2D(
Vector3[] points3D,
Vector2[] points2D,
Transform? transform = null,
bool adjustByDpiScale = false,
bool useParallelFor = false
)
Parameters
- points3D Vector3
- array of 3D positions defined as Vector3
- points2D Vector2
- array that will be filled with 2D positions on the screen
- transform Transform (Optional)
- when not null, then transformation is applied to all positions
- adjustByDpiScale Boolean (Optional)
- when true (false by default), then the 2D positions will be adjusted by DPI scale (to get positions on the final UI element)
- useParallelFor Boolean (Optional)
- when true, then Parallel.For loop is used
Return Value
Booleantrue when the calculation was successful, false when the camera is not fully initialized and its matrix is not correct
Remarks[Missing <remarks> documentation for "M:Ab4d.SharpEngine.SceneView.Points3DTo2D(System.Numerics.Vector3[],System.Numerics.Vector2[],Ab4d.SharpEngine.Transformations.Transform,System.Boolean,System.Boolean)"]
See Also