Struct RotatedRectangle
Represents a rectangle that has been transformed by an arbitrary render transform.
Assembly: FlaxEngine.dll
File: Engine/Render2D/RotatedRectangle.h
Syntax
public struct RotatedRectangle
Constructors
RotatedRectangle()
RotatedRectangle(const Float2& topLeft, const Float2& extentX, const Float2& extentY)
Initializes a new instance of the RotatedRectangle struct.
Declaration
public RotatedRectangle(const Float2& topLeft, const Float2& extentX, const Float2& extentY)
Parameters
Float2
topLeft
The top left corner. |
Float2
extentX
The extent on X axis. |
Float2
extentY
The extent on Y axis. |
RotatedRectangle(const Rectangle& rect)
Initializes a new instance of the RotatedRectangle struct.
Declaration
public RotatedRectangle(const Rectangle& rect)
Parameters
Rectangle
rect
The aligned rectangle. |
Fields
ExtentX
The transformed X extent (right-left).
Declaration
public Float2 ExtentX
Field Value
Float2
|
ExtentY
The transformed Y extent (bottom-top).
Declaration
public Float2 ExtentY
Field Value
Float2
|
TopLeft
The transformed top left corner.
Declaration
public Float2 TopLeft
Field Value
Float2
|
Methods
ContainsPoint(const Float2& location)
Determines whether the specified location is contained within this rotated rectangle.
Declaration
public bool ContainsPoint(const Float2& location) const
Parameters
Float2
location
The location to test. |
Returns
bool
|
operator==(const RotatedRectangle& other)
Declaration
public bool operator==(const RotatedRectangle& other) const
Parameters
RotatedRectangle
other
|
Returns
bool
|
Shared(const RotatedRectangle& a, const Rectangle& b)
ToBoundingRect()
Convert rotated rectangle to the axis-aligned rectangle that builds rotated rectangle bounding box.
Declaration
public Rectangle ToBoundingRect() const
Returns
Rectangle
The bounds rectangle. |