59 theDefaultTracer = p1;
60 theSteppingAction = p2;
67 fileCmd->
SetGuidance(
"Define the name of output JPEG file.");
73 columnCmd->
SetGuidance(
"Define the number of horizontal pixels.");
78 rowCmd->
SetGuidance(
"Define the number of virtical pixels.");
83 targetCmd->
SetGuidance(
"Define the center position of the target.");
90 eyePosCmd->
SetGuidance(
"Eye direction is calsurated from (target - eyePosition).");
96 lightCmd->
SetGuidance(
"Define the direction of illumination light.");
97 lightCmd->
SetGuidance(
"The vector needs not to be a unit vector, but it must not be a zero vector.");
100 lightCmd->
SetRange(
"Px != 0 || Py != 0 || Pz != 0");
103 spanXCmd->
SetGuidance(
"Define the angle per 100 pixels.");
110 headCmd->
SetGuidance(
"Define the head direction.");
114 headCmd->
SetRange(
"headAngle>=0. && headAngle<360.");
117 attCmd->
SetGuidance(
"Define the attenuation length for transparent material.");
118 attCmd->
SetGuidance(
"Note that this value is independent to the attenuation length for the optical photon processes.");
125 distCmd->
SetGuidance(
"Distortion effect of the fish eye lens.");
130 transCmd->
SetGuidance(
"Ignore transparency even if the alpha of G4Colour < 1.");
135 bkgColCmd->
SetGuidance(
"Command has been deprecated. Use /vis/viewer/set/background instead.");
160 if(command==columnCmd)
162 else if(command==rowCmd)
164 else if(command==targetCmd)
166 else if(command==eyePosCmd)
168 else if(command==lightCmd)
170 else if(command==spanXCmd)
172 else if(command==headCmd)
174 else if(command==attCmd)
176 else if(command==distCmd)
178 else if(command==transCmd)
180 else if(command==bkgColCmd)
187 G4VisManager* pVisManager = G4VisManager::GetInstance();
189 theTracer = theDefaultTracer;
198 "G4RTMessenger::SetNewValue: Current viewer is not of type RayTracer."
199 "\n Use \"/vis/viewer/select\" or \"/vis/open\"."
204 if (theTracer == theDefaultTracer) {
206"G4RTMessenger::SetNewValue: No valid current viewer. Using default RayTracer."
210 if(command==columnCmd)
212 else if(command==rowCmd)
214 else if(command==targetCmd)
216 else if(command==eyePosCmd)
218 else if(command==lightCmd)
220 else if(command==spanXCmd)
222 else if(command==headCmd)
224 else if(command==attCmd)
226 else if(command==distCmd)
228 else if(command==bkgColCmd)
230 G4cout <<
"WARNING: /vis/rayTracer/backgroundColour has been deprecated."
231 "\n Use \"/vis/viewer/set/background\" instead."
234 else if(command==transCmd)
236 else if(command==fileCmd)
237 { theTracer->
Trace(newValue); }
CLHEP::Hep3Vector G4ThreeVector
G4DLLIMPORT std::ostream G4cout
virtual void SetNewValue(G4UIcommand *command, G4String newValue)
virtual G4String GetCurrentValue(G4UIcommand *command)
static G4RTMessenger * GetInstance(G4TheRayTracer *p1, G4RTSteppingAction *p2)
G4bool GetIgnoreTransparency() const
void SetIgnoreTransparency(G4bool val)
G4TheRayTracer * GetTracer()
void SetTargetPosition(const G4ThreeVector &val)
G4double GetViewSpan() const
void SetViewSpan(G4double val)
G4double GetHeadAngle() const
G4bool GetDistortion() const
void SetNColumn(G4int val)
void SetLightDirection(const G4ThreeVector &val)
void SetDistortion(G4bool val)
G4ThreeVector GetTargetPosition() const
void SetAttenuationLength(G4double val)
G4Colour GetBackgroundColour() const
G4ThreeVector GetLightDirection() const
G4ThreeVector GetEyePosition() const
void SetHeadAngle(G4double val)
void Trace(G4String fileName)
G4double GetAttenuationLength() const
void SetEyePosition(const G4ThreeVector &val)
void SetDefaultUnit(const char *defUnit)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4ThreeVector defVal)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4ThreeVector defVal)
static G4bool GetNewBoolValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetDefaultValue(G4double defVal)
void SetDefaultUnit(const char *defUnit)
static G4double GetNewDoubleValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
static G4String ConvertToString(G4bool boolVal)
void SetGuidance(const char *aGuidance)
void SetRange(const char *rs)
void AvailableForStates(G4ApplicationState s1)
G4VViewer * GetCurrentViewer() const