Show / Hide Table of Contents

Struct Connection

Represents how the edges (2d) or faces (3d) of cells can connect to each other. In 2d, rotation/sides are unused, as two edges can only connect together normally or reflected. In 3d, this represents both a rotation and reflection The rotation and reflection are interpreted, similar to NGonCellType rotations. I.e. Mirror represents is a reflection that keeps (CellDir)0 unchanged (i.e. inverts the y-axis), and Rotation represents a rotation counter clockwise of Rotation/Sides*360 degrees. Mirror is applied first, then rotation.

Implements
IEquatable<Connection>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
Namespace: Sylves
Assembly: Sylves.dll
Syntax
public struct Connection : IEquatable<Connection>

Properties

Mirror

Declaration
public bool Mirror { get; set; }
Property Value
Type Description
bool

Rotation

Declaration
public int Rotation { get; set; }
Property Value
Type Description
int

Sides

Declaration
public int Sides { get; set; }
Property Value
Type Description
int

Methods

Equals(Connection)

Declaration
public bool Equals(Connection other)
Parameters
Type Name Description
Connection other
Returns
Type Description
bool

Equals(object)

Declaration
public override bool Equals(object other)
Parameters
Type Name Description
object other
Returns
Type Description
bool
Overrides
ValueType.Equals(object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()

GetInverse()

Declaration
public Connection GetInverse()
Returns
Type Description
Connection

ToMatrix()

Give an equivalent rotation in the XY plane.

Declaration
public Matrix4x4 ToMatrix()
Returns
Type Description
Matrix4x4

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
ValueType.ToString()

Operators

operator ==(Connection, Connection)

Declaration
public static bool operator ==(Connection lhs, Connection rhs)
Parameters
Type Name Description
Connection lhs
Connection rhs
Returns
Type Description
bool

operator !=(Connection, Connection)

Declaration
public static bool operator !=(Connection lhs, Connection rhs)
Parameters
Type Name Description
Connection lhs
Connection rhs
Returns
Type Description
bool

operator *(Connection, Connection)

Declaration
public static Connection operator *(Connection a, Connection b)
Parameters
Type Name Description
Connection a
Connection b
Returns
Type Description
Connection

Implements

IEquatable<T>
In this article
Back to top Generated by DocFX