Search Results for

    Show / Hide Table of Contents

    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()

    Initializes a new instance of the RotatedRectangle struct.

    Declaration
    public 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

    true if the specified location is contained by this rotated rectangle; otherwise, false.

    operator==(const RotatedRectangle& other)

    Declaration
    public bool operator==(const RotatedRectangle& other) const
    Parameters
    RotatedRectangle other

    Returns
    bool

    Shared(const RotatedRectangle& a, const Rectangle& b)

    Calculates a rectangle that contains the shared part of both rectangles.

    Declaration
    public static RotatedRectangle Shared(const RotatedRectangle& a, const Rectangle& b)
    Parameters
    RotatedRectangle a

    The first rectangle.

    Rectangle b

    The second rectangle.

    Returns
    RotatedRectangle

    Rectangle that contains shared part of a and b rectangles.

    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.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat