VGM Version 5.3
Loading...
Searching...
No Matches
MultiUnion.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_MULTI_UNION_H
21#define ROOT_GM_MULTI_UNION_H
22
24
26
27#include "TGeoMatrix.h"
28
29class TGeoShape;
30class TGeoCompositeShape;
31class TGeoMatrix;
32
33namespace RootGM {
34
36{
37 public:
38 MultiUnion(const std::string& name, std::vector<VGM::ISolid*> constituents,
39 std::vector<TGeoMatrix*> transforms);
40 virtual ~MultiUnion();
41
42 // methods
43 virtual std::string Name() const;
44
45 virtual int NofSolids() const;
46 virtual ISolid* ConstituentSolid(int index) const;
47 virtual VGM::Transform Transformation(int index) const;
48 virtual bool ToBeReflected() const;
49
50 protected:
51 MultiUnion();
52 MultiUnion(const MultiUnion& rhs);
53
54 private:
55 static const char fgkUnionChar;
56 static const char fgkSeparator;
57
58 TGeoCompositeShape* fCompositeShape;
59 // keep input data as they cannot be accessed via TGeoCompositeShape
60 std::vector<VGM::ISolid*> fConstituents;
61 std::vector<TGeoMatrix*> fTransforms;
62};
63
64} // namespace RootGM
65
66inline bool RootGM::MultiUnion::ToBeReflected() const { return false; }
67
68#endif // ROOT_GM_MULTI_UNION_H
The ABC for Boolean solids.
Definition VMultiUnion.h:30
VGM implementation for Root Boolean solid.
Definition MultiUnion.h:36
virtual bool ToBeReflected() const
Return true if the solid has to be first reflected before being placed.
Definition MultiUnion.h:66
virtual std::string Name() const
Return the name of this solid.
virtual int NofSolids() const
Return the number of constituent solids.
virtual ISolid * ConstituentSolid(int index) const
Return the i-th constituent solid.
virtual VGM::Transform Transformation(int index) const
Return the displacement of the ith constituent solid.
VGM implementation for Root.
Definition axis.h:28
std::vector< double > Transform
Definition Transform.h:40