Show / Hide Table of Contents

    Struct AGSBoundingBox

    A bounding box (a square that bounds something)- used for rendering and hit-tests.

    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    public struct AGSBoundingBox

    Constructors

    | Improve this Doc View Source

    AGSBoundingBox(Vector2, Vector2, Vector2, Vector2)

    Initializes a new instance of the AGSBoundingBox struct.

    Declaration
    public AGSBoundingBox(Vector2 bottomLeft, Vector2 bottomRight, Vector2 topLeft, Vector2 topRight)
    Parameters
    Type Name Description
    Vector2 bottomLeft

    Bottom left.

    Vector2 bottomRight

    Bottom right.

    Vector2 topLeft

    Top left.

    Vector2 topRight

    Top right.

    | Improve this Doc View Source

    AGSBoundingBox(Vector3, Vector3, Vector3, Vector3)

    Initializes a new instance of the AGSBoundingBox struct.

    Declaration
    public AGSBoundingBox(Vector3 bottomLeft, Vector3 bottomRight, Vector3 topLeft, Vector3 topRight)
    Parameters
    Type Name Description
    Vector3 bottomLeft

    Bottom left.

    Vector3 bottomRight

    Bottom right.

    Vector3 topLeft

    Top left.

    Vector3 topRight

    Top right.

    | Improve this Doc View Source

    AGSBoundingBox(Single, Single, Single, Single)

    Declaration
    public AGSBoundingBox(float minX, float maxX, float minY, float maxY)
    Parameters
    Type Name Description
    System.Single minX
    System.Single maxX
    System.Single minY
    System.Single maxY

    Properties

    | Improve this Doc View Source

    BottomLeft

    Gets the bottom left point.

    Declaration
    public Vector3 BottomLeft { get; }
    Property Value
    Type Description
    Vector3

    The bottom left point.

    | Improve this Doc View Source

    BottomRight

    Gets the bottom right point.

    Declaration
    public Vector3 BottomRight { get; }
    Property Value
    Type Description
    Vector3

    The bottom right point.

    | Improve this Doc View Source

    Height

    Gets the height.

    Declaration
    public float Height { get; }
    Property Value
    Type Description
    System.Single

    The height.

    | Improve this Doc View Source

    IsValid

    Gets a value indicating whether this AGSBoundingBox is invalid (i.e max is not bigger than min).

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    System.Boolean

    true if is empty; otherwise, false.

    | Improve this Doc View Source

    MaxX

    Gets the maximum x of the square.

    Declaration
    public float MaxX { get; }
    Property Value
    Type Description
    System.Single

    The max x.

    | Improve this Doc View Source

    MaxY

    Gets the maximum y of the square.

    Declaration
    public float MaxY { get; }
    Property Value
    Type Description
    System.Single

    The max y.

    | Improve this Doc View Source

    MinX

    Gets the minimum x of the square.

    Declaration
    public float MinX { get; }
    Property Value
    Type Description
    System.Single

    The minimum x.

    | Improve this Doc View Source

    MinY

    Gets the minimum y of the square.

    Declaration
    public float MinY { get; }
    Property Value
    Type Description
    System.Single

    The minimum y.

    | Improve this Doc View Source

    TopLeft

    Gets the top left point.

    Declaration
    public Vector3 TopLeft { get; }
    Property Value
    Type Description
    Vector3

    The top left point.

    | Improve this Doc View Source

    TopRight

    Gets the top right point.

    Declaration
    public Vector3 TopRight { get; }
    Property Value
    Type Description
    Vector3

    The top right point.

    | Improve this Doc View Source

    Width

    Gets the width.

    Declaration
    public float Width { get; }
    Property Value
    Type Description
    System.Single

    The width.

    Methods

    | Improve this Doc View Source

    Contains(Vector2)

    Is the specified point contained in the square?

    Declaration
    public bool Contains(Vector2 point)
    Parameters
    Type Name Description
    Vector2 point

    Point.

    Returns
    Type Description
    System.Boolean

    True if the point is in the square, false otherwise.

    | Improve this Doc View Source

    Crop(BoundingBoxType, ICropSelfComponent, PointF)

    Create a cropped bounding box.

    Declaration
    public AGSCropInfo Crop(BoundingBoxType boundingBoxType, ICropSelfComponent crop, PointF adjustedScale)
    Parameters
    Type Name Description
    BoundingBoxType boundingBoxType

    The type of the bounding box to be cropped.

    ICropSelfComponent crop

    Crop.

    PointF adjustedScale

    Adjusted scale.

    Returns
    Type Description
    AGSCropInfo

    The crop info.

    | Improve this Doc View Source

    Equals(AGSBoundingBox)

    Declaration
    public bool Equals(AGSBoundingBox square)
    Parameters
    Type Name Description
    AGSBoundingBox square
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)
    | Improve this Doc View Source

    FlipHorizontal()

    Create a new square which is flipped horizontally from the current square.

    Declaration
    public AGSBoundingBox FlipHorizontal()
    Returns
    Type Description
    AGSBoundingBox

    The new flipped square.

    | Improve this Doc View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()
    | Improve this Doc View Source

    Multiply(Single, Single)

    Multiply the box limits with the specified factorX and factorY.

    Declaration
    public AGSBoundingBox Multiply(float factorX, float factorY)
    Parameters
    Type Name Description
    System.Single factorX

    Factor x.

    System.Single factorY

    Factor y.

    Returns
    Type Description
    AGSBoundingBox

    The new multiplied box.

    | Improve this Doc View Source

    SameSize(AGSBoundingBox)

    Is the given box the same size as this box?

    Declaration
    public bool SameSize(AGSBoundingBox box)
    Parameters
    Type Name Description
    AGSBoundingBox box

    Box.

    Returns
    Type Description
    System.Boolean

    true, if size is the same, false otherwise.

    | Improve this Doc View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.ValueType.ToString()
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX