|
Last change
on this file since 242 was 233, checked in by barrand, 19 years ago |
|
|
-
Property svn:eol-style
set to
native
|
|
File size:
1.0 KB
|
| Line | |
|---|
| 1 | #ifndef G4Lab_GeometryVisitor_h
|
|---|
| 2 | #define G4Lab_GeometryVisitor_h
|
|---|
| 3 |
|
|---|
| 4 | #include <G4Transform3D.hh>
|
|---|
| 5 |
|
|---|
| 6 | class G4VPhysicalVolume;
|
|---|
| 7 | class G4LogicalVolume;
|
|---|
| 8 | class G4VSolid;
|
|---|
| 9 | class G4Material;
|
|---|
| 10 |
|
|---|
| 11 | namespace G4Lab {
|
|---|
| 12 |
|
|---|
| 13 | class IVisitedVolume {
|
|---|
| 14 | public:
|
|---|
| 15 | enum Status {
|
|---|
| 16 | DAUGHTERS = 0,
|
|---|
| 17 | SIBLING = 1,
|
|---|
| 18 | STOP = 2
|
|---|
| 19 | };
|
|---|
| 20 | virtual ~IVisitedVolume() {}
|
|---|
| 21 | virtual Status beginVolume(G4VPhysicalVolume*,
|
|---|
| 22 | G4VSolid*,G4Material*,
|
|---|
| 23 | const G4Transform3D&,int) = 0;
|
|---|
| 24 | virtual void endVolume(G4VPhysicalVolume*) = 0;
|
|---|
| 25 | virtual void beginDaughters(G4VPhysicalVolume*,int) = 0;
|
|---|
| 26 | virtual void endDaughters(G4VPhysicalVolume*,int) = 0;
|
|---|
| 27 | };
|
|---|
| 28 |
|
|---|
| 29 | class GeometryVisitor {
|
|---|
| 30 | public:
|
|---|
| 31 | GeometryVisitor();
|
|---|
| 32 | ~GeometryVisitor();
|
|---|
| 33 | bool visit(G4VPhysicalVolume*,int,const G4Transform3D&,IVisitedVolume*);
|
|---|
| 34 | private:
|
|---|
| 35 | bool descend(G4VPhysicalVolume*,
|
|---|
| 36 | int,
|
|---|
| 37 | G4VSolid*,
|
|---|
| 38 | G4Material*,
|
|---|
| 39 | const G4Transform3D&,
|
|---|
| 40 | IVisitedVolume*);
|
|---|
| 41 | private:
|
|---|
| 42 | int fIndex;
|
|---|
| 43 | };
|
|---|
| 44 |
|
|---|
| 45 | }
|
|---|
| 46 |
|
|---|
| 47 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.