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
area
QuadrangleThe area to check for collision in entity space.
rotation
floatHow the box shall be rotated before performing the collision test.
Returns
- bool
true
ifarea
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
Vector2The point to check for collision in entity space.
rotation
floatHow the box shall be rotated before performing the collision test.
Returns
- bool
true
ifpoint
does collide with the box,false
otherwise.