Table of Contents

Class GridPlane2d

Namespace
GridForge.Spatial
Assembly
GridForge.dll

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

position Vector3d

The 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

position Vector2d

The 2D position whose X component maps to world X and Y component maps to world Z.

layerY Fixed64

The 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

min Vector2d

The 2D minimum bound whose X component maps to world X and Y component maps to world Z.

max Vector2d

The 2D maximum bound whose X component maps to world X and Y component maps to world Z.

layerY Fixed64

The world Y layer to apply to both bounds. Defaults to zero.

Returns

(Vector3d min, Vector3d max)

The equivalent layer-locked world-space bounds.