14 #ifndef ESYS_LSM_IMPLINTERSECTIONVOLCALCULATOR_H
15 #define ESYS_LSM_IMPLINTERSECTIONVOLCALCULATOR_H
27 template <
int tmplDim,
typename TmplVec>
40 template <
typename TmplSphere>
45 template <
typename TmplSphere>
46 bool contains(
const TmplSphere &sphere)
const;
53 template <
int tmplDim,
typename TmplVec>
59 static double norm(
const Vec &pt);
61 static double dot(
const Vec &p1,
const Vec &p2);
65 DimPlane(
const Vec &normal,
const Vec &pt);
83 template <
int tmplDim,
typename TmplVec>
107 double getVolume(
const Vec &minPt,
const Vec &maxPt,
const int dimX = 0,
const int dimY = 1)
const;
118 template <
int tmplDim,
typename TmplVec>
148 double getVolume(
const Vec &minPt,
const Vec &maxPt,
const int dimX = 0,
const int dimY = 1)
const;
204 void setSphere(
const BasicSphere &sphere);
206 const BasicBox &
getBox()
const;
226 double getVolume(
const BasicSphere &sphere);
double m_volume
Definition: IntersectionVolCalculator.h:158
VolumeSphere & operator=(const VolumeSphere &sphere)
Definition: IntersectionVolCalculator.hpp:495
const Vec & getCentre() const
Definition: IntersectionVolCalculator.hpp:512
static const int s_numVertices
Definition: IntersectionVolCalculator.h:196
VolumeSphere()
Definition: IntersectionVolCalculator.hpp:469
double getDistanceTo(const Vec &pt) const
Definition: IntersectionVolCalculator.hpp:176
Definition: IntersectionVolCalculator.h:28
double getRadius() const
Definition: IntersectionVolCalculator.hpp:223
static Vec componentMin(const Vec &p1, const Vec &p2)
Definition: IntersectionVolCalculator.hpp:699
double getVolume(const Vertex &vtx)
Definition: IntersectionVolCalculator.hpp:1102
Definition: IntersectionVolCalculator.h:161
double getSignedDistanceTo(const Vec &pt) const
Definition: IntersectionVolCalculator.hpp:166
TmplVec Vec
Definition: IntersectionVolCalculator.h:57
double m_invNormalNorm
Definition: IntersectionVolCalculator.h:80
Vertex & operator=(const Vertex &vtx)
Definition: IntersectionVolCalculator.hpp:569
VolumeSphere m_sphere
Definition: IntersectionVolCalculator.h:229
static double dot(const Vec &p1, const Vec &p2)
Definition: IntersectionVolCalculator.hpp:125
DimPlane< tmplDim, Vec > Plane
Definition: IntersectionVolCalculator.h:88
bool intersectsWith(const TmplSphere &sphere) const
Definition: IntersectionVolCalculator.hpp:62
DimBasicSphere< tmplDim, Vec > BasicSphere
Definition: IntersectionVolCalculator.h:123
DimPlane & operator=(const DimPlane &plane)
Definition: IntersectionVolCalculator.hpp:157
const Vec & getCentre() const
Definition: IntersectionVolCalculator.hpp:230
void createVertices()
Definition: IntersectionVolCalculator.hpp:625
double getVolume() const
Definition: IntersectionVolCalculator.hpp:50
BasicSphere m_sphere
Definition: IntersectionVolCalculator.h:157
static const double ONE_THIRD_PI
Definition: IntersectionVolCalculator.h:91
Definition: CheckPointable.cpp:16
const BasicBox & getBox() const
Definition: IntersectionVolCalculator.hpp:685
Vertex()
Definition: IntersectionVolCalculator.hpp:553
const VolumeSphere & getSphere() const
Definition: IntersectionVolCalculator.hpp:670
DimBasicBox< tmplDim, Vec > BasicBox
Definition: IntersectionVolCalculator.h:124
static const double FOUR_THIRDS_PI
Definition: IntersectionVolCalculator.h:90
bool contains(const TmplSphere &sphere) const
Definition: IntersectionVolCalculator.hpp:94
void setSphere(const BasicSphere &sphere)
Definition: IntersectionVolCalculator.hpp:676
Vec m_pt
Definition: IntersectionVolCalculator.h:177
Vec m_maxPt
Definition: IntersectionVolCalculator.h:50
bool intersectsWith(const Vec &pt) const
Definition: IntersectionVolCalculator.hpp:541
TmplVec Vec
Definition: IntersectionVolCalculator.h:122
const Vec & getNormal() const
Definition: IntersectionVolCalculator.hpp:182
Definition: IntersectionVolCalculator.h:131
Vec m_minPt
Definition: IntersectionVolCalculator.h:49
static double norm(const Vec &pt)
Definition: IntersectionVolCalculator.hpp:114
const Vec & getPoint() const
Definition: IntersectionVolCalculator.hpp:577
const Vec & getMaxPt() const
Definition: IntersectionVolCalculator.hpp:44
double getVolume() const
Definition: IntersectionVolCalculator.hpp:518
double getTwoPlaneVolume(const Vec &pt, const int orientDim) const
Definition: IntersectionVolCalculator.hpp:887
Definition: IntersectionVolCalculator.h:180
Vertex m_vertexArray[s_numVertices]
Definition: IntersectionVolCalculator.h:197
double getSegmentVolume(const Plane &plane) const
Definition: IntersectionVolCalculator.hpp:423
double getSegmentVolume(const Plane &plane) const
Definition: IntersectionVolCalculator.hpp:547
VertexBox m_box
Definition: IntersectionVolCalculator.h:230
double getVolume() const
Definition: IntersectionVolCalculator.hpp:236
const VertexBox & getVertexBox() const
Definition: IntersectionVolCalculator.hpp:692
DimBasicSphere & operator=(const DimBasicSphere &sphere)
Definition: IntersectionVolCalculator.hpp:215
DimPlane< tmplDim, Vec > Plane
Definition: IntersectionVolCalculator.h:125
IntersectionVolCalculator(const BasicBox &box)
Definition: IntersectionVolCalculator.hpp:660
Vec m_normal
Definition: IntersectionVolCalculator.h:78
Definition: IntersectionVolCalculator.h:54
DimBasicSphere()
Definition: IntersectionVolCalculator.hpp:194
TmplVec Vec
Definition: IntersectionVolCalculator.h:31
double getVertexVolume(const BasicSphere &sphere)
Definition: IntersectionVolCalculator.hpp:1119
const Vertex & getVertex(int i) const
Definition: IntersectionVolCalculator.hpp:648
DimPlane()
Definition: IntersectionVolCalculator.hpp:136
TmplVec Vec
Definition: IntersectionVolCalculator.h:87
static Vec componentMax(const Vec &p1, const Vec &p2)
Definition: IntersectionVolCalculator.hpp:714
Definition: IntersectionVolCalculator.h:84
DimBasicBox(const Vec &minPt, const Vec &maxPt)
Definition: IntersectionVolCalculator.hpp:31
double calcVolume() const
Definition: IntersectionVolCalculator.hpp:535
const Vec & getMinPt() const
Definition: IntersectionVolCalculator.hpp:38
static Vec getNormal(int dim)
Definition: IntersectionVolCalculator.hpp:452
Definition: IntersectionVolCalculator.h:119
Vec m_pt
Definition: IntersectionVolCalculator.h:79
Vec m_centre
Definition: IntersectionVolCalculator.h:114
static Vec getNegNormal(int dim)
Definition: IntersectionVolCalculator.hpp:461
bool intersectsWith(const Vec &pt) const
Definition: IntersectionVolCalculator.hpp:412
VertexBox(const BasicBox &box)
Definition: IntersectionVolCalculator.hpp:589
VertexBox & operator=(const VertexBox &box)
Definition: IntersectionVolCalculator.hpp:612
static int getNumVertices()
Definition: IntersectionVolCalculator.hpp:654
double square(double val)
Definition: IntersectionVolCalculator.hpp:25
double getRadius() const
Definition: IntersectionVolCalculator.hpp:505
double getInsidePointVolume(const Vec &pt) const
Definition: IntersectionVolCalculator.hpp:728
bool sphereContainsBox(const BasicSphere &sphere) const
Definition: IntersectionVolCalculator.hpp:1148
void setPoint(const Vec &pt)
Definition: IntersectionVolCalculator.hpp:583
double m_radius
Definition: IntersectionVolCalculator.h:115
double getOutsidePointVolume(const Vec &pt) const
Definition: IntersectionVolCalculator.hpp:986