#include <BoundingBoxAligned.h>
|
| CBoundingBoxAligned () |
|
| CBoundingBoxAligned (const CVector3D &min, const CVector3D &max) |
|
void | Transform (const CMatrix3D &m, CBoundingBoxAligned &result) const |
| Transforms these bounds according to the specified transformation matrix m , and writes the axis-aligned bounds of that result to result . More...
|
|
void | Transform (const CMatrix3D &m, CBoundingBoxOriented &result) const |
| Transform these bounds using the matrix transform , and write out the result as an oriented (i.e. More...
|
|
void | Translate (const CVector3D &v, CBoundingBoxAligned &result) const |
| Translates these bounds by v , and writes the result to result . More...
|
|
CVector3D & | operator[] (int index) |
|
const CVector3D & | operator[] (int index) const |
|
void | SetEmpty () |
|
bool | IsEmpty () const |
|
void | Extend (const CVector3D &min, const CVector3D &max) |
|
CBoundingBoxAligned & | operator+= (const CBoundingBoxAligned &b) |
|
CBoundingBoxAligned & | operator+= (const CVector3D &pt) |
|
bool | RayIntersect (const CVector3D &origin, const CVector3D &dir, float &tmin, float &tmax) const |
| Check if a given ray intersects this AABB. More...
|
|
bool | IsPointInside (const CVector3D &point) const |
|
float | GetVolume () const |
|
void | GetCenter (CVector3D ¢er) const |
|
void | Expand (float amount) |
| Expand the bounding box by the given amount in every direction. More...
|
|
void | IntersectFrustumConservative (const CFrustum &frustum) |
| IntersectFrustumConservative: Approximate the intersection of this bounds object with the given frustum. More...
|
|
CFrustum | ToFrustum () const |
| Construct a CFrustum that describes the same volume as this bounding box. More...
|
|
◆ CBoundingBoxAligned() [1/2]
CBoundingBoxAligned::CBoundingBoxAligned |
( |
| ) |
|
|
inline |
◆ CBoundingBoxAligned() [2/2]
◆ Expand()
void CBoundingBoxAligned::Expand |
( |
float |
amount | ) |
|
Expand the bounding box by the given amount in every direction.
◆ Extend()
◆ GetCenter()
void CBoundingBoxAligned::GetCenter |
( |
CVector3D & |
center | ) |
const |
|
inline |
◆ GetVolume()
float CBoundingBoxAligned::GetVolume |
( |
| ) |
const |
|
inline |
◆ IntersectFrustumConservative()
void CBoundingBoxAligned::IntersectFrustumConservative |
( |
const CFrustum & |
frustum | ) |
|
IntersectFrustumConservative: Approximate the intersection of this bounds object with the given frustum.
The bounds object is overwritten with the results.
The approximation is conservative in the sense that the result will always contain the actual intersection, but it may be larger than the intersection itself. The result will always be fully contained within the original bounds.
- Note
- While not in the spirit of this function's purpose, a no-op would be a correct implementation of this function.
-
If this bound is empty, the result is the empty bound.
- Parameters
-
frustum | the frustum to intersect with |
◆ IsEmpty()
bool CBoundingBoxAligned::IsEmpty |
( |
| ) |
const |
◆ IsPointInside()
bool CBoundingBoxAligned::IsPointInside |
( |
const CVector3D & |
point | ) |
const |
◆ operator+=() [1/2]
◆ operator+=() [2/2]
◆ operator[]() [1/2]
CVector3D & CBoundingBoxAligned::operator[] |
( |
int |
index | ) |
|
|
inline |
◆ operator[]() [2/2]
const CVector3D & CBoundingBoxAligned::operator[] |
( |
int |
index | ) |
const |
|
inline |
◆ RayIntersect()
bool CBoundingBoxAligned::RayIntersect |
( |
const CVector3D & |
origin, |
|
|
const CVector3D & |
dir, |
|
|
float & |
tmin, |
|
|
float & |
tmax |
|
) |
| const |
Check if a given ray intersects this AABB.
See also Real-Time Rendering, Third Edition by T. Akenine-Moller, p. 741–742.
- Parameters
-
[in] | origin | Origin of the ray. |
[in] | dir | Direction vector of the ray, defining the positive direction of the ray. Must be of unit length. |
[out] | tmin,tmax | distance in the positive direction from the origin of the ray to the entry and exit points in the bounding box. If the origin is inside the box, then this is counted as an intersection and one of tMin and tMax may be negative. |
- Returns
- true if the ray originating in
origin
and with unit direction vector dir
intersects this AABB, false otherwise.
◆ SetEmpty()
void CBoundingBoxAligned::SetEmpty |
( |
| ) |
|
◆ ToFrustum()
CFrustum CBoundingBoxAligned::ToFrustum |
( |
| ) |
const |
Construct a CFrustum that describes the same volume as this bounding box.
Only valid for non-empty bounding boxes - check IsEmpty() first.
◆ Transform() [1/2]
Transforms these bounds according to the specified transformation matrix m
, and writes the axis-aligned bounds of that result to result
.
◆ Transform() [2/2]
Transform these bounds using the matrix transform
, and write out the result as an oriented (i.e.
non-axis-aligned) box. The difference with Transform(const CMatrix3D&, CBoundingBoxAligned&) is that that method is equivalent to first computing this result, and then taking the axis-aligned bounding boxes from the result again.
◆ Translate()
Translates these bounds by v
, and writes the result to result
.
◆ EMPTY
◆ m_Data
The documentation for this class was generated from the following files: