Class GridPlane2d
Provides GridForge's 2D XZ-plane projection helpers.
public static class GridPlane2d
- Inheritance
-
GridPlane2d
- Inherited Members
Remarks
In GridForge 2D query APIs, FixedMathSharp.Vector2d.X maps to world X, FixedMathSharp.Vector2d.Y maps to world Z, and the supplied layer maps to world Y.
Methods
FromWorld(Vector3d)
Projects a world-space 3D position into GridForge's 2D XZ plane.
public static Vector2d FromWorld(Vector3d position)
Parameters
positionVector3dThe world-space position to project.
Returns
- Vector2d
A 2D position containing world X and world Z.
ToWorld(Vector2d, Fixed64)
Converts an XZ-plane 2D position into a world-space 3D position.
public static Vector3d ToWorld(Vector2d position, Fixed64 layerY = default)
Parameters
positionVector2dThe 2D position whose X component maps to world X and Y component maps to world Z.
layerYFixed64The world Y layer to apply. Defaults to zero.
Returns
- Vector3d
The equivalent world-space position.
ToWorldBounds(Vector2d, Vector2d, Fixed64)
Converts XZ-plane 2D bounds into layer-locked world-space 3D bounds.
public static (Vector3d min, Vector3d max) ToWorldBounds(Vector2d min, Vector2d max, Fixed64 layerY = default)
Parameters
minVector2dThe 2D minimum bound whose X component maps to world X and Y component maps to world Z.
maxVector2dThe 2D maximum bound whose X component maps to world X and Y component maps to world Z.
layerYFixed64The world Y layer to apply to both bounds. Defaults to zero.