Table of Contents

Class Box

Namespace
FrameOfReference.World.Components
Assembly
FrameOfReference.World.dll

Collision-detection using an axis-aligned box.

public class Box : Collision<Vector2>, ICloneable
Inheritance
Collision<Vector2>
Box
Implements
Inherited Members
Extension Methods

Properties

Area

The area covered by this box.

[Browsable(false)]
public RectangleF Area { get; }

Property Value

RectangleF

Maximum

The upper right corner of the box (originating from the body's position).

public Vector2 Maximum { get; set; }

Property Value

Vector2

Minimum

The lower left corner of the box (originating from the body's position).

public Vector2 Minimum { get; set; }

Property Value

Vector2

Methods

CollisionTest(Quadrangle, float)

Determines whether a certain area lies within the box.

public override bool CollisionTest(Quadrangle area, float rotation)

Parameters

area Quadrangle

The area to check for collision in entity space.

rotation float

How the box shall be rotated before performing the collision test.

Returns

bool

true if area does collide with the box, false.

CollisionTest(Vector2, float)

Determines whether a certain point lies within the box.

public override bool CollisionTest(Vector2 point, float rotation)

Parameters

point Vector2

The point to check for collision in entity space.

rotation float

How the box shall be rotated before performing the collision test.

Returns

bool

true if point does collide with the box, false otherwise.