Radium Engine  1.5.14
Loading...
Searching...
No Matches
Ra::Core::Geometry::Obb Class Reference

An oriented bounding box. More...

#include <Core/Geometry/Obb.hpp>

+ Collaboration diagram for Ra::Core::Geometry::Obb:

Public Types

using Transform = Eigen::Transform< Scalar, 3, Eigen::Affine >
 
using Aabb = Eigen::AlignedBox< Scalar, 3 >
 

Public Member Functions

 Obb ()
 Constructors and destructor.
 
 Obb (const Aabb &aabb, const Transform &tr)
 Initialize an OBB from an AABB and a transform.
 
 Obb (const Obb &other)=default
 Default copy constructor and assignment operator.
 
Obboperator= (const Obb &other)=default
 
Aabb toAabb () const
 Return the AABB enclosing this.
 
void addPoint (const Eigen::Matrix< Scalar, 3, 1 > &p)
 Extends the OBB with an new point.
 
Eigen::Matrix< Scalar, 3, 1 > corner (int i) const
 Returns the position of the i^th corner of AABB (model space)
 
Eigen::Matrix< Scalar, 3, 1 > worldCorner (int i) const
 Returns the position of the ith corner of the OBB ( world space )
 
Transform & transform ()
 Non-const access to the obb transformation.
 
const Transform & transform () const
 Const access to the obb transformation.
 

Detailed Description

An oriented bounding box.

Definition at line 11 of file Obb.hpp.

Member Typedef Documentation

◆ Aabb

using Ra::Core::Geometry::Obb::Aabb = Eigen::AlignedBox<Scalar, 3>

Definition at line 15 of file Obb.hpp.

◆ Transform

using Ra::Core::Geometry::Obb::Transform = Eigen::Transform<Scalar, 3, Eigen::Affine>

Definition at line 14 of file Obb.hpp.

Constructor & Destructor Documentation

◆ Obb() [1/2]

Ra::Core::Geometry::Obb::Obb ( )
inline

Constructors and destructor.

Initializes an empty bounding box.

Definition at line 20 of file Obb.hpp.

◆ Obb() [2/2]

Ra::Core::Geometry::Obb::Obb ( const Aabb &  aabb,
const Transform &  tr 
)
inline

Initialize an OBB from an AABB and a transform.

Definition at line 23 of file Obb.hpp.

◆ ~Obb()

virtual Ra::Core::Geometry::Obb::~Obb ( )
inlinevirtual

Definition at line 29 of file Obb.hpp.

Member Function Documentation

◆ addPoint()

void Ra::Core::Geometry::Obb::addPoint ( const Eigen::Matrix< Scalar, 3, 1 > &  p)
inline

Extends the OBB with an new point.

Definition at line 42 of file Obb.hpp.

◆ corner()

Eigen::Matrix< Scalar, 3, 1 > Ra::Core::Geometry::Obb::corner ( int  i) const
inline

Returns the position of the i^th corner of AABB (model space)

Definition at line 45 of file Obb.hpp.

◆ toAabb()

Aabb Ra::Core::Geometry::Obb::toAabb ( ) const
inline

Return the AABB enclosing this.

Definition at line 32 of file Obb.hpp.

+ Here is the call graph for this function:

◆ transform() [1/2]

Transform & Ra::Core::Geometry::Obb::transform ( )
inline

Non-const access to the obb transformation.

Definition at line 55 of file Obb.hpp.

◆ transform() [2/2]

const Transform & Ra::Core::Geometry::Obb::transform ( ) const
inline

Const access to the obb transformation.

Definition at line 58 of file Obb.hpp.

◆ worldCorner()

Eigen::Matrix< Scalar, 3, 1 > Ra::Core::Geometry::Obb::worldCorner ( int  i) const
inline

Returns the position of the ith corner of the OBB ( world space )

Definition at line 50 of file Obb.hpp.


The documentation for this class was generated from the following file: