64 if(!trajectoryContainer)
return;
66 if(!trajectory)
return;
72 G4Colour initialCol(backgroundColour);
74 { initialCol = GetSurfaceColour(trajectory->
GetPointC(nPoint-1)); }
77 for(
int i=nPoint-2;i>=0;i--)
81 G4Colour mixedCol = GetMixedColour(rayColour,surfaceCol,weight);
82 rayColour = Attenuate(trajectory->
GetPointC(i),mixedCol);
85 colorMap->
add(evId,rayColour);
90 const G4RTRun* theLocalRun =
static_cast<const G4RTRun*
>(aLocalRun);
91 if(theLocalRun) *(colorMap) += *(theLocalRun->colorMap);
100 G4bool preVis = ValidColour(preAtt);
101 G4bool postVis = ValidColour(postAtt);
105 if(!preVis&&!postVis)
return transparent;
114 G4double brill = (1.0-(-lightDirection).dot(normal))/2.0;
122 { preCol = transparent; }
126 G4double brill = (1.0-(-lightDirection).dot(-normal))/2.0;
134 { postCol = transparent; }
136 if(!preVis)
return postCol;
137 if(!postVis)
return preCol;
140 return GetMixedColour(preCol,postCol,weight);
149 return G4Colour(red,green,blue,alpha);
156 G4bool visible = ValidColour(preAtt);
157 if(!visible)
return sourceCol;
167 if(stepAlpha > 0.9999999){ stepAlpha = 0.9999999; }
168 attenuationFuctor = -stepAlpha/(1.0-stepAlpha)*stepLength/attenuationLength;
170 G4double KtRed = std::exp((1.0-stepRed)*attenuationFuctor);
171 G4double KtGreen = std::exp((1.0-stepGreen)*attenuationFuctor);
172 G4double KtBlue = std::exp((1.0-stepBlue)*attenuationFuctor);
173 if(KtRed>1.0){KtRed=1.0;}
174 if(KtGreen>1.0){KtGreen=1.0;}
175 if(KtBlue>1.0){KtBlue=1.0;}
G4double GetAlpha() const
G4double GetGreen() const
G4TrajectoryContainer * GetTrajectoryContainer() const
virtual void RecordEvent(const G4Event *)
virtual void Merge(const G4Run *)
G4ThreeVector GetSurfaceNormal() const
const G4VisAttributes * GetPostStepAtt() const
G4double GetStepLength() const
const G4VisAttributes * GetPreStepAtt() const
G4RayTrajectoryPoint * GetPointC(G4int i) const
virtual G4int GetPointEntries() const
virtual void Merge(const G4Run *)
G4ThreeVector lightDirection
G4Colour backgroundColour
G4double attenuationLength
size_t add(const G4int &key, U *&aHit) const
const G4Colour & GetColour() const
ForcedDrawingStyle GetForcedDrawingStyle() const
G4bool IsForceDrawingStyle() const