Struct ClipQuad
Represents a rectangular clipping region as a convex quadrilateral. Allows for transformation by rotation, skew, or non-uniform scaling, resulting in non-axis-aligned edges.
public readonly struct ClipQuad
- Inherited Members
Constructors
ClipQuad(Vector2, Vector2, Vector2, Vector2)
Initializes a new instance of the ClipQuad struct.
public ClipQuad(Vector2 topLeft, Vector2 topRight, Vector2 bottomRight, Vector2 bottomLeft)
Parameters
topLeftVector2The top-left corner of the quadrilateral.
topRightVector2The top-right corner of the quadrilateral.
bottomRightVector2The bottom-right corner of the quadrilateral.
bottomLeftVector2The bottom-left corner of the quadrilateral.
Properties
BottomLeft
Gets the bottom-left corner of the quadrilateral.
public Vector2 BottomLeft { get; }
Property Value
BottomRight
Gets the bottom-right corner of the quadrilateral.
public Vector2 BottomRight { get; }
Property Value
TopLeft
Gets the top-left corner of the quadrilateral.
public Vector2 TopLeft { get; }
Property Value
TopRight
Gets the top-right corner of the quadrilateral.
public Vector2 TopRight { get; }
Property Value
Methods
IsAxisAligned(float)
Determines whether the quadrilateral is axis-aligned within a small tolerance.
public bool IsAxisAligned(float tolerance = 0.0001)
Parameters
tolerancefloatThe tolerance for comparing parallel edges, typically a small epsilon.