48fG4OpenGLStoredSceneHandler (sceneHandler),
 
  151#define CONVENIENT_DOUBLE_ALIAS(q) const G4double& f##q = fVP.Get##q(); 
  152#define CONVENIENT_BOOL_ALIAS(q) const G4bool& f##q = fVP.Is##q(); 
  175  const size_t nCutaways = cutawayUnion? cutaways.size(): 1;
 
  177  G4bool secondPassForTransparencyRequested = 
false;
 
  178  G4bool thirdPassForNonHiddenMarkersRequested = 
false;
 
  180  glEnable (GL_DEPTH_TEST); glDepthFunc (GL_LEQUAL);
 
  182    for (
size_t iCutaway = 0; iCutaway < nCutaways; ++iCutaway) {
 
  186        a[0] = cutaways[iCutaway].a();
 
  187        a[1] = cutaways[iCutaway].b();
 
  188        a[2] = cutaways[iCutaway].c();
 
  189        a[3] = cutaways[iCutaway].d();
 
  190        glClipPlane (GL_CLIP_PLANE2, a);
 
  191        glEnable (GL_CLIP_PLANE2);
 
  206              secondPassForTransparencyRequested = 
true;
 
  210              thirdPassForNonHiddenMarkersRequested = 
true;
 
  213          } 
