Bayeux  3.4.1
Core Foundation library for SuperNEMO
i_shape_1d.h
Go to the documentation of this file.
1 /* Author(s): Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2008-05-23
4  * Last modified: 2012-04-10
5  *
6  * License:
7  *
8  * Description:
9  * Interface for 1D shaped volumes (lines)
10  *
11  * History:
12  *
13  */
14 
15 #ifndef GEOMTOOLS_I_SHAPE_1D_H
16 #define GEOMTOOLS_I_SHAPE_1D_H 1
17 
18 // Standard library:
19 #include <string>
20 
21 // Third party:
22 // - Bayeux/datatools:
23 #include <datatools/ocd_macros.h>
24 
25 // This project:
26 #include <geomtools/utils.h>
27 #include <geomtools/i_object_3d.h>
28 
29 namespace geomtools {
30 
32  class i_shape_1d : public i_object_3d
33  {
34  public:
35 
37  int get_dimensional() const;
38 
40  virtual bool has_number_of_paths() const;
41 
43  virtual unsigned int get_number_of_paths() const;
44 
46  virtual bool has_length(uint32_t flags_ = PATH_ALL_BITS) const;
47 
49  virtual double get_length(uint32_t flags_ = PATH_ALL_BITS) const;
50 
52  i_shape_1d();
53 
55  i_shape_1d(double tolerance_);
56 
58  i_shape_1d(double tolerance_, double angular_tolerance_);
59 
61  virtual ~i_shape_1d();
62 
64  virtual bool is_on_curve(const vector_3d &,
65  double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE) const = 0;
66 
68  virtual vector_3d get_direction_on_curve(const vector_3d & position_) const = 0;
69 
72 
73  // Serialization interface
75 
76  };
77 
78 } // end of namespace geomtools
79 
80 /*
81 // Explicit class version:
82 #include <boost/serialization/version.hpp>
83 BOOST_CLASS_VERSION(geomtools::i_shape_1d, 0)
84 */
85 
86 #endif // GEOMTOOLS_I_SHAPE_1D_H
87 
88 /*
89 ** Local Variables: --
90 ** mode: c++ --
91 ** c-file-style: "gnu" --
92 ** tab-width: 2 --
93 ** End: --
94 */
The abstract base class for all 1D curves/shapes.
Definition: i_shape_1d.h:32
Mother abstract class for all 3D object classes.
Definition: i_object_3d.h:49
int get_dimensional() const
Return the dimension of the object.
Definition: utils.h:184
virtual ~i_shape_1d()
Destructor.
virtual bool is_on_curve(const vector_3d &, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const =0
Check is a given point belongs to the path of the 1D shape.
An object that describes the way an object of a given class can be configured through properties.
Definition: object_configuration_description.h:234
virtual double get_length(uint32_t flags_=PATH_ALL_BITS) const
Return the length of the 1D shape.
#define DATATOOLS_SERIALIZATION_DECLARATION()
Definition: i_serializable.h:266
#define GEOMTOOLS_PROPER_TOLERANCE
Definition: geomtools_config.h:26
i_shape_1d()
Default constructor.
virtual unsigned int get_number_of_paths() const
Return the number of paths.
static void init_ocd(datatools::object_configuration_description &)
OCD support.
CLHEP::Hep3Vector vector_3d
Alias for the CLHEP 3D-vector class.
Definition: clhep.h:63
virtual bool has_number_of_paths() const
Check if the 1D shape knows its number of associated paths.
virtual bool has_length(uint32_t flags_=PATH_ALL_BITS) const
Check if the 1D shape known its length.
virtual vector_3d get_direction_on_curve(const vector_3d &position_) const =0
Return the tangent direction at some position on the 1D shape's path.
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39