Definition of a bounding box which is aligned along the axis (BBox AABB).
More...
#include <BBox.h>
Definition of a bounding box which is aligned along the axis (BBox AABB).
Definition at line 31 of file BBox.h.
◆ BBox() [1/3]
Default constructor.
Definition at line 44 of file BBox.h.
◆ BBox() [2/3]
BBox::BBox |
( |
const vec3 & |
_pMin, |
|
|
const vec3 & |
_pMax |
|
) |
| |
|
inline |
Constructor with initialization of the 3 points of the BBox.
- Parameters
-
_pMin | : Definition of the lower point |
_pMax | : Definition of the upper point |
Definition at line 51 of file BBox.h.
◆ BBox() [3/3]
BBox::BBox |
( |
const BBox & |
other | ) |
|
|
inline |
Copy constructor.
Definition at line 54 of file BBox.h.
◆ diag()
Diagonal length of the BBox.
Definition at line 283 of file BBox.h.
◆ getBBMax()
Return the upper point.
Definition at line 60 of file BBox.h.
◆ getBBMin()
Return the lower point.
Definition at line 57 of file BBox.h.
◆ getCentroid()
vec3 BBox::getCentroid |
( |
| ) |
|
|
inline |
Return the center point.
Definition at line 63 of file BBox.h.
◆ Inside()
bool BBox::Inside |
( |
const vec3 & |
pt | ) |
const |
|
inline |
Return true if the point pt is inside the BBox.
Definition at line 286 of file BBox.h.
◆ intersectBox()
bool BBox::intersectBox |
( |
const BBox & |
box | ) |
|
|
inline |
Test the intersection of a BBox with this one.
- Returns
- Return true if they intersect. Also true if the BBox is included into the other.
Definition at line 179 of file BBox.h.
◆ IntersectP()
bool BBox::IntersectP |
( |
vec3 |
pos, |
|
|
vec3 |
dir, |
|
|
decimal * |
hitt0 = NULL , |
|
|
decimal * |
hitt1 = NULL |
|
) |
| const |
|
inline |
Compute the intersection between a Ray and this BBox.
- Parameters
-
pos | [in] Ray position |
dir | [in] Ray direction |
hitt0 | [out] Pointer to a float storing the t entering point of the ray from this BBox |
hitt1 | [out] Pointer to a float storing the t leaving point of the ray from this BBox |
- Returns
- Return true if the ray is in contact with this BBox
Definition at line 214 of file BBox.h.
◆ isInBox()
bool BBox::isInBox |
( |
const vec3 & |
p | ) |
const |
|
inline |
Check if a point is inside the BBox.
- Returns
- Return true if the point is inside
Definition at line 169 of file BBox.h.
◆ MaximumExtend()
int BBox::MaximumExtend |
( |
| ) |
const |
|
inline |
Return the index of the dominant direction (maximal dimension). Index is 0 for x, 1 for y, 2 for z.
Definition at line 189 of file BBox.h.
◆ operator[]() [1/2]
vec3& BBox::operator[] |
( |
int |
i | ) |
|
|
inline |
Return the lower (0) or upper (1) point.
Definition at line 270 of file BBox.h.
◆ operator[]() [2/2]
const vec3& BBox::operator[] |
( |
int |
i | ) |
const |
|
inline |
Return the lower (0) or upper (1) point.
Definition at line 276 of file BBox.h.
◆ setBBMax()
void BBox::setBBMax |
( |
vec3 & |
_pMax | ) |
|
|
inline |
Set the upper point (center point is recomputed)
Definition at line 69 of file BBox.h.
◆ setBBMin()
void BBox::setBBMin |
( |
vec3 & |
_pMin | ) |
|
|
inline |
Set the lower point (center point is recomputed)
Definition at line 66 of file BBox.h.
◆ SurfaceArea()
double BBox::SurfaceArea |
( |
| ) |
const |
|
inline |
Return the BBox area (sum of the lateral areas). Used for the SAH calculation of the accelerators.
Definition at line 72 of file BBox.h.
◆ Union() [1/4]
BBox BBox::Union |
( |
const BBox & |
b, |
|
|
const vec3 & |
p |
|
) |
| |
|
inline |
Union of a point and a BBox. A new BBox is created.
- Parameters
-
b | : Initial BBox (will be not modified) |
p | : Point to insert on the initial BBox |
- Returns
- Return a new BBox
Definition at line 84 of file BBox.h.
◆ Union() [2/4]
BBox BBox::Union |
( |
const vec3 & |
p | ) |
|
|
inline |
Union of a point and the current (this) BBox. A new BBox is created.
- Parameters
-
p | : Point to insert on the initial BBox |
- Returns
- Return a new BBox
Definition at line 102 of file BBox.h.
◆ Union() [3/4]
Union of a BBox and the current one. A new BBox is created.
- Parameters
-
b2 | : A BBox (will be not modified) |
- Returns
- Return a new BBox
Definition at line 121 of file BBox.h.
◆ Union() [4/4]
Union of two BBox. A new BBox is created.
- Parameters
-
b1 | : First BBox (will be not modified) |
b2 | : Second BBox (will be not modified) |
- Returns
- Return a new BBox
Definition at line 152 of file BBox.h.
◆ centroid
Center point of the BBox.
Definition at line 38 of file BBox.h.
◆ isNull
True if the BBox is initialized, false if not.
Definition at line 39 of file BBox.h.
◆ pMax
Upper point of the BBox.
Definition at line 37 of file BBox.h.
◆ pMin
Lower point of the BBox.
Definition at line 36 of file BBox.h.
The documentation for this class was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/codetympan/checkouts/latest/Tympan/geometric_methods/AcousticRaytracer/Geometry/BBox.h