Public Types | Public Member Functions | Private Attributes | List of all members
fcl::KDOP< S_, N > Class Template Reference

KDOP class describes the KDOP collision structures. K is set as the template parameter, which should be 16, 18, or 24 The KDOP structure is defined by some pairs of parallel planes defined by some axes. For K = 16, the planes are 6 AABB planes and 10 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 8 (0,-1,0) and (0,1,0) -> indices 1 and 9 (0,0,-1) and (0,0,1) -> indices 2 and 10 (-1,-1,0) and (1,1,0) -> indices 3 and 11 (-1,0,-1) and (1,0,1) -> indices 4 and 12 (0,-1,-1) and (0,1,1) -> indices 5 and 13 (-1,1,0) and (1,-1,0) -> indices 6 and 14 (-1,0,1) and (1,0,-1) -> indices 7 and 15 For K = 18, the planes are 6 AABB planes and 12 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 9 (0,-1,0) and (0,1,0) -> indices 1 and 10 (0,0,-1) and (0,0,1) -> indices 2 and 11 (-1,-1,0) and (1,1,0) -> indices 3 and 12 (-1,0,-1) and (1,0,1) -> indices 4 and 13 (0,-1,-1) and (0,1,1) -> indices 5 and 14 (-1,1,0) and (1,-1,0) -> indices 6 and 15 (-1,0,1) and (1,0,-1) -> indices 7 and 16 (0,-1,1) and (0,1,-1) -> indices 8 and 17 For K = 18, the planes are 6 AABB planes and 18 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 12 (0,-1,0) and (0,1,0) -> indices 1 and 13 (0,0,-1) and (0,0,1) -> indices 2 and 14 (-1,-1,0) and (1,1,0) -> indices 3 and 15 (-1,0,-1) and (1,0,1) -> indices 4 and 16 (0,-1,-1) and (0,1,1) -> indices 5 and 17 (-1,1,0) and (1,-1,0) -> indices 6 and 18 (-1,0,1) and (1,0,-1) -> indices 7 and 19 (0,-1,1) and (0,1,-1) -> indices 8 and 20 (-1, -1, 1) and (1, 1, -1) --> indices 9 and 21 (-1, 1, -1) and (1, -1, 1) --> indices 10 and 22 (1, -1, -1) and (-1, 1, 1) --> indices 11 and 23. More...

#include <kDOP.h>

Public Types

using S = S_
 

Public Member Functions

Vector3< Scenter () const
 The (AABB) center. More...
 
S depth () const
 The (AABB) depth. More...
 
Sdist (std::size_t i)
 
S dist (std::size_t i) const
 
S distance (const KDOP< S, N > &other, Vector3< S > *P=nullptr, Vector3< S > *Q=nullptr) const
 The distance between two KDOP<S, N>. Not implemented. More...
 
S height () const
 The (AABB) height. More...
 
bool inside (const Vector3< S > &p) const
 
 KDOP ()
 Creating kDOP containing nothing. More...
 
 KDOP (const Vector3< S > &a, const Vector3< S > &b)
 Creating kDOP containing two points. More...
 
 KDOP (const Vector3< S > &v)
 Creating kDOP containing only one point. More...
 
KDOP< S, N > operator+ (const KDOP< S, N > &other) const
 Create a KDOP by mergin two KDOPs. More...
 
KDOP< S, N > & operator+= (const KDOP< S, N > &other)
 Merge two KDOPs. More...
 
KDOP< S, N > & operator+= (const Vector3< S > &p)
 Merge the point and the KDOP. More...
 
bool overlap (const KDOP< S, N > &other) const
 Check whether two KDOPs are overlapped. More...
 
S size () const
 Size of the kDOP (used in BV_Splitter to order two kDOPs) More...
 
S volume () const
 The (AABB) volume. More...
 
S width () const
 The (AABB) width. More...
 

Private Attributes

S dist_ [N]
 Origin's distances to N KDOP planes. More...
 

Detailed Description

template<typename S_, std::size_t N>
class fcl::KDOP< S_, N >

KDOP class describes the KDOP collision structures. K is set as the template parameter, which should be 16, 18, or 24 The KDOP structure is defined by some pairs of parallel planes defined by some axes. For K = 16, the planes are 6 AABB planes and 10 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 8 (0,-1,0) and (0,1,0) -> indices 1 and 9 (0,0,-1) and (0,0,1) -> indices 2 and 10 (-1,-1,0) and (1,1,0) -> indices 3 and 11 (-1,0,-1) and (1,0,1) -> indices 4 and 12 (0,-1,-1) and (0,1,1) -> indices 5 and 13 (-1,1,0) and (1,-1,0) -> indices 6 and 14 (-1,0,1) and (1,0,-1) -> indices 7 and 15 For K = 18, the planes are 6 AABB planes and 12 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 9 (0,-1,0) and (0,1,0) -> indices 1 and 10 (0,0,-1) and (0,0,1) -> indices 2 and 11 (-1,-1,0) and (1,1,0) -> indices 3 and 12 (-1,0,-1) and (1,0,1) -> indices 4 and 13 (0,-1,-1) and (0,1,1) -> indices 5 and 14 (-1,1,0) and (1,-1,0) -> indices 6 and 15 (-1,0,1) and (1,0,-1) -> indices 7 and 16 (0,-1,1) and (0,1,-1) -> indices 8 and 17 For K = 18, the planes are 6 AABB planes and 18 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 12 (0,-1,0) and (0,1,0) -> indices 1 and 13 (0,0,-1) and (0,0,1) -> indices 2 and 14 (-1,-1,0) and (1,1,0) -> indices 3 and 15 (-1,0,-1) and (1,0,1) -> indices 4 and 16 (0,-1,-1) and (0,1,1) -> indices 5 and 17 (-1,1,0) and (1,-1,0) -> indices 6 and 18 (-1,0,1) and (1,0,-1) -> indices 7 and 19 (0,-1,1) and (0,1,-1) -> indices 8 and 20 (-1, -1, 1) and (1, 1, -1) --> indices 9 and 21 (-1, 1, -1) and (1, -1, 1) --> indices 10 and 22 (1, -1, -1) and (-1, 1, 1) --> indices 11 and 23.

