46 struct CollisionRequest;
94 Eigen::Array<Scalar, N, 1>
dist_;
108 return (dist_ == other.
dist_).all();
113 return (dist_ != other.
dist_).any();
124 Scalar& sqrDistLowerBound)
const;
140 return width() * width() + height() * height() + depth() * depth();
145 return (dist_.template head<3>() + dist_.template segment<3>(N / 2)) / 2;
155 inline Scalar depth()
const {
return dist_[N / 2 + 2] - dist_[2]; }
168 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
KDOP class describes the KDOP collision structures. K is set as the template parameter,...
Definition: kDOP.h:91
bool operator==(const KDOP &other) const
Equality operator.
Definition: kDOP.h:107
KDOP()
Creating kDOP containing nothing.
Vec3s center() const
The (AABB) center.
Definition: kDOP.h:144
Scalar distance(const KDOP &other, Vec3s *P=NULL, Vec3s *Q=NULL) const
The distance between two KDOP, Not implemented.
Scalar dist(short i) const
Definition: kDOP.h:160
Scalar width() const
The (AABB) width.
Definition: kDOP.h:149
KDOP(const Vec3s &a, const Vec3s &b)
Creating kDOP containing two points.
Scalar volume() const
The (AABB) volume.
Definition: kDOP.h:158
bool inside(const Vec3s &p) const
bool operator!=(const KDOP &other) const
Difference operator.
Definition: kDOP.h:112
bool overlap(const KDOP &other) const
Check whether two KDOPs overlap.
KDOP< N > operator+(const KDOP &other) const
Create a KDOP by mergin two KDOPs.
KDOP & operator+=(const KDOP &other)
Merge two KDOPs.
Scalar size() const
Size of the kDOP (used in BV_Splitter to order two kDOPs)
Definition: kDOP.h:139
Scalar height() const
The (AABB) height.
Definition: kDOP.h:152
Eigen::Array< Scalar, N, 1 > dist_
Origin's distances to N KDOP planes.
Definition: kDOP.h:94
Scalar depth() const
The (AABB) depth.
Definition: kDOP.h:155
KDOP & operator+=(const Vec3s &p)
Merge the point and the KDOP.
KDOP(const Vec3s &v)
Creating kDOP containing only one point.
Scalar & dist(short i)
Definition: kDOP.h:162
bool overlap(const KDOP &other, const CollisionRequest &request, Scalar &sqrDistLowerBound) const
Check whether two KDOPs overlap.
#define COAL_DLLAPI
Definition: config.hh:88
#define COAL_THROW_PRETTY(message, exception)
Definition: fwd.hh:64
Main namespace.
Definition: broadphase_bruteforce.h:44
bool overlap(const Matrix3s &R0, const Vec3s &T0, const AABB &b1, const AABB &b2)
Check collision between two aabbs, b1 is in configuration (R0, T0) and b2 is in identity.
KDOP< N > translate(const KDOP< N > &bv, const Vec3s &t)
translate the KDOP BV
Eigen::Matrix< Scalar, 3, 1 > Vec3s
Definition: data_types.h:70
double Scalar
Definition: data_types.h:68
Eigen::Matrix< Scalar, 3, 3 > Matrix3s
Definition: data_types.h:74
request to the collision algorithm
Definition: collision_data.h:311