else if (iPass == 2) {  
 
  214            if (!isTransparent) {
 
  230              glDisable (GL_DEPTH_TEST);
 
  235              glEnable (GL_DEPTH_TEST); glDepthFunc (GL_LEQUAL);
 
  241              glMatrixMode (GL_PROJECTION);
 
  245              glMatrixMode (GL_MODELVIEW);
 
  262              glMatrixMode (GL_PROJECTION);
 
  264              glMatrixMode (GL_MODELVIEW);
 
  289              secondPassForTransparencyRequested = 
true;
 
  293              thirdPassForNonHiddenMarkersRequested = 
true;
 
  296          } 
else if (iPass == 2) {  
 
  297            if (!isTransparent) {
 
  307              glDisable (GL_DEPTH_TEST);
 
  312              glEnable (GL_DEPTH_TEST); glDepthFunc (GL_LEQUAL);
 
  320                glMatrixMode (GL_PROJECTION);
 
  324                glMatrixMode (GL_MODELVIEW);
 
  333                glMatrixMode (GL_PROJECTION);
 
  335                glMatrixMode (GL_MODELVIEW);
 
  349              if (fFadeFactor > 0. && to.
fEndTime < fEndTime) {
 
  352                ((fEndTime - to.
fEndTime) / (fEndTime - fStartTime));
 
  356                  (bsf * cc.
GetRed() + (1. - bsf) * bg.GetRed(),
 
  357                   bsf * cc.
GetGreen() + (1. - bsf) * bg.GetGreen(),
 
  358                   bsf * cc.
GetBlue() + (1. - bsf) * bg.GetBlue(),
 
  359                   bsf * cc.
GetAlpha() + (1. - bsf) * bg.GetAlpha());
 
  362                  (bsf * cc.
GetRed() + (1. - bsf) * bg.GetRed(),
 
  363                   bsf * cc.
GetGreen() + (1. - bsf) * bg.GetGreen(),
 
  364                   bsf * cc.
GetBlue() + (1. - bsf) * bg.GetBlue());
 
  385      if (cutawayUnion) glDisable (GL_CLIP_PLANE2);
 
  388    if (iPass == 2) secondPassForTransparencyRequested = 
false;  
 
  389    if (iPass == 3) thirdPassForNonHiddenMarkersRequested = 
false;  
 
  391    if (secondPassForTransparencyRequested) iPass = 2;
 
  392    else if (thirdPassForNonHiddenMarkersRequested) iPass = 3;
 
  399    glMatrixMode (GL_PROJECTION);
 
  403    glMatrixMode (GL_MODELVIEW);
 
  407                        G4Point3D(fDisplayHeadTimeX, fDisplayHeadTimeY, 0.));
 
  410                             (fDisplayHeadTimeRed,
 
  411                              fDisplayHeadTimeGreen,
 
  412                              fDisplayHeadTimeBlue));
 
  415    glMatrixMode (GL_PROJECTION);
 
  417    glMatrixMode (GL_MODELVIEW);
 
  423    G4double lightFrontRadius = (fEndTime - fDisplayLightFrontT) * 
c_light;
 
  424    if (lightFrontRadius > 0.) {
 
  425      G4Point3D lightFrontCentre(fDisplayLightFrontX, fDisplayLightFrontY, fDisplayLightFrontZ);
 
  426      G4Point3D circleCentre = lightFrontCentre;
 
  427      G4double circleRadius = lightFrontRadius;
 
  433        if(sceneRadius <= 0.) sceneRadius = 1.;
 
  436        G4Vector3D lightFrontToCameraDirection = cameraPosition - lightFrontCentre;
 
  437        G4double lightFrontCentreDistance = lightFrontToCameraDirection.
mag();
 
  446        if (lightFrontToCameraDirection * 
fVP.
GetViewpointDirection() > 0. && lightFrontRadius < lightFrontCentreDistance) {
 
  448          G4double sineHorizonAngle = lightFrontRadius / lightFrontCentreDistance;
 
  449          circleCentre = lightFrontCentre + (lightFrontRadius * sineHorizonAngle) * lightFrontToCameraDirection.
unit();
 
  450          circleRadius = lightFrontRadius * std::sqrt(1. - std::pow(sineHorizonAngle, 2));
 
  461      if (circleRadius > 0.) {
 
  465         (fDisplayLightFrontRed,
 
  466          fDisplayLightFrontGreen,
 
  467          fDisplayLightFrontBlue));
 
#define CONVENIENT_BOOL_ALIAS(q)
#define CONVENIENT_DOUBLE_ALIAS(q)
HepGeom::Point3D< G4double > G4Point3D
std::vector< G4Plane3D > G4Planes
G4double GetAlpha() const
G4double GetGreen() const
std::vector< PO > fPOList
static G4bool fMemoryForDisplayLists
std::vector< TO > fTOList
virtual G4bool CompareForKernelVisit(G4ViewParameters &)
virtual G4bool TOSelected(size_t)
G4OpenGLStoredViewer(G4OpenGLStoredSceneHandler &scene)
virtual G4bool POSelected(size_t)
virtual ~G4OpenGLStoredViewer()
void KernelVisitDecision()
virtual void DisplayTimePOColourModification(G4Colour &, size_t)
void AddPrimitiveForASingleFrame(const G4Text &text)
G4OpenGLStoredSceneHandler & fG4OpenGLStoredSceneHandler
G4bool transparency_enabled
void g4GlOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near, GLdouble far)
const G4VisExtent & GetExtent() const
const G4Point3D & GetStandardTargetPoint() const
void SetWorldRadius(G4double)
void SetScreenSize(G4double)
G4Scene * GetScene() const
G4VSceneHandler & fSceneHandler
G4ViewParameters fDefaultVP
const std::vector< G4ModelingParameters::VisAttributesModifier > & GetVisAttributesModifiers() const
G4int GetNoOfSides() const
G4bool IsSpecialMeshRendering() const
CutawayMode GetCutawayMode() const
G4double GetCameraDistance(G4double radius) const
G4double GetExplodeFactor() const
G4int GetNumberOfCloudPoints() const
G4bool IsMarkerNotHidden() const
G4double GetGlobalLineWidthScale() const
const G4Colour & GetBackgroundColour() const
const G4Vector3D & GetViewpointDirection() const
const G4Point3D & GetCurrentTargetPoint() const
G4double GetFieldHalfAngle() const
const G4VisAttributes * GetDefaultTextVisAttributes() const
const std::vector< G4double > & GetCBDParameters() const
G4int GetCBDAlgorithmNumber() const
const std::vector< G4ModelingParameters::PVNameCopyNo > & GetSpecialMeshVolumes() const
G4double GetGlobalMarkerScale() const
G4bool IsCullingInvisible() const
const G4VisAttributes * GetDefaultVisAttributes() const
const G4Planes & GetCutawayPlanes() const
G4bool IsDensityCulling() const
G4double GetVisibleDensity() const
G4bool IsCullingCovered() const
const G4Plane3D & GetSectionPlane() const
DrawingStyle GetDrawingStyle() const
G4bool IsAuxEdgeVisible() const
const G4Colour & GetColour() const
static constexpr G4double fVeryLongTime
G4double GetExtentRadius() const
void SetVisAttributes(const G4VisAttributes *)
BasicVector3D< T > unit() const
G4TextPlus * fpG4TextPlus
G4TextPlus * fpG4TextPlus