Class MeshGrid
Represents a 2d grid, where each cell corresponds to a face in a given mesh.
Inheritance
System.Object
MeshGrid
Assembly: Sylves.dll
Syntax
public class MeshGrid : DataDrivenGrid, IGrid
Constructors
MeshGrid(MeshData, MeshGridOptions)
Declaration
public MeshGrid(MeshData meshData, MeshGridOptions meshGridOptions = null)
Parameters
Fields
is2d
Declaration
Field Value
Type |
Description |
System.Boolean |
|
meshData
Declaration
protected readonly MeshData meshData
Field Value
Properties
CoordinateDimension
Declaration
public override int CoordinateDimension { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
Is2d
Declaration
public override bool Is2d { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
Is3d
Declaration
public override bool Is3d { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
IsPlanar
Declaration
public override bool IsPlanar { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
Methods
ComputeBounds(Cell)
Declaration
protected virtual (Vector3, Vector3) ComputeBounds(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
FindCell(Matrix4x4, out Cell, out CellRotation)
Declaration
public override bool FindCell(Matrix4x4 matrix, out Cell cell, out CellRotation rotation)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
FindCell(Vector3, out Cell)
Declaration
public override bool FindCell(Vector3 position, out Cell cell)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
GetCellCorner(Cell, CellCorner)
Declaration
public override Vector3 GetCellCorner(Cell cell, CellCorner corner)
Parameters
Returns
Overrides
GetCellsIntersectsApprox(Vector3, Vector3)
Declaration
public override IEnumerable<Cell> GetCellsIntersectsApprox(Vector3 min, Vector3 max)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Cell> |
|
Overrides
GetDual()
Declaration
public override IDualMapping GetDual()
Returns
Overrides
GetFaceIndices(Cell)
Declaration
public IReadOnlyList<int> GetFaceIndices(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Type |
Description |
System.Collections.Generic.IReadOnlyList<System.Int32> |
|
GetMeshData(Cell, out MeshData, out Matrix4x4)
Declaration
public override void GetMeshData(Cell cell, out MeshData meshData, out Matrix4x4 transform)
Parameters
Overrides
GetPolygon(Cell, out Vector3[], out Matrix4x4)
Declaration
public override void GetPolygon(Cell cell, out Vector3[] vertices, out Matrix4x4 transform)
Parameters
Overrides
GetTriangleMesh(Cell)
Declaration
public override IEnumerable<(Vector3, Vector3, Vector3, CellDir)> GetTriangleMesh(Cell cell)
Parameters
Type |
Name |
Description |
Cell |
cell |
|
Returns
Overrides
IsPointInCell(Vector3, Cell)
Declaration
protected virtual bool IsPointInCell(Vector3 position, Cell cell)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Raycast(Vector3, Vector3, Single)
Declaration
public override IEnumerable<RaycastInfo> Raycast(Vector3 origin, Vector3 direction, float maxDistance = InfinityF)
Parameters
Type |
Name |
Description |
Vector3 |
origin |
|
Vector3 |
direction |
|
System.Single |
maxDistance |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<RaycastInfo> |
|
Overrides
RaycastCell(Cell, Vector3, Vector3)
Declaration
protected virtual Nullable<RaycastInfo> RaycastCell(Cell cell, Vector3 rayOrigin, Vector3 direction)
Parameters
Returns
Implements