Show / Hide Table of Contents

Class RelaxModifier

Applies relaxation to an infinite 2d plane, similar to MeshDataOperations.Relax.

Inheritance
System.Object
NestedModifier
PlanarLazyGrid
RelaxModifier
TownscaperGrid
Implements
IGrid
Inherited Members
PlanarLazyGrid.Setup(Vector2, Vector2, Vector2, Vector2, Boolean, SquareBound, IEnumerable<ICellType>, ICachePolicy)
PlanarLazyGrid.ChunkOffset(Cell)
PlanarLazyGrid.MeshTranslation(Cell)
PlanarLazyGrid.GetDual()
PlanarLazyGrid.StrideX
PlanarLazyGrid.StrideY
PlanarLazyGrid.AabbBottomLeft
PlanarLazyGrid.AabbSize
NestedModifier.Setup(IGrid, IEnumerable<ICellType>, ICachePolicy)
NestedModifier.GetChildGridCached(Cell)
NestedModifier.GetCells()
NestedModifier.GetCellType(Cell)
NestedModifier.IsCellInGrid(Cell)
NestedModifier.TryMoveByOffset(Cell, Vector3Int, Vector3Int, CellRotation, Cell, CellRotation)
NestedModifier.ParallelTransport(IGrid, Cell, Cell, Cell, CellRotation, Cell, CellRotation)
NestedModifier.GetCellDirs(Cell)
NestedModifier.GetCellCorners(Cell)
NestedModifier.FindBasicPath(Cell, Cell)
NestedModifier.GetIndex(Cell)
NestedModifier.GetCellByIndex(Int32)
NestedModifier.GetBound()
NestedModifier.GetBound(IEnumerable<Cell>)
NestedModifier.IntersectBounds(IBound, IBound)
NestedModifier.UnionBounds(IBound, IBound)
NestedModifier.GetCellsInBounds(IBound)
NestedModifier.IsCellInBound(Cell, IBound)
NestedModifier.GetCellCenter(Cell)
NestedModifier.GetCellCorner(Cell, CellCorner)
NestedModifier.GetTRS(Cell)
NestedModifier.GetDeformation(Cell)
NestedModifier.GetPolygon(Cell, Vector3[], Matrix4x4)
NestedModifier.GetTriangleMesh(Cell)
NestedModifier.GetMeshData(Cell, MeshData, Matrix4x4)
NestedModifier.FindCell(Vector3, Cell)
NestedModifier.FindCell(Matrix4x4, Cell, CellRotation)
NestedModifier.GetCellsIntersectsApprox(Vector3, Vector3)
NestedModifier.Raycast(Vector3, Vector3, Single)
NestedModifier.FindGridSymmetry(ISet<Cell>, ISet<Cell>, Cell, CellRotation)
NestedModifier.TryApplySymmetry(GridSymmetry, IBound, IBound)
NestedModifier.TryApplySymmetry(GridSymmetry, Cell, Cell, CellRotation)
NestedModifier.ChunkGrid
NestedModifier.CachePolicy
NestedModifier.Unwrapped
NestedModifier.IndexCount
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public class RelaxModifier : PlanarLazyGrid, IGrid

Constructors

RelaxModifier(IGrid, Single, Single, Int32, ICachePolicy)

Declaration
public RelaxModifier(IGrid underlying, float chunkSize = 10F, float weldTolerance = 1E-07F, int relaxIterations = 3, ICachePolicy cachePolicy = null)
Parameters
Type Name Description
IGrid underlying
System.Single chunkSize
System.Single weldTolerance
System.Int32 relaxIterations
ICachePolicy cachePolicy

Properties

CoordinateDimension

Declaration
public override int CoordinateDimension { get; }
Property Value
Type Description
System.Int32
Overrides
NestedModifier.CoordinateDimension

Is2d

Declaration
public override bool Is2d { get; }
Property Value
Type Description
System.Boolean
Overrides
NestedModifier.Is2d

Is3d

Declaration
public override bool Is3d { get; }
Property Value
Type Description
System.Boolean
Overrides
NestedModifier.Is3d

IsFinite

Declaration
public override bool IsFinite { get; }
Property Value
Type Description
System.Boolean
Overrides
NestedModifier.IsFinite

IsOrientable

Declaration
public override bool IsOrientable { get; }
Property Value
Type Description
System.Boolean
Overrides
NestedModifier.IsOrientable

IsPlanar

Declaration
public override bool IsPlanar { get; }
Property Value
Type Description
System.Boolean
Overrides
NestedModifier.IsPlanar

IsRepeating

Declaration
public override bool IsRepeating { get; }
Property Value
Type Description
System.Boolean
Overrides
NestedModifier.IsRepeating

IsSingleCellType

Declaration
public override bool IsSingleCellType { get; }
Property Value
Type Description
System.Boolean
Overrides
NestedModifier.IsSingleCellType

Unbounded

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

Methods

BoundBy(IBound)

Declaration
public override IGrid BoundBy(IBound bound)
Parameters
Type Name Description
IBound bound
Returns
Type Description
IGrid
Overrides
NestedModifier.BoundBy(IBound)

Combine(Cell, Cell)

Declaration
protected override Cell Combine(Cell childCell, Cell chunkCell)
Parameters
Type Name Description
Cell childCell
Cell chunkCell
Returns
Type Description
Cell
Overrides
NestedModifier.Combine(Cell, Cell)

GetAdjacentChunks(Cell)

Declaration
protected override IEnumerable<Cell> GetAdjacentChunks(Cell chunkCell)
Parameters
Type Name Description
Cell chunkCell
Returns
Type Description
System.Collections.Generic.IEnumerable<Cell>
Overrides
PlanarLazyGrid.GetAdjacentChunks(Cell)

GetCellTypes()

Declaration
public override IEnumerable<ICellType> GetCellTypes()
Returns
Type Description
System.Collections.Generic.IEnumerable<ICellType>
Overrides
NestedModifier.GetCellTypes()

GetChildGrid(Cell)

Declaration
protected override IGrid GetChildGrid(Cell chunkCell)
Parameters
Type Name Description
Cell chunkCell
Returns
Type Description
IGrid
Overrides
NestedModifier.GetChildGrid(Cell)

Split(Cell)

Declaration
protected override (Cell, Cell) Split(Cell cell)
Parameters
Type Name Description
Cell cell
Returns
Type Description
System.ValueTuple<Cell, Cell>
Overrides
NestedModifier.Split(Cell)

TryMove(Cell, CellDir, out Cell, out CellDir, out Connection)

Declaration
public override bool TryMove(Cell cell, CellDir dir, out Cell dest, out CellDir inverseDir, out Connection connection)
Parameters
Type Name Description
Cell cell
CellDir dir
Cell dest
CellDir inverseDir
Connection connection
Returns
Type Description
System.Boolean
Overrides
NestedModifier.TryMove(Cell, CellDir, out Cell, out CellDir, out Connection)

Implements

IGrid
In This Article
Back to top Generated by DocFX