#include <AABB.h>
◆ IntersectionType
Type returned from call to intersect.
| Enumerator |
|---|
| INSIDE | |
| INTERSECT | |
| OUTSIDE | |
◆ AABB() [1/4]
| Raito::Math::AABB::AABB |
( |
| ) |
|
◆ AABB() [2/4]
| Raito::Math::AABB::AABB |
( |
const V3 & | center, |
|
|
glm::float32_t | radius ) |
Builds an AABB that encompasses a sphere.
- Parameters
-
| [in] | center | Center of the sphere. |
| [in] | radius | Radius of the sphere. |
◆ AABB() [3/4]
| Raito::Math::AABB::AABB |
( |
const V3 & | p1, |
|
|
const V3 & | p2 ) |
Builds an AABB that contains the two points.
◆ AABB() [4/4]
| Raito::Math::AABB::AABB |
( |
const AABB & | aabb | ) |
|
◆ ~AABB()
| Raito::Math::AABB::~AABB |
( |
| ) |
|
|
default |
◆ Extend() [1/5]
| void Raito::Math::AABB::Extend |
( |
const AABB & | aabb | ) |
|
Expand the AABB to encompass the given aabb.
◆ Extend() [2/5]
| void Raito::Math::AABB::Extend |
( |
const V3 & | center, |
|
|
glm::float32_t | radius ) |
Expand the AABB to include a sphere centered at center and of radius radius.
- Parameters
-
| [in] | center | Center of sphere. |
| [in] | radius | Radius of sphere. |
◆ Extend() [3/5]
| void Raito::Math::AABB::Extend |
( |
const V3 & | p | ) |
|
Expand the AABB to include point p.
◆ Extend() [4/5]
| void Raito::Math::AABB::Extend |
( |
const V3 * | pointsArray, |
|
|
int | numCount ) |
◆ Extend() [5/5]
| void Raito::Math::AABB::Extend |
( |
glm::float32_t | val | ) |
|
Extend the bounding box on all sides by val.
◆ ExtendDisk()
| void Raito::Math::AABB::ExtendDisk |
( |
const V3 & | center, |
|
|
const V3 & | normal, |
|
|
glm::float32_t | radius ) |
Expand the AABB to include a disk centered at center, with normal normal, and radius radius. \xxx Untested – This function is not represented in our unit tests.
◆ GetCenter()
| V3 Raito::Math::AABB::GetCenter |
( |
| ) |
const |
Retrieves the center of the AABB.
◆ GetDiagonal()
| V3 Raito::Math::AABB::GetDiagonal |
( |
| ) |
const |
Retrieves the diagonal vector (computed as m_Max - m_Min). If the AABB is NULL, then a vector of all zeros is returned.
◆ GetExtent()
| V3 Raito::Math::AABB::GetExtent |
( |
| ) |
const |
◆ GetLongestEdge()
| glm::float32_t Raito::Math::AABB::GetLongestEdge |
( |
| ) |
const |
Retrieves the longest edge. If the AABB is NULL, then 0 is returned.
◆ GetMax()
Retrieves the AABB's maximum point.
◆ GetMin()
Retrieves the AABB's minimum point.
◆ GetShortestEdge()
| glm::float32_t Raito::Math::AABB::GetShortestEdge |
( |
| ) |
const |
Retrieves the shortest edge. If the AABB is NULL, then 0 is returned.
◆ HalfSize()
| V3 Raito::Math::AABB::HalfSize |
( |
| ) |
const |
[similarOverload: Size]
Returns Size()/2.
- See also
- Size(), HalfDiagonal().
◆ Intersect()
Returns one of the intersection types. If either of the aabbs are invalid, then OUTSIDE is returned.
◆ IsNull()
| NODISCARD bool Raito::Math::AABB::IsNull |
( |
| ) |
const |
|
inline |
Returns true if AABB is NULL (not set).
◆ IsSimilarTo()
| bool Raito::Math::AABB::IsSimilarTo |
( |
const AABB & | b, |
|
|
glm::float32_t | diff = 0.5 ) const |
Function from SCIRun. Here is a summary of SCIRun's description: Returns true if the two AABB's are similar. If diff is 1.0, the two bboxes have to have about 50% overlap each for x,y,z. If diff is 0.0, they have to have 100% overlap. If either of the two AABBs is NULL, then false is returned. \xxx Untested – This function is not represented in our unit tests.
◆ Overlaps()
| bool Raito::Math::AABB::Overlaps |
( |
const AABB & | bb | ) |
const |
Returns true if AABBs share a face overlap. \xxx Untested – This function is not represented in our unit tests.
◆ Scale() [1/2]
| void Raito::Math::AABB::Scale |
( |
const V3 & | scale | ) |
|
◆ Scale() [2/2]
| void Raito::Math::AABB::Scale |
( |
const V3 & | scale, |
|
|
const V3 & | origin ) |
Scale the AABB by scale, centered around origin.
- Parameters
-
| [in] | scale | 3D vector specifying scale along each axis. |
| [in] | origin | Origin of scaling operation. Most useful origin would be the center of the AABB. |
◆ SetNull()
| void Raito::Math::AABB::SetNull |
( |
| ) |
|
|
inline |
Set the AABB as NULL (not set).
◆ Size()
| V3 Raito::Math::AABB::Size |
( |
| ) |
const |
Returns the side lengths of this AABB in x, y and z directions.
The returned vector is equal to the diagonal vector of this AABB, i.e. it spans from the minimum corner of the AABB to the maximum corner of the AABB.
- See also
- HalfSize(), Diagonal().
◆ Translate()
| void Raito::Math::AABB::Translate |
( |
const V3 & | v | ) |
|
Translates AABB by vector v.
The documentation for this class was generated from the following files: