#include <G4PolyhedronArbitrary.hh>
Inheritance diagram for G4PolyhedronArbitrary:
Public Member Functions | |
G4PolyhedronArbitrary (const G4int nVertices, const G4int nFacets) | |
virtual | ~G4PolyhedronArbitrary () |
void | AddVertex (const G4ThreeVector v) |
void | AddFacet (const G4int iv1, const G4int iv2, const G4int iv3, const G4int iv4=0) |
void | SetReferences () |
void | InvertFacets () |
Protected Attributes | |
G4int | nVertexCount |
G4int | nFacetCount |
Definition at line 75 of file G4PolyhedronArbitrary.hh.
Definition at line 62 of file G4PolyhedronArbitrary.cc.
References nFacetCount, and nVertexCount.
00064 { 00065 AllocateMemory(nVertices, nFacets); 00066 nVertexCount = 0; 00067 nFacetCount = 0; 00068 }
G4PolyhedronArbitrary::~G4PolyhedronArbitrary | ( | ) | [virtual] |
void G4PolyhedronArbitrary::AddFacet | ( | const G4int | iv1, | |
const G4int | iv2, | |||
const G4int | iv3, | |||
const G4int | iv4 = 0 | |||
) |
Definition at line 93 of file G4PolyhedronArbitrary.cc.
References G4cerr, G4endl, nFacetCount, and nVertexCount.
Referenced by G4TessellatedSolid::CreatePolyhedron(), and G4GenericTrap::CreatePolyhedron().
00095 { 00096 if (nFacetCount == nface) 00097 { 00098 G4cerr <<G4endl; 00099 G4cerr <<"ERROR IN G4PolyhedronArbitrary::AddFacet" <<G4endl; 00100 G4cerr <<"ATTEMPT TO EXCEED MAXIMUM NUMBER OF FACETS : " << nFacetCount 00101 <<G4endl; 00102 G4cerr <<G4endl; 00103 } 00104 else if (iv1 < 1 || iv1 > nvert || iv2 < 1 || iv2 > nvert || 00105 iv3 < 1 || iv3 > nvert || iv4 > nvert) 00106 { 00107 G4cerr <<G4endl; 00108 G4cerr <<"ERROR IN G4PolyhedronArbitrary::AddFacet" <<G4endl; 00109 G4cerr <<"ATTEMPT TO INDEX VERTEX NUMBER WHICH IS OUT-OF-RANGE : " <<G4endl; 00110 G4cerr <<G4endl; 00111 } 00112 else if (iv1 > nVertexCount || iv2 > nVertexCount || iv3 > nVertexCount || 00113 iv4 > nVertexCount) 00114 { 00115 G4cerr <<G4endl; 00116 G4cerr <<"ERROR IN G4PolyhedronArbitrary::AddFacet" <<G4endl; 00117 G4cerr <<"VERTEX NEEDS TO BE DEFINED FIRST : " <<G4endl; 00118 G4cerr <<G4endl; 00119 } 00120 else 00121 { 00122 nFacetCount++; 00123 pF[nFacetCount] = G4Facet(iv1, 0, iv2, 0, iv3, 0, iv4, 0); 00124 } 00125 }
void G4PolyhedronArbitrary::AddVertex | ( | const G4ThreeVector | v | ) |
Definition at line 75 of file G4PolyhedronArbitrary.cc.
References G4cerr, G4endl, and nVertexCount.
Referenced by G4TessellatedSolid::CreatePolyhedron(), and G4GenericTrap::CreatePolyhedron().
00076 { 00077 if (nVertexCount == nvert + 1) 00078 { 00079 G4cerr <<G4endl; 00080 G4cerr <<"ERROR IN G4PolyhedronArbitrary::AddVertex" <<G4endl; 00081 G4cerr <<"ATTEMPT TO EXCEED MAXIMUM NUMBER OF VERTICES : " << nVertexCount 00082 <<G4endl; 00083 G4cerr <<G4endl; 00084 } 00085 else 00086 { 00087 nVertexCount++; 00088 pV[nVertexCount] = v; 00089 } 00090 }
void G4PolyhedronArbitrary::InvertFacets | ( | ) | [inline] |
Definition at line 89 of file G4PolyhedronArbitrary.hh.
Referenced by G4GenericTrap::CreatePolyhedron().
void G4PolyhedronArbitrary::SetReferences | ( | ) | [inline] |
Definition at line 86 of file G4PolyhedronArbitrary.hh.
Referenced by G4TessellatedSolid::CreatePolyhedron(), and G4GenericTrap::CreatePolyhedron().
G4int G4PolyhedronArbitrary::nFacetCount [protected] |
Definition at line 93 of file G4PolyhedronArbitrary.hh.
Referenced by AddFacet(), and G4PolyhedronArbitrary().
G4int G4PolyhedronArbitrary::nVertexCount [protected] |
Definition at line 92 of file G4PolyhedronArbitrary.hh.
Referenced by AddFacet(), AddVertex(), and G4PolyhedronArbitrary().