Definition at line 84 of file kDOP.h.

Member Typedef Documentation

◆ S

template<typename S_ , std::size_t N>
using fcl::KDOP< S_, N >::S = S_

Definition at line 88 of file kDOP.h.

Constructor & Destructor Documentation

◆ KDOP() [1/3]

template<typename S , std::size_t N>
FCL_EXPORT fcl::KDOP< S, N >::KDOP

Creating kDOP containing nothing.

Definition at line 83 of file kDOP-inl.h.

◆ KDOP() [2/3]

template<typename S , std::size_t N>
FCL_EXPORT fcl::KDOP< S, N >::KDOP ( const Vector3< S > &  v)

Creating kDOP containing only one point.

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

◆ KDOP() [3/3]

template<typename S , std::size_t N>
FCL_EXPORT fcl::KDOP< S, N >::KDOP ( const Vector3< S > &  a,
const Vector3< S > &  b 
)

Creating kDOP containing two points.

Definition at line 116 of file kDOP-inl.h.

Member Function Documentation

◆ center()

template<typename S , std::size_t N>
FCL_EXPORT Vector3< S > fcl::KDOP< S, N >::center

The (AABB) center.

Definition at line 253 of file kDOP-inl.h.

◆ depth()

template<typename S , std::size_t N>
FCL_EXPORT S fcl::KDOP< S, N >::depth

The (AABB) depth.

Definition at line 229 of file kDOP-inl.h.

◆ dist() [1/2]

template<typename S , std::size_t N>
FCL_EXPORT S & fcl::KDOP< S, N >::dist ( std::size_t  i)

Definition at line 282 of file kDOP-inl.h.

◆ dist() [2/2]

template<typename S , std::size_t N>
FCL_EXPORT S fcl::KDOP< S, N >::dist ( std::size_t  i) const

Definition at line 274 of file kDOP-inl.h.

◆ distance()

template<typename S , std::size_t N>
FCL_EXPORT S fcl::KDOP< S, N >::distance ( const KDOP< S, N > &  other,
Vector3< S > *  P = nullptr,
Vector3< S > *  Q = nullptr 
) const

The distance between two KDOP<S, N>. Not implemented.

Definition at line 261 of file kDOP-inl.h.

◆ height()

template<typename S , std::size_t N>
FCL_EXPORT S fcl::KDOP< S, N >::height

The (AABB) height.

Definition at line 221 of file kDOP-inl.h.

◆ inside()

template<typename S , std::size_t N>
FCL_EXPORT bool fcl::KDOP< S, N >::inside ( const Vector3< S > &  p) const

Definition at line 149 of file kDOP-inl.h.

◆ operator+()

template<typename S , std::size_t N>
FCL_EXPORT KDOP< S, N > fcl::KDOP< S, N >::operator+ ( const KDOP< S, N > &  other) const

Create a KDOP by mergin two KDOPs.

Definition at line 204 of file kDOP-inl.h.

◆ operator+=() [1/2]

template<typename S , std::size_t N>
FCL_EXPORT KDOP< S, N > & fcl::KDOP< S, N >::operator+= ( const KDOP< S, N > &  other)

Merge two KDOPs.

Definition at line 191 of file kDOP-inl.h.

◆ operator+=() [2/2]

template<typename S , std::size_t N>
FCL_EXPORT KDOP< S, N > & fcl::KDOP< S, N >::operator+= ( const Vector3< S > &  p)

Merge the point and the KDOP.

Definition at line 171 of file kDOP-inl.h.

◆ overlap()

template<typename S , std::size_t N>
FCL_EXPORT bool fcl::KDOP< S, N >::overlap ( const KDOP< S, N > &  other) const

Check whether two KDOPs are overlapped.

Definition at line 135 of file kDOP-inl.h.

◆ size()

template<typename S , std::size_t N>
FCL_EXPORT S fcl::KDOP< S, N >::size

Size of the kDOP (used in BV_Splitter to order two kDOPs)

Definition at line 245 of file kDOP-inl.h.

◆ volume()

template<typename S , std::size_t N>
FCL_EXPORT S fcl::KDOP< S, N >::volume

The (AABB) volume.

Definition at line 237 of file kDOP-inl.h.

◆ width()

template<typename S , std::size_t N>
FCL_EXPORT S fcl::KDOP< S, N >::width

The (AABB) width.

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

Member Data Documentation

◆ dist_

template<typename S_ , std::size_t N>
S fcl::KDOP< S_, N >::dist_[N]
private

Origin's distances to N KDOP planes.

Definition at line 139 of file kDOP.h.


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


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