![]() |
PURE API 0.5
PR00F's Ultimate Rendering Engine full documentation
|
AABB: Axis-Aligned Bounding Box class. More...
AABB: Axis-Aligned Bounding Box class.
file:///D:/__PR00F__/___developing___/projects/PGE/PGE/Docs/PURE/html/visibility.html https://github.com/brandonpelfrey/Fast-BVH/tree/master/include https://github.com/GrandPiaf/Raytracer/blob/master/Raytracer/AABB.h https://github.com/taqu/BoundingVolumeHierarchy
Definition at line 26 of file PureAxisAlignedBoundingBox.h.
#include <PureAxisAlignedBoundingBox.h>
Public Member Functions | |
PureAxisAlignedBoundingBox () | |
PureAxisAlignedBoundingBox (const PureVector &pos_, const PureVector &size_) | |
virtual | ~PureAxisAlignedBoundingBox () |
const PureVector & | getPosVec () const |
Gets the world-space position which is the center of the bounding box. | |
const PureVector & | getSizeVec () const |
Gets the base sizes. | |
TPureBool | isInside (const PureVector &p) const |
Is the given point inside the bounding box? | |
TPureBool | isInside (const PureAxisAlignedBoundingBox &aabb) const |
Is the given box inside the bounding box? | |
void | ExtendBy (const PureVector &p) |
Extends the size of the bounding box so the given point will be inside the box. | |
void | ExtendBy (const PureAxisAlignedBoundingBox &aabb) |
Extends the size of the bounding box so the given box will be inside the box. | |
Private Attributes | |
PureVector | pos |
PureVector | size |
PureAxisAlignedBoundingBox::PureAxisAlignedBoundingBox | ( | ) |
Definition at line 24 of file PureAxisAlignedBoundingBox.cpp.
PureAxisAlignedBoundingBox::PureAxisAlignedBoundingBox | ( | const PureVector & | pos_, |
const PureVector & | size_ ) |
Definition at line 30 of file PureAxisAlignedBoundingBox.cpp.
|
virtual |
Definition at line 38 of file PureAxisAlignedBoundingBox.cpp.
void PureAxisAlignedBoundingBox::ExtendBy | ( | const PureAxisAlignedBoundingBox & | aabb | ) |
Extends the size of the bounding box so the given box will be inside the box.
The position of the bounding box is also expected to change after the extend. If this is a 0-sized (uninitialized) box, its position and size will be set to the position and size of the given box (copy).
aabb | The box to be included. |
Definition at line 149 of file PureAxisAlignedBoundingBox.cpp.
void PureAxisAlignedBoundingBox::ExtendBy | ( | const PureVector & | p | ) |
Extends the size of the bounding box so the given point will be inside the box.
The position of the bounding box is also expected to change after the extend. If this is a 0-sized (uninitialized) box, nothing will happen.
p | The point to be included. Coordinates are expected in world-space. |
Definition at line 107 of file PureAxisAlignedBoundingBox.cpp.
const PureVector & PureAxisAlignedBoundingBox::getPosVec | ( | ) | const |
Gets the world-space position which is the center of the bounding box.
Definition at line 48 of file PureAxisAlignedBoundingBox.cpp.
const PureVector & PureAxisAlignedBoundingBox::getSizeVec | ( | ) | const |
Gets the base sizes.
Definition at line 58 of file PureAxisAlignedBoundingBox.cpp.
TPureBool PureAxisAlignedBoundingBox::isInside | ( | const PureAxisAlignedBoundingBox & | aabb | ) | const |
Is the given box inside the bounding box?
aabb | The box to be tested. |
Definition at line 84 of file PureAxisAlignedBoundingBox.cpp.
TPureBool PureAxisAlignedBoundingBox::isInside | ( | const PureVector & | p | ) | const |
Is the given point inside the bounding box?
p | The point to be tested. Coordinates are expected in world-space. |
Definition at line 69 of file PureAxisAlignedBoundingBox.cpp.
|
private |
Definition at line 58 of file PureAxisAlignedBoundingBox.h.
|
private |
Definition at line 59 of file PureAxisAlignedBoundingBox.h.