Struct Rotation
Represents an rotation in the x-y plane.
Despite the fact this is labelled rotation, it also includes reflections as well.
Assembly: DeBroglie.dll
Syntax
public struct Rotation : IEquatable<Rotation>
Constructors
|
Edit this page
View Source
Rotation(int, bool)
Declaration
public Rotation(int rotateCw = 0, bool reflectX = false)
Parameters
Type |
Name |
Description |
int |
rotateCw |
|
bool |
reflectX |
|
Properties
|
Edit this page
View Source
IsIdentity
True for the default constructed rotation, that doesn't do anything.
Declaration
public bool IsIdentity { get; }
Property Value
|
Edit this page
View Source
ReflectX
If true, this "rotation" also includes a reflection along the x-axis.
The reflection is applied before doing any rotation by RotateCw.
Declaration
public bool ReflectX { get; }
Property Value
|
Edit this page
View Source
RotateCw
Rotation in degrees, clockwise (assuming a y-down co-ordinate system, typically used
for 2d graphics).
Declaration
public int RotateCw { get; }
Property Value
Methods
|
Edit this page
View Source
Equals(Rotation)
Declaration
public bool Equals(Rotation other)
Parameters
Returns
|
Edit this page
View Source
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Overrides
|
Edit this page
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
|
Edit this page
View Source
Inverse()
Returns the rotation that rotates back from this one.
i.e. r.Inverse() * r gives the identity rotation for all Rotation objects.
Declaration
public Rotation Inverse()
Returns
|
Edit this page
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
|
Edit this page
View Source
operator ==(Rotation, Rotation)
Declaration
public static bool operator ==(Rotation a, Rotation b)
Parameters
Returns
|
Edit this page
View Source
operator !=(Rotation, Rotation)
Declaration
public static bool operator !=(Rotation a, Rotation b)
Parameters
Returns
|
Edit this page
View Source
operator *(Rotation, Rotation)
Returns the rotation which is equivalent to rotating first by b, then by a.
Declaration
public static Rotation operator *(Rotation a, Rotation b)
Parameters
Returns
Implements