CMS 3D CMS Logo

Boolean.h
Go to the documentation of this file.
1 #ifndef DETECTOR_DESCRIPTION_CORE_DDI_BOOLEAN_H
2 #define DETECTOR_DESCRIPTION_CORE_DDI_BOOLEAN_H
3 
8 #include "Solid.h"
9 
10 namespace DDI {
11 
12  class BooleanSolid : public Solid
13  {
14  public:
15  BooleanSolid(const DDSolid & A, const DDSolid & B,
16  const DDTranslation & t,
17  const DDRotation & r,
18  DDSolidShape s);
19 
20  const DDSolid & a() const { return a_; }
21  const DDSolid & b() const { return b_; }
22  const DDTranslation & t() const { return t_; }
23  const DDRotation & r() const { return r_; }
24 
25  protected:
29  };
30 
31  class MultiUnion : public Solid
32  {
33  public:
34  MultiUnion(const std::vector<DDSolid> & a,
35  const std::vector<DDTranslation> & t,
36  const std::vector<DDRotation> & r);
37 
38  const std::vector<DDSolid> & solids() const { return a_; }
39  const std::vector<DDTranslation> & t() const { return t_; }
40  const std::vector<DDRotation> & r() const { return r_; }
41 
42  protected:
43  std::vector<DDSolid> a_;
44  std::vector<DDTranslation> t_;
45  std::vector<DDRotation> r_;
46  };
47 
48  class Union : public BooleanSolid
49  {
50  public:
51  Union(const DDSolid & A, const DDSolid & B,
52  const DDTranslation & t,
53  const DDRotation & r);
54  };
55 
56  class Intersection : public BooleanSolid
57  {
58  public:
59  Intersection(const DDSolid & A, const DDSolid & B,
60  const DDTranslation & t,
61  const DDRotation & r);
62  };
63 
64  class Subtraction : public BooleanSolid
65  {
66  public:
67  Subtraction(const DDSolid & A, const DDSolid & B,
68  const DDTranslation & t,
69  const DDRotation & r);
70  };
71 }
72 #endif // DETECTOR_DESCRIPTION_CORE_DDI_BOOLEAN_H
std::vector< DDTranslation > t_
Definition: Boolean.h:44
DDSolid b_
Definition: Boolean.h:26
const DDTranslation & t() const
Definition: Boolean.h:22
DDSolidShape
Definition: DDSolidShapes.h:6
const DDSolid & a() const
Definition: Boolean.h:20
const std::vector< DDTranslation > & t() const
Definition: Boolean.h:39
const DDRotation & r() const
Definition: Boolean.h:23
A DDSolid represents the shape of a part.
Definition: DDSolid.h:38
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:64
std::vector< DDSolid > a_
Definition: Boolean.h:43
DDSolid a_
Definition: Boolean.h:26
const DDSolid & b() const
Definition: Boolean.h:21
BooleanSolid(const DDSolid &A, const DDSolid &B, const DDTranslation &t, const DDRotation &r, DDSolidShape s)
Definition: Boolean.cc:4
static const std::string B
const std::vector< DDSolid > & solids() const
Definition: Boolean.h:38
const std::vector< DDRotation > & r() const
Definition: Boolean.h:40
std::vector< DDRotation > r_
Definition: Boolean.h:45
DDRotation r_
Definition: Boolean.h:28
DDTranslation t_
Definition: Boolean.h:27