Loading...
Searching...
No Matches
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T > Class Template Reference

Mathematical representation of a box which can be arbitrarily positioned and rotated. More...

#include <OrientedBox.hh>

Public Member Functions

 OrientedBox ()
 Default constructor.
 
 OrientedBox (const OrientedBox< T > &_b)
 Copy constructor.
 
 OrientedBox (const Vector3< T > &_size)
 Constructor which takes only the size.
 
 OrientedBox (const Vector3< T > &_size, const Pose3< T > &_pose)
 Constructor which takes size and pose.
 
virtual ~OrientedBox ()
 Destructor.
 
bool Contains (const Vector3d &_p) const
 Check if a point lies inside the box.
 
bool operator!= (const OrientedBox< T > &_b) const
 Inequality test operator.
 
OrientedBoxoperator= (const OrientedBox< T > &_b)
 Assignment operator.
 
bool operator== (const OrientedBox< T > &_b) const
 Equality test operator.
 
const Pose3< T > & Pose () const
 Get the box pose, which is the pose of its center.
 
void Pose (Pose3< T > &_pose)
 Set the box pose.
 
const Vector3< T > & Size () const
 Get the size of the box.
 
void Size (Vector3< T > &_size)
 Set the box size.
 
XLength () const
 Get the length along the x dimension.
 
YLength () const
 Get the length along the y dimension.
 
ZLength () const
 Get the length along the z dimension.
 

Detailed Description

template<typename T>
class ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >

Mathematical representation of a box which can be arbitrarily positioned and rotated.

Constructor & Destructor Documentation

◆ OrientedBox() [1/4]

template<typename T >
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::OrientedBox ( )
inline

Default constructor.

◆ OrientedBox() [2/4]

template<typename T >
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::OrientedBox ( const Vector3< T > & _size,
const Pose3< T > & _pose )
inline

Constructor which takes size and pose.

Parameters
[in]_sizeBox size, in its own coordinate frame. Its absolute value will be taken, so the size is non-negative.
[in]_poseBox pose.

◆ OrientedBox() [3/4]

template<typename T >
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::OrientedBox ( const Vector3< T > & _size)
inlineexplicit

Constructor which takes only the size.

Parameters
[in]_sizeBox size, in its own coordinate frame. Its absolute value will be taken, so the size is non-negative.

◆ OrientedBox() [4/4]

template<typename T >
ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::OrientedBox ( const OrientedBox< T > & _b)
inline

Copy constructor.

Parameters
[in]_bOrientedBox to copy.

◆ ~OrientedBox()

template<typename T >
virtual ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::~OrientedBox ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ Contains()

template<typename T >
bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::Contains ( const Vector3d & _p) const
inline

Check if a point lies inside the box.

Parameters
[in]_pPoint to check.
Returns
True if the point is inside the box.

References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Matrix4< T >::Inverse(), and ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Vector3< T >::X().

◆ operator!=()

template<typename T >
bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::operator!= ( const OrientedBox< T > & _b) const
inline

Inequality test operator.

Parameters
[in]_bOrientedBox to test
Returns
True if not equal

◆ operator=()

template<typename T >
OrientedBox & ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::operator= ( const OrientedBox< T > & _b)
inline

Assignment operator.

Set this box to the parameter

Parameters
[in]_bOrientedBox to copy
Returns
The new box.

◆ operator==()

template<typename T >
bool ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::operator== ( const OrientedBox< T > & _b) const
inline

Equality test operator.

Parameters
[in]_bOrientedBox to test
Returns
True if equal

◆ Pose() [1/2]

template<typename T >
const Pose3< T > & ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::Pose ( ) const
inline

Get the box pose, which is the pose of its center.

Returns
The pose of the box.

◆ Pose() [2/2]

template<typename T >
void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::Pose ( Pose3< T > & _pose)
inline

Set the box pose.

Parameters
[in]_poseBox pose.

◆ Size() [1/2]

template<typename T >
const Vector3< T > & ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::Size ( ) const
inline

Get the size of the box.

Returns
Size of the box

◆ Size() [2/2]

template<typename T >
void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::Size ( Vector3< T > & _size)
inline

Set the box size.

Parameters
[in]_sizeBox size, in its own coordinate frame. Its absolute value will be taken, so the size is non-negative.

References ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Vector3< T >::Abs().

◆ XLength()

template<typename T >
T ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::XLength ( ) const
inline

Get the length along the x dimension.

Returns
Value of the length in the x dimension

◆ YLength()

template<typename T >
T ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::YLength ( ) const
inline

Get the length along the y dimension.

Returns
Value of the length in the y dimension

◆ ZLength()

template<typename T >
T ignition::math::IGNITION_MATH_VERSION_NAMESPACE::OrientedBox< T >::ZLength ( ) const
inline

Get the length along the z dimension.

Returns
Value of the length in the z dimension

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