66 if(!trajectoryContainer)
return;
68 if(!trajectory)
return;
74 G4Colour initialCol(backgroundColour);
76 { initialCol = GetSurfaceColour(trajectory->
GetPointC(nPoint-1)); }
79 for(
int i=nPoint-2;i>=0;i--)
83 G4Colour mixedCol = GetMixedColour(rayColour,surfaceCol,weight);
84 rayColour = Attenuate(trajectory->
GetPointC(i),mixedCol);
87 colorMap->
add(evId,rayColour);
92 const G4RTRun* theLocalRun =
static_cast<const G4RTRun*
>(aLocalRun);
93 if(theLocalRun) *(colorMap) += *(theLocalRun->colorMap);
102 G4bool preVis = ValidColour(preAtt);
103 G4bool postVis = ValidColour(postAtt);
107 if(!preVis&&!postVis)
return transparent;
116 G4double brill = (1.0-(-lightDirection).dot(normal))/2.0;
124 { preCol = transparent; }
128 G4double brill = (1.0-(-lightDirection).dot(-normal))/2.0;
136 { postCol = transparent; }
138 if(!preVis)
return postCol;
139 if(!postVis)
return preCol;
142 return GetMixedColour(preCol,postCol,weight);
151 return G4Colour(red,green,blue,alpha);
158 G4bool visible = ValidColour(preAtt);
159 if(!visible)
return sourceCol;
169 if(stepAlpha > 0.9999999){ stepAlpha = 0.9999999; }
170 attenuationFuctor = -stepAlpha/(1.0-stepAlpha)*stepLength/attenuationLength;
172 G4double KtRed = std::exp((1.0-stepRed)*attenuationFuctor);
173 G4double KtGreen = std::exp((1.0-stepGreen)*attenuationFuctor);
174 G4double KtBlue = std::exp((1.0-stepBlue)*attenuationFuctor);
175 if(KtRed>1.0){KtRed=1.0;}
176 if(KtGreen>1.0){KtGreen=1.0;}
177 if(KtBlue>1.0){KtBlue=1.0;}
virtual void Merge(const G4Run *)
G4double GetAlpha() const
virtual void Merge(const G4Run *)
virtual void RecordEvent(const G4Event *)
const G4VisAttributes * GetPreStepAtt() const
const G4Colour & GetColour() const
G4TrajectoryContainer * GetTrajectoryContainer() const
virtual int GetPointEntries() const
G4ThreeVector lightDirection
G4double GetGreen() const
G4int add(const G4int &key, T *&aHit) const
G4ThreeVector GetSurfaceNormal() const
const G4VisAttributes * GetPostStepAtt() const
G4RayTrajectoryPoint * GetPointC(G4int i) const
G4bool IsForceDrawingStyle() const
G4Colour backgroundColour
G4double GetStepLength() const
G4double attenuationLength
ForcedDrawingStyle GetForcedDrawingStyle() const