|
| TAABB () |
| Create a new invalid bounding box. More...
|
|
| TAABB (Stream *stream) |
| Unserialize a bounding box from a binary data stream. More...
|
|
| TAABB (const PointType &p) |
| Create a collapsed AABB from a single point. More...
|
|
| TAABB (const PointType &min, const PointType &max) |
| Create a bounding box from two positions. More...
|
|
| TAABB (const TAABB &aabb) |
| Copy constructor. More...
|
|
bool | operator== (const TAABB &aabb) const |
| Equality test. More...
|
|
bool | operator!= (const TAABB &aabb) const |
| Inequality test. More...
|
|
void | clip (const TAABB &aabb) |
| Clip to another bounding box. More...
|
|
void | reset () |
| Mark the bounding box as invalid. More...
|
|
Scalar | getVolume () const |
| Calculate the n-dimensional volume of the bounding box. More...
|
|
Float | getSurfaceArea () const |
| Calculate the n-1 dimensional volume of the boundary. More...
|
|
PointType | getCenter () const |
| Return the center point. More...
|
|
PointType | getCorner (int index) const |
| Return the position of one of the corners (in 0..2^dim-1 ) More...
|
|
TAABB | getChild (int index) const |
| Return a child bounding box in a interval-, quad-, octree, etc. More...
|
|
bool | contains (const PointType &p) const |
| Check whether a point lies on or inside the bounding box. More...
|
|
bool | contains (const TAABB &aabb) const |
| Check whether a given bounding box is contained within this one. More...
|
|
bool | overlaps (const TAABB &aabb) const |
| Axis-aligned bounding box overlap test. More...
|
|
void | expandBy (const PointType &p) |
| Expand the bounding box to contain another point. More...
|
|
void | expandBy (const TAABB &aabb) |
| Expand the bounding box to contain another bounding box. More...
|
|
Scalar | squaredDistanceTo (const PointType &p) const |
| Calculate the squared point-AABB distance. More...
|
|
Scalar | distanceTo (const PointType &p) const |
| Calculate the point-AABB distance. More...
|
|
Scalar | squaredDistanceTo (const TAABB &aabb) const |
| Calculate the minimum squared AABB-AABB distance. More...
|
|
Scalar | distanceTo (const TAABB &aabb) const |
| Calculate the minimum AABB-AABB distance. More...
|
|
bool | isValid () const |
| Return whether this bounding box is valid. More...
|
|
bool | isEmpty () const |
| Return whether or not this bounding box covers anything at all. More...
|
|
int | getLargestAxis () const |
| Return the axis index with the largest associated side length. More...
|
|
int | getShortestAxis () const |
| Return the axis index with the shortest associated side length. More...
|
|
VectorType | getExtents () const |
| Calculate the bounding box extents. More...
|
|
FINLINE bool | rayIntersect (const RayType &ray, Float &nearT, Float &farT) const |
| Calculate the near and far ray-AABB intersection points (if they exist). More...
|
|
FINLINE bool | rayIntersect (const RayType &ray, Float &nearT, Float &farT, PointType &near, PointType &far) const |
| Calculate the overlap between an axis-aligned bounding box and a ray segment. More...
|
|
void | serialize (Stream *stream) const |
| Serialize this bounding box to a binary data stream. More...
|
|
std::string | toString () const |
| Return a string representation of the bounding box. More...
|
|
template<typename T>
struct mitsuba::TAABB< T >
Generic multi-dimensional bounding box data structure.
Maintains a component-wise minimum and maximum position and provides various convenience functions to query or change them.
- Template Parameters
-
T | Underlying point data type (e.g. TPoint3<float> ) |
Calculate the overlap between an axis-aligned bounding box and a ray segment.
This function is an extended version of the simpler rayIntersect command provided above. The first change is that input values passed via the nearT
and farT
parameters are considered to specify a query interval.
This interval is intersected against the bounding box, returning the remaining interval using the nearT
and farT
parameters. Furthermore, the interval endpoints are also returned as 3D positions via the near
and far
parameters. Special care is taken to reduce round-off errors.