Dura2D  v0.1.0
An educational 2D game physics library
Loading...
Searching...
No Matches
d2AABB Struct Reference

#include <d2AABB.h>

Public Member Functions

 d2AABB ()=default
 
 d2AABB (const d2Vec2 &lower, const d2Vec2 &upper)
 
d2Vec2 GetCenter () const
 
d2Vec2 GetExtents () const
 
float GetPerimeter () const
 
void Combine (const d2AABB &aabb)
 
void Combine (const d2AABB &aabb1, const d2AABB &aabb2)
 
bool Overlaps (const d2AABB &aabb) const
 
bool Contains (const d2AABB &aabb) const
 
bool Contains (const d2Vec2 &point) const
 

Public Attributes

d2Vec2 lowerBound {}
 
d2Vec2 upperBound {}
 
void * userData {}
 
d2BodyCollider {}
 

Constructor & Destructor Documentation

◆ d2AABB() [1/2]

d2AABB::d2AABB ( )
default

◆ d2AABB() [2/2]

d2AABB::d2AABB ( const d2Vec2 & lower,
const d2Vec2 & upper )
inline

Member Function Documentation

◆ Combine() [1/2]

void d2AABB::Combine ( const d2AABB & aabb)
inline

◆ Combine() [2/2]

void d2AABB::Combine ( const d2AABB & aabb1,
const d2AABB & aabb2 )
inline

◆ Contains() [1/2]

bool d2AABB::Contains ( const d2AABB & aabb) const
inline

◆ Contains() [2/2]

bool d2AABB::Contains ( const d2Vec2 & point) const
inline

◆ GetCenter()

d2Vec2 d2AABB::GetCenter ( ) const
inline

◆ GetExtents()

d2Vec2 d2AABB::GetExtents ( ) const
inline

◆ GetPerimeter()

float d2AABB::GetPerimeter ( ) const
inline

◆ Overlaps()

bool d2AABB::Overlaps ( const d2AABB & aabb) const
inline

Member Data Documentation

◆ Collider

d2Body* d2AABB::Collider {}

◆ lowerBound

d2Vec2 d2AABB::lowerBound {}

◆ upperBound

d2Vec2 d2AABB::upperBound {}

◆ userData

void* d2AABB::userData {}

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