var rotatedRect = RotatedRect.create(center, size, angle);
var rectPoints = new Float32Array(8);
TensorMath.getRotatedRectPoints(rotatedRect, rectPoints);
interface RotatedRect {
    angle: number;
    center: vec2;
    size: vec2;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
    toString(): string;
}

Hierarchy (view full)

Properties

angle: number

The rotation angle in degrees.

center: vec2

The center point (mass center) of RotatedRect.

size: vec2

The width and height of RotatedRect.

Methods

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean

  • Returns the description of RotatedRect.

    Returns string