Fx2D
A C++20 2D rigid-body physics engine
Loading...
Searching...
No Matches
FxAABB Struct Reference

Axis-aligned bounding box used by broad-phase operations. More...

#include <Geometry.h>

Public Member Functions

 FxAABB ()=default
 
 FxAABB (float mnX, float mnY, float mxX, float mxY)
 
FxAABB fatten (float margin) const
 
float perimeter () const
 
bool overlaps (const FxAABB &o) const
 
bool contains (const FxAABB &inner) const
 
bool is_valid () const
 

Static Public Member Functions

static FxAABB combine (const FxAABB &a, const FxAABB &b)
 

Public Attributes

float minX = 0.0f
 
float minY = 0.0f
 
float maxX = 0.0f
 
float maxY = 0.0f
 

Detailed Description

Axis-aligned bounding box used by broad-phase operations.

Definition at line 20 of file Geometry.h.

Constructor & Destructor Documentation

◆ FxAABB() [1/2]

FxAABB::FxAABB ( )
default

◆ FxAABB() [2/2]

FxAABB::FxAABB ( float  mnX,
float  mnY,
float  mxX,
float  mxY 
)
inline

Definition at line 23 of file Geometry.h.

Member Function Documentation

◆ combine()

static FxAABB FxAABB::combine ( const FxAABB &  a,
const FxAABB &  b 
)
inlinestatic

Definition at line 25 of file Geometry.h.

◆ contains()

bool FxAABB::contains ( const FxAABB &  inner) const
inline

Definition at line 36 of file Geometry.h.

◆ fatten()

FxAABB FxAABB::fatten ( float  margin) const
inline

Definition at line 29 of file Geometry.h.

◆ is_valid()

bool FxAABB::is_valid ( ) const
inline

Definition at line 39 of file Geometry.h.

◆ overlaps()

bool FxAABB::overlaps ( const FxAABB &  o) const
inline

Definition at line 33 of file Geometry.h.

◆ perimeter()

float FxAABB::perimeter ( ) const
inline

Definition at line 32 of file Geometry.h.

Member Data Documentation

◆ maxX

float FxAABB::maxX = 0.0f

Definition at line 21 of file Geometry.h.

◆ maxY

float FxAABB::maxY = 0.0f

Definition at line 21 of file Geometry.h.

◆ minX

float FxAABB::minX = 0.0f

Definition at line 21 of file Geometry.h.

◆ minY

float FxAABB::minY = 0.0f

Definition at line 21 of file Geometry.h.


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