1#ifndef G_GEOMETRY_SIMPLE_H
2#define G_GEOMETRY_SIMPLE_H
20 const double z)
const override;
33 Solid*
GetSolid(
const double x,
const double y,
const double z)
const;
39 bool IsInside(
const double x,
const double y,
const double z)
const override;
41 bool IsInBoundingBox(
const double x,
const double y,
const double z)
const;
43 double& ymax,
double& zmax)
override {
Abstract base class for geometry classes.
"Native" geometry, using simple shapes.
Solid * GetSolid(const unsigned int i) const override
Get a solid from the list.
bool IsInside(const double x, const double y, const double z) const override
Check if a point is inside the geometry.
unsigned int GetNumberOfSolids() const override
Return the number of solids in the geometry.
std::vector< std::pair< Solid *, int > > m_solids
List of solids.
Medium * GetMedium(const double x, const double y, const double z) const override
Retrieve the medium at a given point.
void EnableDebugging(const bool on=true)
bool IsInBoundingBox(const double x, const double y, const double z) const
std::vector< Medium * > m_media
List of media.
void Clear()
Reset the geometry.
bool GetBoundingBox(double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax) override
Get the bounding box (envelope of the geometry).
bool m_debug
Switch on/off debugging messages.
void AddSolid(Solid *s, Medium *m)
Add a solid to the geometry, together with the medium inside.
unsigned int GetNumberOfMedia() const
Get the number of media in the geometry.
virtual ~GeometrySimple()
Destructor.
GeometrySimple()
Constructor.
Abstract base class for media.
Abstract base class for solids.