Public Types | Public Member Functions | Public Attributes | List of all members
fcl::OBB< S_ > Class Template Reference

Oriented bounding box class. More...

#include <OBB.h>

Public Types

using S = S_
 

Public Member Functions

const Vector3< Scenter () const
 Center of the OBB. More...
 
bool contain (const Vector3< S > &p) const
 Check whether the OBB contains a point. More...
 
S depth () const
 Depth of the OBB. More...
 
S distance (const OBB &other, Vector3< S > *P=nullptr, Vector3< S > *Q=nullptr) const
 Distance between two OBBs, not implemented. More...
 
S height () const
 Height of the OBB. More...
 
 OBB ()
 Constructor. More...
 
 OBB (const Matrix3< S > &axis, const Vector3< S > &center, const Vector3< S > &extent)
 Constructor. More...
 
OBB< Soperator+ (const OBB< S > &other) const
 Return the merged OBB of current OBB and the other one (the result is not compact). More...
 
OBB< S > & operator+= (const OBB< S > &other)
 Merge the OBB and another OBB (the result is not compact). More...
 
OBB< S > & operator+= (const Vector3< S > &p)
 A simple way to merge the OBB and a point (the result is not compact). More...
 
bool overlap (const OBB< S > &other) const
 Check collision between two OBB, return true if collision happens. More...
 
bool overlap (const OBB< S > &other, OBB< S > &overlap_part) const
 Check collision between two OBB and return the overlap part. For OBB, the overlap_part return value is NOT used as the overlap part of two obbs usually is not an obb. More...
 
S size () const
 Size of the OBB (used in BV_Splitter to order two OBBs) More...
 
S volume () const
 Volume of the OBB. More...
 
S width () const
 Width of the OBB. More...
 

Public Attributes

Matrix3< Saxis
 Orientation of OBB. The axes of the rotation matrix are the principle directions of the box. We assume that the first column corresponds to the axis with the longest box edge, second column corresponds to the shorter one and the third coulumn corresponds to the shortest one. More...
 
Vector3< Sextent
 Half dimensions of OBB. More...
 
Vector3< STo
 Center of OBB. More...
 

Detailed Description

template<typename S_>
class fcl::OBB< S_ >

Oriented bounding box class.

Definition at line 51 of file OBB.h.

Member Typedef Documentation

◆ S

template<typename S_ >
using fcl::OBB< S_ >::S = S_

Definition at line 55 of file OBB.h.

Constructor & Destructor Documentation

◆ OBB() [1/2]

template<typename S >
fcl::OBB< S >::OBB

Constructor.

Definition at line 81 of file OBB-inl.h.

◆ OBB() [2/2]

template<typename S >
fcl::OBB< S >::OBB ( const Matrix3< S > &  axis,
const Vector3< S > &  center,
const Vector3< S > &  extent 
)

Constructor.

Definition at line 88 of file OBB-inl.h.

Member Function Documentation

◆ center()

template<typename S >
const Vector3< S > fcl::OBB< S >::center

Center of the OBB.

Definition at line 213 of file OBB-inl.h.

◆ contain()

template<typename S >
bool fcl::OBB< S >::contain ( const Vector3< S > &  p) const

Check whether the OBB contains a point.

Definition at line 122 of file OBB-inl.h.

◆ depth()

template<typename S >
S fcl::OBB< S >::depth

Depth of the OBB.

Definition at line 192 of file OBB-inl.h.

◆ distance()

template<typename S >
S fcl::OBB< S >::distance ( const OBB< S_ > &  other,
Vector3< S > *  P = nullptr,
Vector3< S > *  Q = nullptr 
) const

Distance between two OBBs, not implemented.

Definition at line 220 of file OBB-inl.h.

◆ height()

template<typename S >
S fcl::OBB< S >::height

Height of the OBB.

Definition at line 185 of file OBB-inl.h.

◆ operator+()

template<typename S >
OBB< S > fcl::OBB< S >::operator+ ( const OBB< S > &  other) const

Return the merged OBB of current OBB and the other one (the result is not compact).

Definition at line 161 of file OBB-inl.h.

◆ operator+=() [1/2]

template<typename S >
OBB< S > & fcl::OBB< S >::operator+= ( const OBB< S > &  other)

Merge the OBB and another OBB (the result is not compact).

Definition at line 152 of file OBB-inl.h.

◆ operator+=() [2/2]

template<typename S >
OBB< S > & fcl::OBB< S >::operator+= ( const Vector3< S > &  p)

A simple way to merge the OBB and a point (the result is not compact).

Definition at line 142 of file OBB-inl.h.

◆ overlap() [1/2]

template<typename S >
bool fcl::OBB< S >::overlap ( const OBB< S > &  other) const

Check collision between two OBB, return true if collision happens.

compute the relative transform that takes us from this->frame to other.frame

Definition at line 98 of file OBB-inl.h.

◆ overlap() [2/2]

template<typename S >
bool fcl::OBB< S >::overlap ( const OBB< S > &  other,
OBB< S > &  overlap_part 
) const

Check collision between two OBB and return the overlap part. For OBB, the overlap_part return value is NOT used as the overlap part of two obbs usually is not an obb.

Definition at line 113 of file OBB-inl.h.

◆ size()

template<typename S >
S fcl::OBB< S >::size

Size of the OBB (used in BV_Splitter to order two OBBs)

Definition at line 206 of file OBB-inl.h.

◆ volume()

template<typename S >
S fcl::OBB< S >::volume

Volume of the OBB.

Definition at line 199 of file OBB-inl.h.

◆ width()

template<typename S >
S fcl::OBB< S >::width

Width of the OBB.

Definition at line 178 of file OBB-inl.h.

Member Data Documentation

◆ axis

template<typename S_ >
Matrix3<S> fcl::OBB< S_ >::axis

Orientation of OBB. The axes of the rotation matrix are the principle directions of the box. We assume that the first column corresponds to the axis with the longest box edge, second column corresponds to the shorter one and the third coulumn corresponds to the shortest one.

Definition at line 62 of file OBB.h.

◆ extent

template<typename S_ >
Vector3<S> fcl::OBB< S_ >::extent

Half dimensions of OBB.

Definition at line 68 of file OBB.h.

◆ To

template<typename S_ >
Vector3<S> fcl::OBB< S_ >::To

Center of OBB.

Definition at line 65 of file OBB.h.


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


fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:50