10 const double rw,
const double lz)
11 :
Solid(cx, cy, cz,
"SolidWire"),
16 const double rw,
const double lz,
17 const double dx,
const double dy,
const double dz)
25 double u = x, v = y, w = z;
28 if (fabs(w) > m_lZ)
return false;
30 const double r = sqrt(u * u + v * v);
35 double& xmax,
double& ymax,
double& zmax)
const {
46 const double dd = sqrt(m_r * m_r + m_lZ * m_lZ);
58 std::cerr <<
"SolidWire::SetRadius: Radius must be > 0.\n";
66 std::cerr <<
"SolidWire::SetHalfLength: Half-length must be > 0.\n";
81 const double ,
const double ,
const double ,
82 const double ,
const double ,
const double ,
83 std::vector<Panel>& ) {
bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) const override
Return the bounding box of the solid.
bool SolidPanels(std::vector< Panel > &panels) override
Retrieve the surface panels of the solid.
bool IsInside(const double x, const double y, const double z, const bool tesselated) const override
void SetHalfLength(const double lz)
SolidWire(const double cx, const double cy, const double cz, const double r, const double lz)
Constructor from centre, radius, and half-length.
void SetRadius(const double r)
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.
Abstract base class for solids.
double m_cTheta
Polar angle.
void ToLocal(const double x, const double y, const double z, double &u, double &v, double &w) const
void SetDirection(const double dx, const double dy, const double dz)
double m_cX
Centre of the solid.
double m_cPhi
Azimuthal angle.