Show / Hide Table of Contents

Class MeshPrismGrid

Represents a 3d grid, where each cell is an extrusion of a face along the normals, offset to a given height.

Inheritance
object
DataDrivenGrid
MeshGrid
MeshPrismGrid
CubiusGrid
Implements
IGrid
Inherited Members
MeshGrid.min
MeshGrid.max
MeshGrid.meshData
MeshGrid.is2d
MeshGrid.bound
MeshGrid.GetCompactGrid()
MeshGrid.IsCellInGrid(Cell)
MeshGrid.TryMove(Cell, CellDir, out Cell, out CellDir, out Connection)
MeshGrid.GetBound()
MeshGrid.GetBound(IEnumerable<Cell>)
MeshGrid.IntersectBounds(IBound, IBound)
MeshGrid.UnionBounds(IBound, IBound)
MeshGrid.GetCellsInBounds(IBound)
MeshGrid.IsCellInBound(Cell, IBound)
MeshGrid.GetBoundAabb(IBound)
MeshGrid.GetCellCorner(Cell, CellCorner)
MeshGrid.FindCell(Vector3, out Cell)
MeshGrid.Raycast(Vector3, Vector3, float)
MeshGrid.FindCell(Matrix4x4, out Cell, out CellRotation)
MeshGrid.GetCellsIntersectsApprox(Vector3, Vector3)
MeshGrid.GetFaceIndices(Cell)
MeshGrid.GetPolygon(Cell, out Vector3[], out Matrix4x4)
MeshGrid.GetAabb(Cell)
MeshGrid.GetAabb(IEnumerable<Cell>)
MeshGrid.Is2d
MeshGrid.Is3d
MeshGrid.IsPlanar
MeshGrid.CoordinateDimension
DataDrivenGrid.GetCellTypes()
DataDrivenGrid.Recenter(Cell)
DataDrivenGrid.GetCells()
DataDrivenGrid.GetCellType(Cell)
DataDrivenGrid.TryMoveByOffset(Cell, Vector3Int, Vector3Int, CellRotation, out Cell, out CellRotation)
DataDrivenGrid.ParallelTransport(IGrid, Cell, Cell, Cell, CellRotation, out Cell, out CellRotation)
DataDrivenGrid.GetCellDirs(Cell)
DataDrivenGrid.GetCellCorners(Cell)
DataDrivenGrid.FindBasicPath(Cell, Cell)
DataDrivenGrid.GetIndex(Cell)
DataDrivenGrid.GetCellByIndex(int)
DataDrivenGrid.GetCellCenter(Cell)
DataDrivenGrid.GetTRS(Cell)
DataDrivenGrid.GetDeformation(Cell)
DataDrivenGrid.FindGridSymmetry(ISet<Cell>, ISet<Cell>, Cell, CellRotation)
DataDrivenGrid.TryApplySymmetry(GridSymmetry, IBound, out IBound)
DataDrivenGrid.TryApplySymmetry(GridSymmetry, Cell, out Cell, out CellRotation)
DataDrivenGrid.Moves
DataDrivenGrid.CellData
DataDrivenGrid.IsRepeating
DataDrivenGrid.IsOrientable
DataDrivenGrid.IsFinite
DataDrivenGrid.IsSingleCellType
DataDrivenGrid.Unwrapped
DataDrivenGrid.IndexCount
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public class MeshPrismGrid : MeshGrid, IGrid

Constructors

MeshPrismGrid(MeshData, MeshPrismGridOptions)

Declaration
public MeshPrismGrid(MeshData meshData, MeshPrismGridOptions meshPrismOptions)
Parameters
Type Name Description
MeshData meshData
MeshPrismGridOptions meshPrismOptions

Properties

Unbounded

Returns the grid with any bounds removed.

Declaration
public override IGrid Unbounded { get; }
Property Value
Type Description
IGrid
Overrides
MeshGrid.Unbounded

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
Type Description
IGrid
Overrides
MeshGrid.BoundBy(IBound)

ComputeBounds(Cell)

Declaration
protected override (Vector3, Vector3) ComputeBounds(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
(Vector3, Vector3)
Overrides
MeshGrid.ComputeBounds(Cell)

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
Type Name Description
Cell cell
MeshData meshData
TRS trs
ILookup<CellDir, int> faces

GetDiagonalGrid()

Declaration
public IGrid GetDiagonalGrid()
Returns
Type Description
IGrid

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
Type Description
IDualMapping
Overrides
MeshGrid.GetDual()

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
Type Name Description
Cell cell
MeshData meshData
Matrix4x4 transform
Overrides
MeshGrid.GetMeshData(Cell, out MeshData, out Matrix4x4)

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
Type Description
IEnumerable<(Vector3, Vector3, Vector3, CellDir)>
Overrides
MeshGrid.GetTriangleMesh(Cell)

IsPointInCell(Vector3, Cell)

Declaration
protected override bool IsPointInCell(Vector3 position, Cell cell)
Parameters
Type Name Description
Vector3 position
Cell cell
Returns
Type Description
bool
Overrides
MeshGrid.IsPointInCell(Vector3, Cell)

RaycastCell(Cell, Vector3, Vector3)

Declaration
protected override RaycastInfo? RaycastCell(Cell cell, Vector3 rayOrigin, Vector3 direction)
Parameters
Type Name Description
Cell cell
Vector3 rayOrigin
Vector3 direction
Returns
Type Description
RaycastInfo?
Overrides
MeshGrid.RaycastCell(Cell, Vector3, Vector3)

Implements

IGrid

Extension Methods

GridExtensions.FindCell(IGrid, Vector3)
GridExtensions.GetCellsIntersectsApprox(IGrid, Aabb)
GridExtensions.GetMeshData(IGrid, Cell)
GridExtensions.GetNeighbours(IGrid, Cell)
GridExtensions.GetPolygon(IGrid, Cell)
GridExtensions.Masked(IGrid, ISet<Cell>)
GridExtensions.Masked(IGrid, Func<Cell, bool>, IEnumerable<Cell>)
GridExtensions.Move(IGrid, Cell, CellDir)
GridExtensions.ToMeshData(IGrid)
GridExtensions.ToMeshData(IGrid, IEnumerable<Cell>)
GridExtensions.Transformed(IGrid, Matrix4x4)
In this article
Back to top Generated by DocFX