Bayeux  3.4.1
Core Foundation library for SuperNEMO
simple_boxed_model.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2010-02-24
4  * Last modified: 2010-02-24
5  *
6  * License:
7  *
8  * Description:
9  * Simple boxed models
10  *
11  * History:
12  *
13  */
14 
15 #ifndef GEOMTOOLS_SIMPLE_BOXED_MODEL_H
16 #define GEOMTOOLS_SIMPLE_BOXED_MODEL_H 1
17 
18 // Standard library:
19 #include <string>
20 
21 // This project:
23 #include <geomtools/box.h>
24 
25 namespace geomtools {
26 
28  class simple_boxed_model : public i_boxed_model
29  {
30 
31  public:
32 
33  void set_x (double x_);
34 
35  void set_y (double y_);
36 
37  void set_z (double z_);
38 
39  double get_x () const;
40 
41  double get_y () const;
42 
43  double get_z () const;
44 
45  void set_material_name (const std::string &);
46 
47  const std::string & get_material_name () const;
48 
49  virtual const geomtools::box & get_box () const;
50 
51  const geomtools::box & get_solid () const;
52 
54 
55  virtual ~simple_boxed_model ();
56 
57  virtual std::string get_model_id () const;
58 
59  virtual void tree_dump (std::ostream & out_ = std::clog,
60  const std::string & title_ = "",
61  const std::string & indent_ = "",
62  bool inherit_ = false) const;
63 
64  protected:
65 
66  virtual void _at_construct (const std::string & name_,
67  const datatools::properties & config_,
68  models_col_type * models_ = 0);
69  private:
70 
71  std::string _material_name_;
72  double _x_;
73  double _y_;
74  double _z_;
75  geomtools::box _solid_;
76 
77  // registration interface :
79 
80  };
81 
82 } // end of namespace geomtools
83 
84 #endif // GEOMTOOLS_SIMPLE_BOXED_MODEL_H
85 
86 /*
87 ** Local Variables: --
88 ** mode: c++ --
89 ** c-file-style: "gnu" --
90 ** tab-width: 2 --
91 ** End: --
92 */
A geometry model implementing a single box with no daughter volumes.
Definition: simple_boxed_model.h:28
const geomtools::box & get_solid() const
The 3D shape model for a box.
Definition: box.h:44
std::map< std::string, i_model * > models_col_type
Type alias for dictionary of geometry model plain handles.
Definition: model_tools.h:29
virtual std::string get_model_id() const
virtual const geomtools::box & get_box() const
void set_material_name(const std::string &)
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
const std::string & get_material_name() const
#define GEOMTOOLS_MODEL_REGISTRATION_INTERFACE(ModelClassName)
Definition: model_macros.h:30
virtual void _at_construct(const std::string &name_, const datatools::properties &config_, models_col_type *models_=0)
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125