Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
Public Member Functions | Public Attributes | List of all members
jau::math::geom::AABBox2f Class Reference

Axis Aligned Bounding Box. More...

#include <aabbox2f.hpp>

Collaboration diagram for jau::math::geom::AABBox2f:

Public Member Functions

 AABBox2f () noexcept
 Create an Axis Aligned bounding box (AABBox) where the low and and high MAX float Values. More...
 
constexpr AABBox2f (AABBox2f &&o) noexcept=default
 
constexpr AABBox2f (const AABBox2f &o) noexcept=default
 
 AABBox2f (const Point2f &bl_, const Point2f &tr_) noexcept
 Create an AABBox with given bl (low) and tr (high) More...
 
AABBox2f box () const noexcept
 
bool contains (const float x, const float y) const noexcept
 Check if the point is bounded/contained by this AABBox. More...
 
bool contains (const Point2f &p) const noexcept
 Check if the point is bounded/contained by this AABBox. More...
 
bool intersects (const AABBox2f &o) const noexcept
 
AABBox2foperator= (AABBox2f &&) noexcept=default
 
AABBox2foperator= (const AABBox2f &) noexcept=default
 
AABBox2freset () noexcept
 Reset this box to the inverse low/high, allowing the next resize(float, float, float) command to hit. More...
 
AABBox2fresize (const AABBox2f &o) noexcept
 Resize the AABBox to encapsulate another AABox. More...
 
AABBox2fresize (const Point2f &p) noexcept
 Resize the AABBox to encapsulate the passed point. More...
 
AABBox2fresize (float x, float y) noexcept
 Resize the AABBox to encapsulate the passed coordinates. More...
 
std::string toString () const noexcept
 

Public Attributes

Point2f bl
 bottom left (low) More...
 
Point2f tr
 top right (high) More...
 

Detailed Description

Axis Aligned Bounding Box.

Defined by two 3D coordinates (low and high) The low being the the lower left corner of the box, and the high being the upper right corner of the box.

A few references for collision detection, intersections:

Definition at line 47 of file aabbox2f.hpp.

Constructor & Destructor Documentation

◆ AABBox2f() [1/4]

jau::math::geom::AABBox2f::AABBox2f ( )
inlinenoexcept

Create an Axis Aligned bounding box (AABBox) where the low and and high MAX float Values.

Definition at line 58 of file aabbox2f.hpp.

◆ AABBox2f() [2/4]

jau::math::geom::AABBox2f::AABBox2f ( const Point2f bl_,
const Point2f tr_ 
)
inlinenoexcept

Create an AABBox with given bl (low) and tr (high)

Definition at line 65 of file aabbox2f.hpp.

◆ AABBox2f() [3/4]

constexpr jau::math::geom::AABBox2f::AABBox2f ( const AABBox2f o)
constexprdefaultnoexcept

◆ AABBox2f() [4/4]

constexpr jau::math::geom::AABBox2f::AABBox2f ( AABBox2f &&  o)
constexprdefaultnoexcept

Member Function Documentation

◆ operator=() [1/2]

AABBox2f & jau::math::geom::AABBox2f::operator= ( const AABBox2f )
defaultnoexcept

◆ operator=() [2/2]

AABBox2f & jau::math::geom::AABBox2f::operator= ( AABBox2f &&  )
defaultnoexcept

◆ reset()

AABBox2f & jau::math::geom::AABBox2f::reset ( )
inlinenoexcept

Reset this box to the inverse low/high, allowing the next resize(float, float, float) command to hit.

Returns
this AABBox for chaining

Definition at line 78 of file aabbox2f.hpp.

Here is the caller graph for this function:

◆ resize() [1/3]

AABBox2f & jau::math::geom::AABBox2f::resize ( const AABBox2f o)
inlinenoexcept

Resize the AABBox to encapsulate another AABox.

Parameters
newBoxAABBox to be encapsulated in
Returns
this AABBox for chaining

Definition at line 91 of file aabbox2f.hpp.

Here is the caller graph for this function:

◆ resize() [2/3]

AABBox2f & jau::math::geom::AABBox2f::resize ( float  x,
float  y 
)
inlinenoexcept

Resize the AABBox to encapsulate the passed coordinates.

Parameters
xx-axis coordinate value
yy-axis coordinate value
Returns
this AABBox for chaining

Definition at line 117 of file aabbox2f.hpp.

◆ resize() [3/3]

AABBox2f & jau::math::geom::AABBox2f::resize ( const Point2f p)
inlinenoexcept

Resize the AABBox to encapsulate the passed point.

Parameters
xx-axis coordinate value
yy-axis coordinate value
Returns
this AABBox for chaining

Definition at line 143 of file aabbox2f.hpp.

◆ box()

AABBox2f jau::math::geom::AABBox2f::box ( ) const
inlinenoexcept

Definition at line 147 of file aabbox2f.hpp.

◆ contains() [1/2]

bool jau::math::geom::AABBox2f::contains ( const float  x,
const float  y 
) const
inlinenoexcept

Check if the point is bounded/contained by this AABBox.

Returns
true if {x, y} belongs to (low.x, high.x) and y belong to (low.y, high.y)

Definition at line 153 of file aabbox2f.hpp.

Here is the caller graph for this function:

◆ contains() [2/2]

bool jau::math::geom::AABBox2f::contains ( const Point2f p) const
inlinenoexcept

Check if the point is bounded/contained by this AABBox.

Returns
true if p belongs to (low.x, high.x) and y belong to (low.y, high.y)

Definition at line 162 of file aabbox2f.hpp.

Here is the caller graph for this function:

◆ intersects()

bool jau::math::geom::AABBox2f::intersects ( const AABBox2f o) const
inlinenoexcept

Definition at line 164 of file aabbox2f.hpp.

Here is the caller graph for this function:

◆ toString()

std::string jau::math::geom::AABBox2f::toString ( ) const
inlinenoexcept

Definition at line 180 of file aabbox2f.hpp.

Member Data Documentation

◆ bl

Point2f jau::math::geom::AABBox2f::bl

bottom left (low)

Definition at line 50 of file aabbox2f.hpp.

◆ tr

Point2f jau::math::geom::AABBox2f::tr

top right (high)

Definition at line 52 of file aabbox2f.hpp.


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