VGM
Version 5.5
Toggle main menu visibility
Loading...
Searching...
No Matches
packages
Geant4GM
include
Geant4GM
solids
Arb8.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
//
21
22
#ifndef GEANT4_GM_ARB8_SOLID_H
23
#define GEANT4_GM_ARB8_SOLID_H
24
25
#include "
BaseVGM/solids/VArb8.h
"
26
27
#include "
VGM/common/TwoVector.h
"
28
29
#include "G4ThreeVector.hh"
30
#include "globals.hh"
31
32
#include <string>
33
#include <vector>
34
35
class
G4TessellatedSolid;
36
class
G4GenericTrap;
37
class
G4ReflectedSolid;
38
class
G4VSolid;
39
class
G4VFacet;
40
41
namespace
Geant4GM
{
42
43
class
Arb8
:
public
BaseVGM::VArb8
44
{
45
public
:
46
Arb8
(
47
const
std::string& name,
double
hz, std::vector<VGM::TwoVector> vertices);
48
Arb8
(G4GenericTrap* genericTrap, G4ReflectedSolid* reflected = 0);
49
virtual
~Arb8
();
50
51
// static methods
52
static
bool
IsTwisted
(std::vector<VGM::TwoVector> vertices);
53
static
double
MaxTwistAngle
(
const
std::vector<VGM::TwoVector>& vertices);
54
55
// methods
56
virtual
std::string
Name
()
const
;
57
virtual
int
NofVertices
()
const
;
58
virtual
VGM::TwoVector
Vertex
(
int
index)
const
;
59
virtual
double
TwistAngle
(
int
index)
const
;
60
virtual
double
ZHalfLength
()
const
;
61
62
protected
:
63
Arb8
();
64
Arb8
(
const
Arb8
& rhs);
65
66
private
:
67
// methods
68
void
ReorderVertices(std::vector<G4ThreeVector>& vertices);
69
70
G4VFacet* MakeDownFacet(std::vector<G4ThreeVector> fromVertices,
int
ind1,
71
int
ind2,
int
ind3)
const
;
72
G4VFacet* MakeUpFacet(std::vector<G4ThreeVector> fromVertices,
int
ind1,
73
int
ind2,
int
ind3)
const
;
74
G4VFacet* MakeSideFacet(G4ThreeVector downVertex0, G4ThreeVector downVertex1,
75
G4ThreeVector upVertex1, G4ThreeVector upVertex0)
const
;
76
77
static
double
TwistAngleOfFace(
78
const
std::vector<VGM::TwoVector>& vertices,
int
index);
79
80
// static data members
81
static
const
int
fgkNofVertices;
82
static
const
double
fgkTolerance;
83
static
const
double
fgkMaxTwistAngle;
84
85
// data members
86
double
fHz;
87
std::vector<VGM::TwoVector> fVertices;
88
G4TessellatedSolid* fTessellatedSolid;
89
G4VSolid* fSolid;
90
};
91
92
}
// namespace Geant4GM
93
94
#endif
// GEANT4_GM_EXTRUDED_SOLID_H
TwoVector.h
VArb8.h
BaseVGM::VArb8
The ABC for Arb8 solids.
Definition
VArb8.h:30
Geant4GM::Arb8::IsTwisted
static bool IsTwisted(std::vector< VGM::TwoVector > vertices)
Definition
Arb8.cxx:81
Geant4GM::Arb8::~Arb8
virtual ~Arb8()
Definition
Arb8.cxx:325
Geant4GM::Arb8::NofVertices
virtual int NofVertices() const
Return the number of vertices.
Definition
Arb8.cxx:439
Geant4GM::Arb8::ZHalfLength
virtual double ZHalfLength() const
Return the half-length along the z axis in mm.
Definition
Arb8.cxx:466
Geant4GM::Arb8::Vertex
virtual VGM::TwoVector Vertex(int index) const
Return the index-th vertex.
Definition
Arb8.cxx:442
Geant4GM::Arb8::Arb8
Arb8(const std::string &name, double hz, std::vector< VGM::TwoVector > vertices)
Definition
Arb8.cxx:108
Geant4GM::Arb8::MaxTwistAngle
static double MaxTwistAngle(const std::vector< VGM::TwoVector > &vertices)
Definition
Arb8.cxx:65
Geant4GM::Arb8::Arb8
Arb8()
Definition
Arb8.cxx:299
Geant4GM::Arb8::TwistAngle
virtual double TwistAngle(int index) const
Return the index-th twist angle.
Definition
Arb8.cxx:454
Geant4GM::Arb8::Name
virtual std::string Name() const
Return the name of this solid.
Definition
Arb8.cxx:433
Geant4GM
VGM implementation for Geant4.
Definition
Element.h:29
VGM::TwoVector
std::pair< double, double > TwoVector
Definition
TwoVector.h:28
Generated on
for VGM by
1.17.0