Bayeux  3.4.1
Core Foundation library for SuperNEMO
subtraction_3d.h
Go to the documentation of this file.
1 /* Author(s): Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2008-05-24
4  * Last modified: 2015-03-18
5  *
6  * License:
7  *
8  * Description:
9  * Interface:
10  *
11  * History:
12  *
13  */
14 
15 #ifndef GEOMTOOLS_SUBTRACTION_3D_H
16 #define GEOMTOOLS_SUBTRACTION_3D_H 1
17 
18 // This project:
20 
21 namespace geomtools {
22 
25  {
26  public:
27 
29  static const std::string & subtraction_3d_label();
30 
32  std::string get_shape_name () const;
33 
35  subtraction_3d ();
36 
38  virtual ~subtraction_3d ();
39 
41  virtual bool is_inside(const vector_3d & position_,
42  double skin_ = GEOMTOOLS_PROPER_TOLERANCE) const;
43 
45  virtual bool is_outside(const vector_3d & position_,
46  double skin_ = GEOMTOOLS_PROPER_TOLERANCE) const;
47 
49  virtual face_identifier on_surface(const vector_3d &,
50  const face_identifier & a_surface_mask = face_identifier::face_invalid(),
51  double a_skin = GEOMTOOLS_PROPER_TOLERANCE) const;
52 
54  virtual vector_3d get_normal_on_surface(const vector_3d & a_position,
55  const face_identifier & a_surface_bit) const;
56 
58  virtual bool find_intercept (const vector_3d & from_,
59  const vector_3d & direction_,
60  face_intercept_info & intercept_,
61  double skin_ = GEOMTOOLS_PROPER_TOLERANCE) const;
62 
64  virtual void generate_wires_self(wires_type & wires_,
65  uint32_t options_ = 0) const;
66 
67  protected:
68 
70  virtual void _build_bounding_data();
71 
72  // Registration interface :
74 
75  };
76 
77 } // end of namespace geomtools
78 
79 #endif // GEOMTOOLS_SUBTRACTION_3D_H
80 
81 /*
82 ** Local Variables: --
83 ** mode: c++ --
84 ** c-file-style: "gnu" --
85 ** tab-width: 2 --
86 ** End: --
87 */
virtual bool is_inside(const vector_3d &position_, double skin_=GEOMTOOLS_PROPER_TOLERANCE) const
Check if a point is inside the cylinder.
static const std::string & subtraction_3d_label()
Return the label of the subtraction solid type.
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.
static const face_identifier & face_invalid()
Return a singleton invalid face identifier.
Identifier of a face attached to a solid shape.
Definition: face_identifier.h:32
virtual bool is_outside(const vector_3d &position_, double skin_=GEOMTOOLS_PROPER_TOLERANCE) const
Check if a point is outside the cylinder.
Subtraction of two 3D shapes.
Definition: subtraction_3d.h:24
The face_intercept_info class hosts the parameters of.
Definition: face_intercept_info.h:31
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_PROPER_TOLERANCE
Definition: geomtools_config.h:26
#define GEOMTOOLS_OBJECT_3D_REGISTRATION_INTERFACE(ModelClassName)
Definition: i_object_3d.h:260
virtual ~subtraction_3d()
Destructor.
CLHEP::Hep3Vector vector_3d
Alias for the CLHEP 3D-vector class.
Definition: clhep.h:63
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 void _build_bounding_data()
Destructor.
std::string get_shape_name() const
Return the name of the shape type.
subtraction_3d()
Default constructor.
virtual void generate_wires_self(wires_type &wires_, uint32_t options_=0) const
Generate a sequence of polylines for wires 3D rendering.
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