Class MeshPrismGrid
Represents a 3d grid, where each cell is an extrusion of a face along the normals, offset to a given height.
Inheritance
MeshPrismGrid
Assembly: Sylves.dll
Syntax
public class MeshPrismGrid : MeshGrid, IGrid
Constructors
MeshPrismGrid(MeshData, MeshPrismGridOptions)
Declaration
public MeshPrismGrid(MeshData meshData, MeshPrismGridOptions meshPrismOptions)
Parameters
Properties
Unbounded
Returns the grid with any bounds removed.
Declaration
public override IGrid Unbounded { get; }
Property Value
Overrides
Methods
BoundBy(IBound)
Returns a new grid restricted to just the given bound.
If the grid already has a bound, the new grid will have the intersection of both.
Declaration
public override IGrid BoundBy(IBound bound)
Parameters
| Type |
Name |
Description |
| IBound |
bound |
|
Returns
Overrides
ComputeBounds(Cell)
Declaration
protected override (Vector3, Vector3) ComputeBounds(Cell cell)
Parameters
| Type |
Name |
Description |
| Cell |
cell |
|
Returns
Overrides
GetCellMesh(Cell, out MeshData, out TRS, out ILookup<CellDir, int>)
Declaration
public void GetCellMesh(Cell cell, out MeshData meshData, out TRS trs, out ILookup<CellDir, int> faces)
Parameters
GetDiagonalGrid()
Declaration
public IGrid GetDiagonalGrid()
Returns
GetDual()
Returns a second grid which has one cell for every vertex of this grid,
and also methods for mapping corners of one grid to the other.
Declaration
public override IDualMapping GetDual()
Returns
Overrides
GetMeshData(Cell, out MeshData, out Matrix4x4)
For 3d cells, returns the mesh of a given cell.
Declaration
public override void GetMeshData(Cell cell, out MeshData meshData, out Matrix4x4 transform)
Parameters
Overrides
GetTriangleMesh(Cell)
For 3d cells, returns triangles on the boundary of a given cell, and which direction they correspond to.
Declaration
public override IEnumerable<(Vector3, Vector3, Vector3, CellDir)> GetTriangleMesh(Cell cell)
Parameters
| Type |
Name |
Description |
| Cell |
cell |
|
Returns
Overrides
IsPointInCell(Vector3, Cell)
Declaration
protected override bool IsPointInCell(Vector3 position, Cell cell)
Parameters
Returns
Overrides
RaycastCell(Cell, Vector3, Vector3)
Declaration
protected override RaycastInfo? RaycastCell(Cell cell, Vector3 rayOrigin, Vector3 direction)
Parameters
Returns
Overrides
Implements
Extension Methods