VGM Version 5.3.1
Loading...
Searching...
No Matches
BooleanSolid.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The Geant4GM 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 GEANT4_GM_BOOLEAN_SOLID_H
21#define GEANT4_GM_BOOLEAN_SOLID_H
22
24
26
27#include <iostream>
28
29class G4VSolid;
30class G4BooleanSolid;
31class G4DisplacedSolid;
32class G4ReflectedSolid;
33
34namespace Geant4GM {
35
37{
38 public:
39 BooleanSolid(const std::string& name, VGM::BooleanType boolType,
40 VGM::ISolid* solidA, VGM::ISolid* solidB, CLHEP::HepRotation* rotation,
41 const CLHEP::Hep3Vector& translation);
43 G4BooleanSolid* booleanSolid, G4ReflectedSolid* reflectedBoolean);
44 virtual ~BooleanSolid();
45
46 // methods
47 virtual std::string Name() const;
48
49 virtual VGM::BooleanType BoolType() const;
50 virtual VGM::ISolid* ConstituentSolidA() const;
51 virtual VGM::ISolid* ConstituentSolidB() const;
52 virtual VGM::Transform Displacement() const;
53 virtual bool ToBeReflected() const;
54
55 // utility method
56 static G4VSolid* GetConstituentSolid(int index, G4BooleanSolid* booleanSolid);
57
58 protected:
60 BooleanSolid(const BooleanSolid& rhs);
61
62 private:
63 const G4DisplacedSolid* DisplacedSolid() const;
64
65 G4BooleanSolid* fBooleanSolid;
66 bool fToBeReflected;
67};
68
69} // namespace Geant4GM
70
72{
73 return fToBeReflected;
74}
75
76#endif // GEANT4_GM_BOOLEAN_SOLID_H
The ABC for Boolean solids.
virtual VGM::ISolid * ConstituentSolidA() const
Return the first constituent solid.
virtual std::string Name() const
Return the name of this solid.
virtual VGM::Transform Displacement() const
Return the 3D displacement of the second constituent solid with respect to the first one.
static G4VSolid * GetConstituentSolid(int index, G4BooleanSolid *booleanSolid)
virtual VGM::BooleanType BoolType() const
Return the Boolean type of this solid.
BooleanSolid(const std::string &name, VGM::BooleanType boolType, VGM::ISolid *solidA, VGM::ISolid *solidB, CLHEP::HepRotation *rotation, const CLHEP::Hep3Vector &translation)
virtual VGM::ISolid * ConstituentSolidB() const
Return the second constituent 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 Geant4.
Definition Element.h:29
std::vector< double > Transform
Definition Transform.h:40