VGM Version 5.3
Loading...
Searching...
No Matches
ExtrudedSolid.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_EXTRUDED_SOLID_H
21#define GEANT4_GM_EXTRUDED_SOLID_H
22
24
25#include "globals.hh"
26
27#include <string>
28#include <vector>
29
30class G4ExtrudedSolid;
31class G4ReflectedSolid;
32class G4VSolid;
33
34namespace Geant4GM {
35
37{
38 public:
39 ExtrudedSolid(const std::string& name, std::vector<VGM::TwoVector> polygon,
40 std::vector<std::vector<double> > zsections);
41 ExtrudedSolid(G4ExtrudedSolid* xtru, G4ReflectedSolid* reflXtru = 0);
42 virtual ~ExtrudedSolid();
43
44 // methods
45 virtual std::string Name() const;
46 inline int NofVertices() const;
47 inline VGM::TwoVector Vertex(int index) const;
48 virtual int NofZSections() const;
49 virtual double ZPosition(int iz) const;
50 virtual VGM::TwoVector Offset(int iz) const;
51 virtual double Scale(int iz) const;
52
53 protected:
55 ExtrudedSolid(const ExtrudedSolid& rhs);
56
57 private:
58 // types
59 typedef std::vector<double> ZSectionType;
60
61 // methods
62 void CreateFinalSolid();
63
64 // data members
65 G4String fName;
66 G4VSolid* fExtrudedSolid;
67 std::vector<ZSectionType> fZSections;
68 std::vector<G4ExtrudedSolid*> fConstituents;
69};
70
71} // namespace Geant4GM
72
73#endif // GEANT4_GM_EXTRUDED_SOLID_H
The ABC for xtru solids.
VGM implementation for Geant4 xtru solid.
virtual std::string Name() const
Return the name of this solid.
virtual double ZPosition(int iz) const
Return the z position of the iz-th plane in mm.
virtual VGM::TwoVector Offset(int iz) const
Return the polygon offset in iz-th side.
virtual int NofZSections() const
Return the number of planes perpendicular to the z axis.
VGM::TwoVector Vertex(int index) const
Return the index-th vertex of outline polygon.
int NofVertices() const
Return the number of vertices of outline polygon.
virtual double Scale(int iz) const
Return the polygon scale in iz-th side.
VGM implementation for Geant4.
Definition Element.h:29
std::pair< double, double > TwoVector
Definition TwoVector.h:28