VGM Version 5.3
Loading...
Searching...
No Matches
TessellatedSolid.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_TESSELLATED_SOLID_H
21#define GEANT4_GM_TESSELLATED_SOLID_H
22
25
26#include "globals.hh"
27
28#include <string>
29#include <vector>
30
31class G4TessellatedSolid;
32class G4ReflectedSolid;
33class G4VSolid;
34
35namespace Geant4GM {
36
38{
39 public:
40 TessellatedSolid(const std::string& name,
41 std::vector<std::vector<VGM::ThreeVector> > facets);
43 G4TessellatedSolid* tessellated, G4ReflectedSolid* reflTessellated = 0);
44 virtual ~TessellatedSolid();
45
46 // methods
47 virtual std::string Name() const;
48 virtual int NofFacets() const;
49 virtual int NofVertices(int ifacet) const;
50 virtual VGM::ThreeVector Vertex(int ifacet, int index) const;
51
52 protected:
55
56 private:
57 // methods
58 void CheckFacetIndex(int ifacet) const;
59 void CheckVertexIndex(int ifacet, int index) const;
60
61 // data members
62 G4String fName;
63 G4bool fIsReflected;
64 G4TessellatedSolid* fTessellatedSolid;
65};
66
67} // namespace Geant4GM
68
69#endif // GEANT4_GM_TESSELLATED_SOLID_H
The ABC for tessellated solid.
VGM implementation for Geant4 tessellated solid.
virtual int NofVertices(int ifacet) const
Return the number of vertices in the the ifacet-th facet.
virtual VGM::ThreeVector Vertex(int ifacet, int index) const
Return the index-th vertex in the ifacet-th facet.
virtual int NofFacets() const
Return the number of facets.
virtual std::string Name() const
Return the name of this solid.
VGM implementation for Geant4.
Definition Element.h:29
std::vector< double > ThreeVector
Definition ThreeVector.h:27