Frame of Reference Game API  1.0.3
Public Member Functions | Public Attributes | Properties | List of all members
FrameOfReference.World.Components.Box Class Reference

Collision-detection using an axis-aligned box. More...

Inheritance diagram for FrameOfReference.World.Components.Box:
AlphaFramework.World.Components.Collision< Vector2 >

Public Member Functions

override bool CollisionTest (Vector2 point, float rotation)
 Determines whether a certain point lies within the box. More...
 
override bool CollisionTest (Quadrangle area, float rotation)
 Determines whether a certain area lies within the box. More...
 
- Public Member Functions inherited from AlphaFramework.World.Components.Collision< Vector2 >
override string ToString ()
 
abstract bool CollisionTest (TCoordinates point, float rotation)
 
abstract bool CollisionTest (Quadrangle area, float rotation)
 
Collision< TCoordinates > Clone ()
 

Public Attributes

RectangleF Area => RectangleF.FromLTRB(Minimum.X, Minimum.Y, Maximum.X, Maximum.Y)
 The area covered by this box. More...
 

Properties

Vector2 Minimum [get, set]
 The lower left corner of the box (originating from the body's position). More...
 
Vector2 Maximum [get, set]
 The upper right corner of the box (originating from the body's position). More...
 

Detailed Description

Collision-detection using an axis-aligned box.

Member Function Documentation

◆ CollisionTest() [1/2]

override bool FrameOfReference.World.Components.Box.CollisionTest ( Vector2  point,
float  rotation 
)
inline

Determines whether a certain point lies within the box.

Parameters
pointThe point to check for collision in entity space.
rotationHow the box shall be rotated before performing the collision test.
Returns
true if point does collide with the box, false otherwise.

◆ CollisionTest() [2/2]

override bool FrameOfReference.World.Components.Box.CollisionTest ( Quadrangle  area,
float  rotation 
)
inline

Determines whether a certain area lies within the box.

Parameters
areaThe area to check for collision in entity space.
rotationHow the box shall be rotated before performing the collision test.
Returns
true if area does collide with the box, false.

Member Data Documentation

◆ Area

RectangleF FrameOfReference.World.Components.Box.Area => RectangleF.FromLTRB(Minimum.X, Minimum.Y, Maximum.X, Maximum.Y)

The area covered by this box.

Property Documentation

◆ Maximum

Vector2 FrameOfReference.World.Components.Box.Maximum
getset

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

◆ Minimum

Vector2 FrameOfReference.World.Components.Box.Minimum
getset

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


The documentation for this class was generated from the following file: