1 | // |
---|
2 | // ******************************************************************** |
---|
3 | // * License and Disclaimer * |
---|
4 | // * * |
---|
5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
7 | // * conditions of the Geant4 Software License, included in the file * |
---|
8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
9 | // * include a list of copyright holders. * |
---|
10 | // * * |
---|
11 | // * Neither the authors of this software system, nor their employing * |
---|
12 | // * institutes,nor the agencies providing financial support for this * |
---|
13 | // * work make any representation or warranty, express or implied, * |
---|
14 | // * regarding this software system or assume any liability for its * |
---|
15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
16 | // * for the full disclaimer and the limitation of liability. * |
---|
17 | // * * |
---|
18 | // * This code implementation is the result of the scientific and * |
---|
19 | // * technical work of the GEANT4 collaboration. * |
---|
20 | // * By using, copying, modifying or distributing the software (or * |
---|
21 | // * any work based on the software) you agree to acknowledge its * |
---|
22 | // * use in resulting scientific publications, and indicate your * |
---|
23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
24 | // ******************************************************************** |
---|
25 | // |
---|
26 | // |
---|
27 | // SBTvoxelMessenger.hh |
---|
28 | // |
---|
29 | // Definition of the UI messenger for SBTvoxel |
---|
30 | // |
---|
31 | |
---|
32 | #ifndef SBTvoxelMessenger_hh |
---|
33 | #define SBTvoxelMessenger_hh |
---|
34 | |
---|
35 | #include "G4UImessenger.hh" |
---|
36 | #include "SBTvoxel.hh" |
---|
37 | #include "G4RotationMatrix.hh" |
---|
38 | #include <fstream> |
---|
39 | |
---|
40 | class G4VSolid; |
---|
41 | class G4SolidQuery; |
---|
42 | |
---|
43 | class G4AffineTransform; |
---|
44 | class G4VoxelLimits; |
---|
45 | |
---|
46 | class G4UIdirectory; |
---|
47 | class G4UIcommand; |
---|
48 | class G4UIcmdWith3VectorAndUnit; |
---|
49 | class G4UIcmdWithAnInteger; |
---|
50 | class G4UIcmdWithAString; |
---|
51 | class G4UIcmdWithoutParameter; |
---|
52 | class G4UIcmdWith3Vector; |
---|
53 | |
---|
54 | class G4UIcmdWithPargs; |
---|
55 | class G4UIcmdParg; |
---|
56 | |
---|
57 | class SBTvoxelMessenger : public G4UImessenger { |
---|
58 | public: |
---|
59 | SBTvoxelMessenger( const G4String prefix, const G4SolidQuery *solidQuery, SBTVisManager *visManager ); |
---|
60 | ~SBTvoxelMessenger(); |
---|
61 | |
---|
62 | void SetNewValue( G4UIcommand *command, G4String newValues ); |
---|
63 | G4String GetCurrentValue( G4UIcommand *command ); |
---|
64 | |
---|
65 | inline const G4SolidQuery *GetSolidQuery() const { return solidQuery; } |
---|
66 | |
---|
67 | void InvokeTest(); |
---|
68 | void Draw(); |
---|
69 | void Debug(); |
---|
70 | |
---|
71 | private: |
---|
72 | SBTvoxel tester; |
---|
73 | const G4SolidQuery *solidQuery; |
---|
74 | SBTVisManager *visManager; |
---|
75 | |
---|
76 | G4VoxelLimits *voxel; |
---|
77 | G4ThreeVector *translate; |
---|
78 | G4RotationMatrix *rotate; |
---|
79 | G4ThreeVector *point; |
---|
80 | G4double limits[2]; |
---|
81 | EAxis axis; |
---|
82 | |
---|
83 | G4String errorFile; |
---|
84 | |
---|
85 | G4UIdirectory *voxelDirectory; |
---|
86 | G4UIcmdWith3VectorAndUnit *targetCmd; |
---|
87 | G4UIcmdWith3VectorAndUnit *widthsCmd; |
---|
88 | G4UIcmdWithAnInteger *maxVoxelsCmd; |
---|
89 | G4UIcmdWithAnInteger *maxErrorsCmd; |
---|
90 | G4UIcmdWithAString *errorFileCmd; |
---|
91 | G4UIcmdWithoutParameter *runCmd; |
---|
92 | |
---|
93 | G4UIdirectory *pictDirectory; |
---|
94 | G4UIcmdParg *pictVoxelArgs[6]; |
---|
95 | G4UIcmdWithPargs *pictVoxelCmd; |
---|
96 | G4UIcmdWith3Vector *pictTranCmd; |
---|
97 | G4UIcmdParg *pictRotArgs[4]; |
---|
98 | G4UIcmdWithPargs *pictRotCmd; |
---|
99 | G4UIcmdWith3Vector *pictPointCmd; |
---|
100 | G4UIcmdParg *pictLimitArgs[3]; |
---|
101 | G4UIcmdWithPargs *pictLimitCmd; |
---|
102 | G4UIcmdWithoutParameter *pictDrawCmd; |
---|
103 | G4UIcmdWithoutParameter *pictDebugCmd; |
---|
104 | }; |
---|
105 | |
---|
106 | #endif |
---|