Bayeux  3.4.1
Core Foundation library for SuperNEMO
right_circular_conical_nappe.h
Go to the documentation of this file.
1 /* Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2015-03-15
4  * Last modified: 2015-03-15
5  *
6  * License:
7  *
8  * Description:
9  *
10  * Right circular conical n-appe
11  *
12  */
13 
14 #ifndef GEOMTOOLS_RIGHT_CIRCULAR_CONICAL_NAPPE_H
15 #define GEOMTOOLS_RIGHT_CIRCULAR_CONICAL_NAPPE_H 1
16 
17 // This project:
18 #include <geomtools/cone.h>
19 #include <geomtools/i_shape_2d.h>
21 
22 namespace geomtools {
23 
24  // Class forward declarations:
25  class disk;
26  class quadrangle;
27 
30  {
31  public:
32 
34  static const std::string & right_circular_conical_nappe_label();
35 
37  virtual std::string get_shape_name() const;
38 
40  bool is_valid() const;
41 
43  void set_z(double);
44 
46  double get_z() const;
47 
49  void set_bottom_radius(double);
50 
52  double get_bottom_radius() const;
53 
55  void set_top_radius(double);
56 
58  double get_top_radius() const;
59 
61  const angular_range & get_angle_domain() const;
62 
64  bool has_partial_angle() const;
65 
67  bool has_start_angle() const;
68 
70  void set_start_angle(double);
71 
73  double get_start_angle() const;
74 
76  bool has_delta_angle() const;
77 
79  void set_delta_angle(double);
80 
82  double get_delta_angle() const;
83 
85  double get_radius_from_z(double z_) const;
86 
88  double get_cone_angle() const;
89 
91  virtual double get_surface(uint32_t flags_ = ALL_PIECES) const;
92 
95 
97  right_circular_conical_nappe(double bottom_radius_,
98  double top_radius_,
99  double z_);
100 
102  right_circular_conical_nappe(double bottom_radius_,
103  double top_radius_,
104  double z_,
105  double start_angle_,
106  double delta_angle_);
107 
110 
112  virtual bool is_on_surface(const vector_3d &,
113  double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE) const;
114 
116  virtual vector_3d get_normal_on_surface(const vector_3d & position_,
117  bool check_ = true,
118  double skin_ = GEOMTOOLS_PROPER_TOLERANCE) const;
119 
121  virtual bool find_intercept(const vector_3d & from_,
122  const vector_3d & direction_,
123  face_intercept_info & intercept_,
124  double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE) const;
125 
127  virtual void tree_dump(std::ostream & out_ = std::clog,
128  const std::string & title_ = "",
129  const std::string & indent_ = "",
130  bool inherit_= false) const;
131 
143  };
144 
146  virtual void generate_wires_self(wires_type & wires_,
147  uint32_t options_ = 0) const;
148 
150  void initialize(const datatools::properties &, const handle_dict_type * = 0);
151 
153  void reset();
154 
155  protected:
156 
158  void _set_defaults();
159 
160  private:
161 
162  double _bottom_radius_;
163  double _top_radius_;
164  double _z_;
165  angular_range _angle_domain_;
166 
167  // Registration interface :
169 
170  };
171 
174 
175 } // end of namespace geomtools
176 
177 #endif // GEOMTOOLS_RIGHT_CIRCULAR_CONICAL_NAPPE_H
178 
179 /*
180 ** Local Variables: --
181 ** mode: c++ --
182 ** c-file-style: "gnu" --
183 ** tab-width: 2 --
184 ** End: --
185 */
right_circular_conical_nappe()
Default constructor.
virtual bool is_on_surface(const vector_3d &, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
Check if a point is on the surface.
Do not render the top edge.
Definition: right_circular_conical_nappe.h:135
double get_bottom_radius() const
Return the bottom radius.
Do not render the bottom edge.
Definition: right_circular_conical_nappe.h:134
Right circular conical nappe (2D shape)
Definition: right_circular_conical_nappe.h:29
virtual std::string get_shape_name() const
Return the identifier/name of the shape.
Do not render the start phi angle edge.
Definition: right_circular_conical_nappe.h:136
double get_start_angle() const
Return the start phi angle.
Rendering options bit mask.
Definition: right_circular_conical_nappe.h:139
double get_cone_angle() const
Return the angle of the cone.
void _set_defaults()
Set default attributes.
bool is_valid() const
Check if the rectangle is valid.
double get_radius_from_z(double z_) const
Compute the radius of the nappe at given z.
static const std::string & right_circular_conical_nappe_label()
Return the identifier label for the class.
void set_delta_angle(double)
Set the delta phi angle.
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
Last defined bit.
Definition: right_circular_conical_nappe.h:138
The face_intercept_info class hosts the parameters of.
Definition: face_intercept_info.h:31
#define GEOMTOOLS_PROPER_TOLERANCE
Definition: geomtools_config.h:26
void set_bottom_radius(double)
Set the bottom radius.
static const uint32_t ALL_PIECES
Special flag representing all pieces composing a 2D shape.
Definition: i_shape_2d.h:53
void set_start_angle(double)
Set the start phi angle.
void initialize(const datatools::properties &, const handle_dict_type *=0)
Initialize from properties and a dictionary of 3D-objects.
virtual double get_surface(uint32_t flags_=ALL_PIECES) const
Return the surface.
std::map< std::string, object_entry > handle_dict_type
Dictionary of handle of 3D object entries.
Definition: i_object_3d.h:124
right_circular_conical_nappe conical_nappe
Type alias.
Definition: right_circular_conical_nappe.h:173
Angular range.
Definition: angular_range.h:33
const angular_range & get_angle_domain() const
Return the angle domain.
virtual ~right_circular_conical_nappe()
Destructor.
#define GEOMTOOLS_OBJECT_3D_REGISTRATION_INTERFACE(ModelClassName)
Definition: i_object_3d.h:260
The abstract base class for all 2D shapes/surfaces.
Definition: i_shape_2d.h:37
CLHEP::Hep3Vector vector_3d
Alias for the CLHEP 3D-vector class.
Definition: clhep.h:63
double get_top_radius() const
Return the top radius.
Last defined bit.
Definition: i_wires_3d_rendering.h:62
bool has_delta_angle() const
Check the delta phi angle.
virtual bool find_intercept(const vector_3d &from_, const vector_3d &direction_, face_intercept_info &intercept_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
Find the intercept point of a segment with the surface.
Do not render the stop phi angle edge.
Definition: right_circular_conical_nappe.h:137
std::list< polyline_type > wires_type
Alias for a list of 3D-polylines.
Definition: utils.h:61
virtual void generate_wires_self(wires_type &wires_, uint32_t options_=0) const
Generate a sequence of polylines for wires 3D rendering.
void set_z(double)
Set the Z dimension.
virtual vector_3d get_normal_on_surface(const vector_3d &position_, bool check_=true, double skin_=GEOMTOOLS_PROPER_TOLERANCE) const
Return the normal at a given position of the surface.
double get_z() const
Return the Z dimension.
bool has_partial_angle() const
Check if the nappe has partial phi angle.
rccn_wires_rendering_option_type
3D rendering options
Definition: right_circular_conical_nappe.h:133
void set_top_radius(double)
Set the top radius.
double get_delta_angle() const
Return the delta phi angle.
bool has_start_angle() const
Check the start phi angle.
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125