Bayeux  3.4.1
Core Foundation library for SuperNEMO
simple_world_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: 2014-05-19
5  *
6  * License:
7  *
8  * Description:
9  *
10  * Simple model for world geometry
11  *
12  * History:
13  *
14  */
15 
16 #ifndef GEOMTOOLS_SIMPLE_WORLD_MODEL_H
17 #define GEOMTOOLS_SIMPLE_WORLD_MODEL_H 1
18 
19 // Standard libraries:
20 #include <iostream>
21 #include <string>
22 
23 // This project:
24 #include <geomtools/i_model.h>
25 #include <geomtools/model_macros.h>
26 #include <geomtools/placement.h>
27 #include <geomtools/box.h>
29 
30 namespace geomtools {
31 
33  class simple_world_model : public i_model
34  {
35  public:
36 
37  static const std::string SETUP_LABEL;
38 
39  const geomtools::box & get_solid () const;
40 
42 
43  virtual ~simple_world_model ();
44 
45  virtual std::string get_model_id () const;
46 
47  virtual void tree_dump (std::ostream & out_ = std::clog,
48  const std::string & title_ = "",
49  const std::string & indent_ = "",
50  bool inherit_ = false) const;
51 
52  protected:
53 
54  virtual void _at_construct (const std::string & name_,
55  const datatools::properties & setup_,
56  models_col_type * models_ = 0);
57 
58  private:
59 
60  const i_model * _setup_model_;
61  geomtools::placement _setup_placement_;
62  geomtools::physical_volume _setup_phys_;
63  geomtools::box _solid_;
64  double _world_x_;
65  double _world_y_;
66  double _world_z_;
67  //std::string _material_;
68 
69  // Registration interface :
71 
72  };
73 
74 } // end of namespace geomtools
75 
76 #endif // GEOMTOOLS_SIMPLE_WORLD_MODEL_H
77 
78 /*
79 ** Local Variables: --
80 ** mode: c++ --
81 ** c-file-style: "gnu" --
82 ** tab-width: 2 --
83 ** End: --
84 */
virtual std::string get_model_id() const
Get the model ID.
The base class for geometry models.
Definition: i_model.h:45
The 3D shape model for a box.
Definition: box.h:44
A physical geometry volume (ala GDML)
Definition: physical_volume.h:36
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
virtual void _at_construct(const std::string &name_, const datatools::properties &setup_, models_col_type *models_=0)
The main construction hook.
geomtools::models_col_type models_col_type
The collection of geometry models:
Definition: i_model.h:58
The placement for a geometry volume with its translation and rotation with respect to some mother ref...
Definition: placement.h:34
#define GEOMTOOLS_MODEL_REGISTRATION_INTERFACE(ModelClassName)
Definition: model_macros.h:30
const geomtools::box & get_solid() const
A geometry model implementing a top-level/world box volume with an unique setup daughter volume.
Definition: simple_world_model.h:33
static const std::string SETUP_LABEL
Definition: simple_world_model.h:37
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125