Class NGonCellType
  
  Cell type for a regular polygon with n sides.
The CellDirs are simply the numbers 0 to n-1 with dir 0 being to the right.
The CellRotations are the numbers 0 to n-1 for a CCW rotation of that many sides,
plus numbers ~0 to ~(n-1) for the reflections, where rotation ~0 has dir 0 as a fix point.
The canonical shape (for use with deformations) is a regular polygon with incircle diamater 1.0 in the XY centered at the origin, with normal pointing Z-forward.
    Inheritance
    System.Object
    NGonCellType
   
  
  
  Assembly: Sylves.dll
  Syntax
  
    public class NGonCellType : Object, ICellType
   
  Properties
  
  
  
  
  N
  
  
  Declaration
  
  Property Value
  
    
      
        | Type | Description | 
    
    
      
        | System.Int32 |  | 
    
  
  
  
  
  ReflectX
  
  
  Declaration
  
    public CellRotation ReflectX { get; }
   
  Property Value
  
  
  
  
  ReflectY
  
  
  Declaration
  
    public CellRotation ReflectY { get; }
   
  Property Value
  
  
  
  
  RotateCCW
  
  
  Declaration
  
    public CellRotation RotateCCW { get; }
   
  Property Value
  
  
  
  
  RotateCW
  
  
  Declaration
  
    public CellRotation RotateCW { get; }
   
  Property Value
  
  Methods
  
  
  
  
  
  Returns N for cellType is an NGonCellType.
Also returns similar values for SquareCellType and HexCellType,
as they are compatible with NGonCellType.
Other celltypes return null.
Declaration
  
    public static Nullable<int> Extract(ICellType cellType)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Nullable<System.Int32> |  | 
    
  
  
  
  
  
  
  
  Declaration
  
    public string Format(CellCorner corner)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  
  
  
  
  
  
  Declaration
  
    public static string Format(CellCorner corner, int n)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | CellCorner | corner |  | 
      
        | System.Int32 | n |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  
  
  
  
  
  
  Declaration
  
    public string Format(CellDir dir)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  
  
  
  
  
  
  Declaration
  
    public static string Format(CellDir dir, int n)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | CellDir | dir |  | 
      
        | System.Int32 | n |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  
  
  
  
  
  
  Declaration
  
    public string Format(CellRotation rotation)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  
  
  
  
  
  
  Declaration
  
    public static string Format(CellRotation rotation, int n)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.String |  | 
    
  
  
  
  
  FromMatrix(Matrix4x4)
  
  
  Declaration
  
    public Nullable<CellRotation> FromMatrix(Matrix4x4 matrix)
   
  Parameters
  
  Returns
  
  
  
  
  Get(Int32)
  Returns the cell type corresponding to a polygon with n sides.
Declaration
  
    public static ICellType Get(int n)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Int32 | n |  | 
    
  
  Returns
  
  
  
  
  GetCellCorners()
  
  
  Declaration
  
    public IEnumerable<CellCorner> GetCellCorners()
   
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Collections.Generic.IEnumerable<CellCorner> |  | 
    
  
  
  
  
  GetCellDirs()
  
  
  Declaration
  
    public IEnumerable<CellDir> GetCellDirs()
   
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Collections.Generic.IEnumerable<CellDir> |  | 
    
  
  
  
  
  GetCornerPosition(CellCorner)
  
  
  Declaration
  
    public Vector3 GetCornerPosition(CellCorner corner)
   
  Parameters
  
  Returns
  
  
  
  
  GetIdentity()
  
  
  Declaration
  
    public CellRotation GetIdentity()
   
  Returns
  
  
  
  
  GetMatrix(CellRotation)
  
  
  Declaration
  
    public Matrix4x4 GetMatrix(CellRotation cellRotation)
   
  Parameters
  
  Returns
  
  
  
  
  GetRotations(Boolean)
  
  
  Declaration
  
    public IList<CellRotation> GetRotations(bool includeReflections = false)
   
  Parameters
  
    
      
        | Type | Name | Description | 
    
    
      
        | System.Boolean | includeReflections |  | 
    
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Collections.Generic.IList<CellRotation> |  | 
    
  
  
  
  
  Invert(CellDir)
  
  
  Declaration
  
    public Nullable<CellDir> Invert(CellDir dir)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Nullable<CellDir> |  | 
    
  
  
  
  
  Invert(CellRotation)
  
  
  Declaration
  
    public CellRotation Invert(CellRotation a)
   
  Parameters
  
  Returns
  
  
  
  
  Multiply(CellRotation, CellRotation)
  
  
  Declaration
  
    public CellRotation Multiply(CellRotation a, CellRotation b)
   
  Parameters
  
  Returns
  
  
  
  
  Rotate(CellCorner, CellRotation)
  
  
  Declaration
  
    public CellCorner Rotate(CellCorner corner, CellRotation rotation)
   
  Parameters
  
  Returns
  
  
  
  
  Rotate(CellDir, CellRotation)
  
  
  Declaration
  
    public CellDir Rotate(CellDir dir, CellRotation rotation)
   
  Parameters
  
  Returns
  
  
  
  
  Rotate(CellDir, CellRotation, out CellDir, out Connection)
  
  
  Declaration
  
    public void Rotate(CellDir dir, CellRotation rotation, out CellDir resultDir, out Connection connection)
   
  Parameters
  
  
  
  
  TryGetRotation(CellDir, CellDir, Connection, out CellRotation)
  
  
  Declaration
  
    public bool TryGetRotation(CellDir fromDir, CellDir toDir, Connection connection, out CellRotation rotation)
   
  Parameters
  
  Returns
  
    
      
        | Type | Description | 
    
    
      
        | System.Boolean |  | 
    
  
  Implements