VGM Version 5.3
Loading...
Searching...
No Matches
BooleanSolid.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The RootGM package of the Virtual Geometry Model
5// Copyright (C) 2007, Ivana Hrivnacova
6// All rights reserved.
7//
8// For the licensing terms see vgm/LICENSE.
9// Contact: ivana@ipno.in2p3.fr
10// -----------------------------------------------------------------------
11
13//
19
20#ifndef ROOT_GM_BOOLEAN_SOLID_H
21#define ROOT_GM_BOOLEAN_SOLID_H
22
24
26
27class TGeoShape;
28class TGeoCompositeShape;
29class TGeoMatrix;
30
31namespace RootGM {
32
34{
35 public:
36 BooleanSolid(const std::string& name, VGM::BooleanType boolType,
37 VGM::ISolid* solidA, VGM::ISolid* solidB, TGeoMatrix* displacementB);
38 BooleanSolid(TGeoCompositeShape* compositeShape);
39 virtual ~BooleanSolid();
40
41 // methods
42 virtual std::string Name() const;
43
44 virtual VGM::BooleanType BoolType() const;
45 virtual VGM::ISolid* ConstituentSolidA() const;
46 virtual VGM::ISolid* ConstituentSolidB() const;
47 virtual VGM::Transform Displacement() const;
48 virtual bool ToBeReflected() const;
49
50 // utility method
51 static TGeoShape* GetConstituentSolid(
52 int index, TGeoCompositeShape* compositeShape);
53
54 protected:
56 BooleanSolid(const BooleanSolid& rhs);
57
58 private:
59 static const char fgkIntersectionChar;
60 static const char fgkSubtractionChar;
61 static const char fgkUnionChar;
62 static const char fgkSeparator;
63
64 TGeoCompositeShape* fCompositeShape;
65};
66
67} // namespace RootGM
68
69inline bool RootGM::BooleanSolid::ToBeReflected() const { return false; }
70
71#endif // ROOT_GM_BOOLEAN_SOLID_H
The ABC for Boolean solids.
VGM implementation for Root Boolean solid.
static TGeoShape * GetConstituentSolid(int index, TGeoCompositeShape *compositeShape)
virtual VGM::Transform Displacement() const
Return the 3D displacement of the second constituent solid with respect to the first one.
virtual VGM::ISolid * ConstituentSolidB() const
Return the second constituent solid.
virtual VGM::BooleanType BoolType() const
Return the Boolean type of this solid.
virtual VGM::ISolid * ConstituentSolidA() const
Return the first constituent solid.
virtual std::string Name() const
Return the name of this solid.
virtual bool ToBeReflected() const
Return true if the solid has to be first reflected before being placed.
The VGM interface to solids.
Definition ISolid.h:58
VGM implementation for Root.
Definition axis.h:28
std::vector< double > Transform
Definition Transform.h:40