BoxShape

Namespace: Murder.Core.Geometry
Assembly: Murder.dll

public sealed struct BoxShape : IShape

Implements: IShape

⭐ Constructors

public BoxShape()
public BoxShape(Rectangle rectangle)

Parameters
rectangle Rectangle

public BoxShape(Vector2 origin, Point offset, int width, int height)

Parameters
origin Vector2
offset Point
width int
height int

⭐ Properties

Height

public readonly int Height;

Returns
int

Offset

public readonly Point Offset;

Returns
Point

Origin

public readonly Vector2 Origin;

Returns
Vector2

Rectangle

public Rectangle Rectangle { get; }

Simple shape getter

Returns
Rectangle

Size

public Point Size { get; }

Returns
Point

Width

public readonly int Width;

Returns
int

⭐ Methods

ResizeBottomRight(Vector2)

public BoxShape ResizeBottomRight(Vector2 newBottomRight)

Parameters
newBottomRight Vector2

Returns
BoxShape

ResizeTopLeft(Vector2)

public BoxShape ResizeTopLeft(Vector2 newTopLeft)

Parameters
newTopLeft Vector2

Returns
BoxShape

GetPolygon()

public virtual PolygonShape GetPolygon()

Returns
PolygonShape

GetBoundingBox()

public virtual Rectangle GetBoundingBox()

Returns
Rectangle