|
VisuTwin Canvas
C++ 3D Engine — Metal Backend
|
Axis-Aligned Bounding Box defined by center and half-extents. More...
#include <core/shape/boundingBox.h>
Public Member Functions | |
| void | add (const BoundingBox &other) |
| BoundingBox () | |
| BoundingBox (const Vector3 ¢er, const Vector3 &halfExtents) | |
| const Vector3 & | center () const |
| const Vector3 & | halfExtents () const |
| void | setCenter (const Vector3 ¢er) |
| void | setCenter (float x, float y, float z) |
| void | setFromTransformedAabb (const BoundingBox &aabb, const Matrix4 &m, bool ignoreScale=false) |
| void | setHalfExtents (const Vector3 &halfExtents) |
| void | setHalfExtents (float x, float y, float z) |
Axis-Aligned Bounding Box defined by center and half-extents.
Used for frustum culling, spatial queries, and broad-phase collision detection. Supports union (add), transform, and intersection tests against rays, spheres, and other AABBs.
Definition at line 20 of file boundingBox.h.
|
inline |
Definition at line 23 of file boundingBox.h.
Referenced by add(), and setFromTransformedAabb().
|
inline |
Definition at line 24 of file boundingBox.h.
References center(), and halfExtents().
| void visutwin::canvas::BoundingBox::add | ( | const BoundingBox & | other | ) |
Combines two bounding boxes into one, enclosing both. Modifies this bounding box in place.
Definition at line 74 of file boundingBox.cpp.
References BoundingBox(), center(), visutwin::canvas::Vector3::getX(), visutwin::canvas::Vector3::getY(), visutwin::canvas::Vector3::getZ(), and halfExtents().
Referenced by visutwin::canvas::Batch::updateBoundingBox(), and visutwin::canvas::CollisionComponent::worldBounds().
|
inline |
Definition at line 27 of file boundingBox.h.
Referenced by add(), BoundingBox(), visutwin::canvas::isVisibleInCameraFrustum(), visutwin::canvas::Picker::prepare(), setCenter(), setFromTransformedAabb(), and visutwin::canvas::CollisionComponent::worldBounds().
|
inline |
Definition at line 35 of file boundingBox.h.
Referenced by add(), BoundingBox(), visutwin::canvas::isVisibleInCameraFrustum(), visutwin::canvas::Picker::prepare(), setFromTransformedAabb(), setHalfExtents(), and visutwin::canvas::CollisionComponent::worldBounds().
|
inline |
Definition at line 28 of file boundingBox.h.
References center().
Referenced by visutwin::canvas::MeshInstance::aabb(), visutwin::canvas::GlbParser::createFromModel(), visutwin::canvas::GlbParser::createFromPrepared(), visutwin::canvas::GlbParser::parse(), visutwin::canvas::ObjParser::parse(), and visutwin::canvas::StlParser::parse().
|
inline |
Definition at line 30 of file boundingBox.h.
| void visutwin::canvas::BoundingBox::setFromTransformedAabb | ( | const BoundingBox & | aabb, |
| const Matrix4 & | m, | ||
| bool | ignoreScale = false ) |
Definition at line 10 of file boundingBox.cpp.
References BoundingBox(), center(), visutwin::canvas::Matrix4::getElement(), visutwin::canvas::Vector3::getX(), visutwin::canvas::Vector3::getY(), visutwin::canvas::Vector3::getZ(), and halfExtents().
|
inline |
Definition at line 36 of file boundingBox.h.
References halfExtents().
Referenced by visutwin::canvas::MeshInstance::aabb(), visutwin::canvas::GlbParser::createFromModel(), visutwin::canvas::GlbParser::createFromPrepared(), visutwin::canvas::GlbParser::parse(), visutwin::canvas::ObjParser::parse(), and visutwin::canvas::StlParser::parse().
|
inline |
Definition at line 38 of file boundingBox.h.