66 #include <OpenMesh/Core/Geometry/VectorT.hh> 73 template <
class BSPCore>
78 typedef typename BSPCore::Traits Traits;
79 typedef typename BSPCore::Handle Handle;
80 typedef typename BSPCore::Point Point;
81 typedef typename BSPCore::Scalar Scalar;
82 typedef typename BSPCore::Node Node;
83 typedef typename BSPCore::Handles Handles;
84 typedef typename BSPCore::HandleIter HandleIter;
89 BSPImplT(
const Traits& _traits,
const Scalar& _infinity = std::numeric_limits<Scalar>::infinity()) :
91 infinity_(_infinity) {}
108 NearestNeighbor
nearest(
const Point& _p)
const;
120 RayCollision
raycollision (
const Point& _p,
const Point& _r)
const;
160 stream <<
"[NearestNeghborData instance. ref: " << data.ref <<
", dist: " << data.dist <<
", nearest: " << data.nearest.idx() <<
"]";
170 RayCollision hit_handles;
191 void _raycollision_nearest_directional(Node* _node,
RayCollisionData& _data)
const;
193 template<
typename T,
typename U>
195 bool operator()(
const std::pair<T,U> &left,
const std::pair<T,U> &right) {
196 return (fabs(left.second) < fabs(right.second));
200 const Scalar infinity_;
205 #if defined(OM_INCLUDE_TEMPLATES) && !defined(BSPIMPLT_C) 206 # define BSPIMPLT_TEMPLATES 207 # include "BSPImplT.cc" 210 #endif // BSPIMPLT_HH defined RayCollision directionalRaycollision(const Point &_p, const Point &_r) const
intersect mesh with ray
std::vector< std::pair< Handle, Scalar > > RayCollision
Store nearest neighbor information.
RayCollision nearestRaycollision(const Point &_p, const Point &_r) const
intersect mesh with ray
void _raycollision_non_directional(Node *_node, RayCollisionData &_data) const
recursive part of raycollision()
void _raycollision_directional(Node *_node, RayCollisionData &_data) const
recursive part of directionalRaycollision()
Store ray collide information.
Store nearest neighbor information.
NearestNeighbor nearest(const Point &_p) const
Return handle of the nearest neighbor face.
RayCollision raycollision(const Point &_p, const Point &_r) const
intersect mesh with ray
Store nearest neighbor information.