- Timestamp:
- Nov 5, 2010, 3:45:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/OpenGL/src/G4OpenGLStoredViewer.cc
r1314 r1340 25 25 // 26 26 // 27 // $Id: G4OpenGLStoredViewer.cc,v 1.2 6 2009/04/08 16:55:44 lgarnierExp $28 // GEANT4 tag $Name: vis-V09-03-06$27 // $Id: G4OpenGLStoredViewer.cc,v 1.29 2010/10/06 10:05:52 allison Exp $ 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // … … 88 88 (lastVP.GetNoOfSides () != fVP.GetNoOfSides ()) || 89 89 (lastVP.IsMarkerNotHidden () != fVP.IsMarkerNotHidden ()) || 90 (lastVP.GetDefaultVisAttributes()->GetColour() != 91 fVP.GetDefaultVisAttributes()->GetColour()) || 92 (lastVP.GetDefaultTextVisAttributes()->GetColour() != 93 fVP.GetDefaultTextVisAttributes()->GetColour()) || 90 94 (lastVP.GetBackgroundColour ()!= fVP.GetBackgroundColour ())|| 91 95 (lastVP.IsPicking () != fVP.IsPicking ()) … … 165 169 glMultMatrixd (oglt.GetGLMatrix ()); 166 170 if (fVP.IsPicking()) glLoadName(to.fPickName); 167 G4Colour& c = to.fColour; 171 const G4Colour& c = to.fColour; 172 const G4Colour& bg = fVP.GetBackgroundColour(); 168 173 G4double bsf = 1.; // Brightness scaling factor. 169 174 if (fFadeFactor > 0. && to.fEndTime < fEndTime) 170 175 bsf = 1. - fFadeFactor * 171 176 ((fEndTime - to.fEndTime) / (fEndTime - fStartTime)); 172 glColor3d(bsf * c.GetRed (), bsf * c.GetGreen (), bsf * c.GetBlue ()); 177 glColor3d 178 (bsf * c.GetRed() + (1. - bsf) * bg.GetRed(), 179 bsf * c.GetGreen() + (1. - bsf) * bg.GetGreen(), 180 bsf * c.GetBlue() + (1. - bsf) * bg.GetBlue()); 173 181 glCallList (to.fDisplayListId); 174 182 glPopMatrix();
Note: See TracChangeset
for help on using the changeset viewer.