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
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
areaQuadrangleThe area to check for collision in entity space.
rotationfloatHow the box shall be rotated before performing the collision test.
Returns
- bool
trueifareadoes 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
pointVector2The point to check for collision in entity space.
rotationfloatHow the box shall be rotated before performing the collision test.
Returns
- bool
trueifpointdoes collide with the box,falseotherwise.