1#ifndef G_SOLID_SPHERE_H
2#define G_SOLID_SPHERE_H
15 SolidSphere(
const double cx,
const double cy,
const double cz,
18 SolidSphere(
const double cx,
const double cy,
const double cz,
19 const double rmin,
const double rmax);
23 bool IsInside(
const double x,
const double y,
const double z,
24 const bool tesselated)
const override;
25 bool GetBoundingBox(
double& xmin,
double& ymin,
double& zmin,
double& xmax,
26 double& ymax,
double& zmax)
const override;
27 bool IsSphere()
const override {
return true; }
32 void SetRadii(
const double rmin,
const double rmax);
34 double GetRadius()
const override {
return m_rMax; }
43 bool SolidPanels(std::vector<Panel>& panels)
override;
47 void Cut(
const double x0,
const double y0,
const double z0,
48 const double xn,
const double yn,
const double zn,
49 std::vector<Panel>& panels)
override;
56 double m_rMin = 0., m_rMax = 1.;
59 unsigned int m_n = 10;
65 std::vector<Panel> m_panelsO;
66 std::vector<Panel> m_panelsI;
69 void MakePanels(
const int vol,
const double r,
const bool out,
70 std::vector<Panel>& panels)
const;
bool IsInside(const double x, const double y, const double z, const bool tesselated) const override
void SetDiscretisationLevel(const double dis) override
Set the discretisation level (for all panels).
~SolidSphere()
Destructor.
bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const override
Return the bounding box of the solid.
double GetOuterRadius() const override
Return the outer radius.
void SetRadii(const double rmin, const double rmax)
Set the inner and outer radius of the sphere.
double GetInnerRadius() const override
Return the inner radius.
void SetRadius(const double r)
Set the radius of the sphere.
void Cut(const double x0, const double y0, const double z0, const double xn, const double yn, const double zn, std::vector< Panel > &panels) override
double GetDiscretisationLevel(const Panel &panel) override
Retrieve the discretisation level of a panel.
bool SolidPanels(std::vector< Panel > &panels) override
Retrieve the surface panels of the solid.
bool IsSphere() const override
Return true if the solid is a sphere.
double GetRadius() const override
Return the radius.
void SetMeridians(const unsigned int n)
Abstract base class for solids.