Frame of Reference Game API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
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:

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 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

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.
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

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

The area covered by this box.

Property Documentation

Vector2 FrameOfReference.World.Components.Box.Maximum
getset

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

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: