7 #ifndef NUKLEI_REGIONOFINTEREST_H
8 #define NUKLEI_REGIONOFINTEREST_H
14 #include <boost/any.hpp>
25 bool contains(
const Vector3 &v)
const
27 return (positive_ == contains_(v)) || (next_ && next_->contains(v));
30 virtual void enqueue(boost::shared_ptr<RegionOfInterest> &roi)
38 virtual void setSign(
bool positive)
48 void pushTriangles(std::list<boost::any>& triangles)
const
51 next_->pushTriangles(triangles);
52 pushTriangles_(triangles);
55 virtual bool intersectsPlane(
const Vector3& p,
57 const Vector3& r)
const
59 virtual bool intersectsPlane(
const Vector3& p,
const Vector3& v)
const
63 virtual bool contains_(
const Vector3 &v)
const = 0;
64 virtual void buildAABBTree_()
66 virtual void pushTriangles_(std::list<boost::any>& triangles)
const
70 boost::shared_ptr<RegionOfInterest> next_;
77 SphereROI(
const Vector3 ¢er,
double radius) :
78 center_(center), radius_(radius) {}
80 SphereROI(
const std::string ¢erAndRadius);
84 bool contains_(
const Vector3 &v)
const;
93 BoxROI(
const Vector3 ¢erLoc,
const Quaternion ¢erOri,
94 const Vector3 &edgeLengths) :
95 centerLoc_(centerLoc), centerOri_(centerOri), edgeLengths_(edgeLengths) {}
97 BoxROI(
const std::string &s);
99 void setCenterOriSize(
const std::string ¢erSize);
100 void setCenterAxesSize(
const std::string ¢erSize);
102 virtual bool intersectsPlane(
const Vector3& p,
104 const Vector3& r)
const;
105 virtual bool intersectsPlane(
const Vector3& p,
const Vector3& v)
const;
109 bool contains_(
const Vector3 &v)
const;
110 void buildAABBTree_();
111 void pushTriangles_(std::list<boost::any>& triangles)
const;
114 Quaternion centerOri_;
115 Vector3 edgeLengths_;