跳到主要内容

Struct Rect

Properties

halfWidth

public float halfWidth { get; }

halfHeight

public float halfHeight { get; }

size

public Vector2 size { get; }

center

public Vector2 center { get; }

topLeftPoint

public Vector2 topLeftPoint { get; }

topRightPoint

public Vector2 topRightPoint { get; }

bottomLeftPoint

public Vector2 bottomLeftPoint { get; }

bottomRightPoint

public Vector2 bottomRightPoint { get; }

x

public float x { get; }

y

public float y { get; }

angle

public float angle { get; }

width

public float width { get; }

height

public float height { get; }

upDirection

public Vector2 upDirection { get; }

rightDirection

public Vector2 rightDirection { get; }

Constructors

Rect(float x, float y, Vector2 size)

public Rect(float x, float y, Vector2 size)

Rect(float x, float y, float width, float height)

public Rect(float x, float y, float width, float height)

Rect(float x, float y, float width, float height, Vector2 rightDirection)

public Rect(float x, float y, float width, float height, Vector2 rightDirection)

Rect(Vector2 center, Vector2 size)

public Rect(Vector2 center, Vector2 size)

Rect(Vector2 center, Vector2 size, Vector2 rightDirection)

public Rect(Vector2 center, Vector2 size, Vector2 rightDirection)

Rect(Vector2 center, float width, float height)

public Rect(Vector2 center, float width, float height)

Rect(Vector2 center, float width, float height, Vector2 rightDirection)

public Rect(Vector2 center, float width, float height, Vector2 rightDirection)

Rect()

public Rect()

Methods

static Rect CreateByTopLeftPoint(Vector2 topLeftPoint, Vector2 size, Vector2 rightDirection)

public static Rect CreateByTopLeftPoint(Vector2 topLeftPoint, Vector2 size, Vector2 rightDirection)

static Rect CreateByTopRightPoint(Vector2 topRightPoint, Vector2 size, Vector2 rightDirection)

public static Rect CreateByTopRightPoint(Vector2 topRightPoint, Vector2 size, Vector2 rightDirection)

static Rect CreateByBottomLeftPoint(Vector2 bottomLeftPoint, Vector2 size, Vector2 rightDirection)

public static Rect CreateByBottomLeftPoint(Vector2 bottomLeftPoint, Vector2 size, Vector2 rightDirection)

static Rect CreateByBottomRightPoint(Vector2 bottomRightPoint, Vector2 size, Vector2 rightDirection)

public static Rect CreateByBottomRightPoint(Vector2 bottomRightPoint, Vector2 size, Vector2 rightDirection)

bool Contains(Vector2 point)

public bool Contains(Vector2 point)

bool Overlap(Rect rect)

public bool Overlap(Rect rect)

bool Overlap(Circle circle)

public bool Overlap(Circle circle)