Bayeux  3.4.1
Core Foundation library for SuperNEMO
union_3d.h
Go to the documentation of this file.
1 /*
3  * Author(s): Francois Mauger <mauger@lpccaen.in2p3.fr>
4  * Creation date: 2008-05-24
5  * Last modified: 2015-03-18
6  *
7  * License:
8  *
9  * Description:
10  * Interface:
11  *
12  * History:
13  *
14  */
15 
16 #ifndef GEOMTOOLS_UNION_3D_H
17 #define GEOMTOOLS_UNION_3D_H 1
18 
19 // This project:
21 
22 namespace geomtools {
23 
26  {
27  public:
28 
30  static const std::string & union_3d_label();
31 
33  std::string get_shape_name() const;
34 
36  union_3d();
37 
39  virtual ~union_3d();
40 
42  virtual bool is_inside(const vector_3d & position_,
43  double skin_ = GEOMTOOLS_PROPER_TOLERANCE) const;
44 
46  virtual bool is_outside(const vector_3d & position_,
47  double skin_ = GEOMTOOLS_PROPER_TOLERANCE) const;
48 
50  virtual face_identifier on_surface(const vector_3d &,
51  const face_identifier & a_surface_mask = face_identifier::face_invalid(),
52  double a_skin = GEOMTOOLS_PROPER_TOLERANCE) const;
53 
55  virtual vector_3d get_normal_on_surface(const vector_3d & a_position,
56  const face_identifier & a_surface_bit) const;
57 
59  virtual bool find_intercept (const vector_3d & from_,
60  const vector_3d & direction_,
61  face_intercept_info & intercept_,
62  double skin_ = GEOMTOOLS_PROPER_TOLERANCE) const;
63 
65  virtual void generate_wires_self(wires_type & wires_,
66  uint32_t options_ = 0) const;
67 
68  protected:
69 
71  virtual void _build_bounding_data();
72 
73  // Registration interface :
75 
76  };
77 
78 } // end of namespace geomtools
79 
80 #endif // GEOMTOOLS_UNION_3D_H
81 
82 /*
83 ** Local Variables: --
84 ** mode: c++ --
85 ** c-file-style: "gnu" --
86 ** tab-width: 2 --
87 ** End: --
88 */
std::string get_shape_name() const
Return the name of the shape type.
virtual void generate_wires_self(wires_type &wires_, uint32_t options_=0) const
Generate a sequence of polylines for wires 3D rendering.
static const face_identifier & face_invalid()
Return a singleton invalid face identifier.
virtual bool is_outside(const vector_3d &position_, double skin_=GEOMTOOLS_PROPER_TOLERANCE) const
Check if a point is outside the cylinder.
Identifier of a face attached to a solid shape.
Definition: face_identifier.h:32
union_3d()
Default constructor.
Union of two 3D shapes.
Definition: union_3d.h:25
The face_intercept_info class hosts the parameters of.
Definition: face_intercept_info.h:31
#define GEOMTOOLS_PROPER_TOLERANCE
Definition: geomtools_config.h:26
static const std::string & union_3d_label()
Return the label of the union solid type.
virtual vector_3d get_normal_on_surface(const vector_3d &a_position, const face_identifier &a_surface_bit) const
Return the vector normal to the surface at some position.
#define GEOMTOOLS_OBJECT_3D_REGISTRATION_INTERFACE(ModelClassName)
Definition: i_object_3d.h:260
CLHEP::Hep3Vector vector_3d
Alias for the CLHEP 3D-vector class.
Definition: clhep.h:63
virtual bool find_intercept(const vector_3d &from_, const vector_3d &direction_, face_intercept_info &intercept_, double skin_=GEOMTOOLS_PROPER_TOLERANCE) const
Find the intercept point of a segment with the surface.
virtual bool is_inside(const vector_3d &position_, double skin_=GEOMTOOLS_PROPER_TOLERANCE) const
Check if a point is inside the cylinder.
virtual ~union_3d()
Destructor.
std::list< polyline_type > wires_type
Alias for a list of 3D-polylines.
Definition: utils.h:61
Base class for binary composite shapes.
Definition: i_composite_shape_3d.h:28
virtual face_identifier on_surface(const vector_3d &, const face_identifier &a_surface_mask=face_identifier::face_invalid(), double a_skin=GEOMTOOLS_PROPER_TOLERANCE) const
Return the surface bit a point belongs to.
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
virtual void _build_bounding_data()
Destructor.