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< S > | center () const |
The (AABB) center. More... | |
S | depth () const |
The (AABB) depth. More... | |
S & | dist (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... | |
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.
Creating kDOP containing nothing.
Definition at line 83 of file kDOP-inl.h.
Creating kDOP containing only one point.
Definition at line 98 of file kDOP-inl.h.
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.
The (AABB) center.
Definition at line 253 of file kDOP-inl.h.
The (AABB) depth.
Definition at line 229 of file kDOP-inl.h.
Definition at line 282 of file kDOP-inl.h.
Definition at line 274 of file kDOP-inl.h.
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.
The (AABB) height.
Definition at line 221 of file kDOP-inl.h.
FCL_EXPORT bool fcl::KDOP< S, N >::inside | ( | const Vector3< S > & | p | ) | const |
Definition at line 149 of file kDOP-inl.h.
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.
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.
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.
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 of the kDOP (used in BV_Splitter to order two kDOPs)
Definition at line 245 of file kDOP-inl.h.
The (AABB) volume.
Definition at line 237 of file kDOP-inl.h.
The (AABB) width.
Definition at line 213 of file kDOP-inl.h.