ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ViewParameters.cc File Reference
#include "G4ViewParameters.hh"
#include "G4VisManager.hh"
#include "G4VPhysicalVolume.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
#include "G4Polyhedron.hh"
#include <sstream>
#include <cmath>
+ Include dependency graph for G4ViewParameters.cc:

Go to the source code of this file.

Macros

#define INTERPOLATE(param)
 
#define INTERPOLATELOG(param)
 
#define INTERPOLATEUNITVECTOR(vector)
 
#define INTERPOLATEVECTOR(vector)
 
#define INTERPOLATEPOINT(point)
 
#define INTERPOLATECOLOUR(colour)
 
#define CONTINUITY(quantity)
 
#define INTERPOLATEPLANE(plane)
 

Functions

std::ostream & operator<< (std::ostream &os, const G4ViewParameters::DrawingStyle &style)
 
std::ostream & operator<< (std::ostream &os, const G4ViewParameters &v)
 

Macro Definition Documentation

#define CONTINUITY (   quantity)
Value:
continuous = false; \
/* This follows the logic of the INTERPOLATE macro above; see comments therein */ \
if (i == 0) { \
if (v[1].quantity == v[0].quantity) { \
if (n == 1) continuous = true; \
else if (v[2].quantity == v[0].quantity) \
continuous = true; \
} \
} else if (i >= n - 1) { \
if (v[i+1].quantity == v[i].quantity) { \
if (n == 1) continuous = true; \
else if (v[i+1].quantity == v[i-1].quantity) \
continuous = true; \
} \
} else { \
if (v[i-1].quantity == v[i].quantity && \
v[i+1].quantity == v[i].quantity && \
v[i+2].quantity == v[i].quantity) \
continuous = true; \
}

Referenced by G4ViewParameters::CatmullRomCubicSplineInterpolation().

#define INTERPOLATE (   param)
Value:
/* This works out the interpolated param in i'th interval */ \
/* Assumes n >= 1 */ \
if (i == 0) { \
/* First interval */ \
mi = v[1].param - v[0].param; \
/* If there is only one interval, make start and end slopes equal */ \
/* (This results in a linear interpolation) */ \
if (n == 1) mi1 = mi; \
/* else the end slope of the interval takes account of the next waypoint along */ \
else mi1 = 0.5 * (v[2].param - v[0].param); \
} else if (i >= n - 1) { \
/* Similarly for last interval */ \
mi1 = v[i+1].param - v[i].param; \
/* If there is only one interval, make start and end slopes equal */ \
if (n == 1) mi = mi1; \
/* else the start slope of the interval takes account of the previous waypoint */ \
else mi = 0.5 * (v[i+1].param - v[i-1].param); \
} else { \
/* Full Catmull-Rom slopes use previous AND next waypoints */ \
mi = 0.5 * (v[i+1].param - v[i-1].param); \
mi1 = 0.5 * (v[i+2].param - v[i ].param); \
} \
real = h00 * v[i].param + h10 * mi + h01 * v[i+1].param + h11 * mi1;

Referenced by G4ViewParameters::CatmullRomCubicSplineInterpolation().

#define INTERPOLATECOLOUR (   colour)
Value:
INTERPOLATE(colour.GetRed()); red = real; \
INTERPOLATE(colour.GetGreen()); green = real; \
INTERPOLATE(colour.GetBlue()); blue = real; \
INTERPOLATE(colour.GetAlpha()); alpha = real;

Referenced by G4ViewParameters::CatmullRomCubicSplineInterpolation().

#define INTERPOLATELOG (   param)
Value:
if (i == 0) { \
mi = std::log(v[1].param) - std::log(v[0].param); \
if (n == 1) mi1 = mi; \
else mi1 = 0.5 * (std::log(v[2].param) - std::log(v[0].param)); \
} else if (i >= n - 1) { \
mi1 = std::log(v[i+1].param) - std::log(v[i].param); \
if (n == 1) mi = mi1; \
else mi = 0.5 * (std::log(v[i+1].param) - std::log(v[i-1].param)); \
} else { \
mi = 0.5 * (std::log(v[i+1].param) - std::log(v[i-1].param)); \
mi1 = 0.5 * (std::log(v[i+2].param) - std::log(v[i ].param)); \
} \
real = std::exp(h00 * std::log(v[i].param) + h10 * mi + h01 * std::log(v[i+1].param) + h11 * mi1);

Referenced by G4ViewParameters::CatmullRomCubicSplineInterpolation().

#define INTERPOLATEPLANE (   plane)
Value:
INTERPOLATE(plane.a()); a = real; \
INTERPOLATE(plane.b()); b = real; \
INTERPOLATE(plane.c()); c = real; \
INTERPOLATE(plane.d()); d = real;

Referenced by G4ViewParameters::CatmullRomCubicSplineInterpolation().

#define INTERPOLATEPOINT (   point)
Value:
INTERPOLATE(point.x()); x = real; \
INTERPOLATE(point.y()); y = real; \
INTERPOLATE(point.z()); z = real;

Referenced by G4ViewParameters::CatmullRomCubicSplineInterpolation().

#define INTERPOLATEUNITVECTOR (   vector)
Value:
INTERPOLATE(vector.x()); x = real; \
INTERPOLATE(vector.y()); y = real; \
INTERPOLATE(vector.z()); z = real;

Referenced by G4ViewParameters::CatmullRomCubicSplineInterpolation().

#define INTERPOLATEVECTOR (   vector)
Value:
INTERPOLATE(vector.x()); x = real; \
INTERPOLATE(vector.y()); y = real; \
INTERPOLATE(vector.z()); z = real;

Referenced by G4ViewParameters::CatmullRomCubicSplineInterpolation().

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const G4ViewParameters::DrawingStyle style 
)

Definition at line 858 of file G4ViewParameters.cc.

View newest version in sPHENIX GitHub at line 858 of file G4ViewParameters.cc

References G4ViewParameters::cloud, G4ViewParameters::hlhsr, G4ViewParameters::hlr, G4ViewParameters::hsr, and G4ViewParameters::wireframe.

std::ostream& operator<< ( std::ostream &  os,
const G4ViewParameters v 
)

Definition at line 876 of file G4ViewParameters.cc.

View newest version in sPHENIX GitHub at line 876 of file G4ViewParameters.cc

References cm3, G4ViewParameters::constrainUpDirection, G4ViewParameters::fActualLightpointDirection, G4ViewParameters::fAutoRefresh, G4ViewParameters::fAuxEdgeVisible, G4ViewParameters::fBackgroundColour, G4ViewParameters::fCBDAlgorithmNumber, G4ViewParameters::fCBDParameters, G4ViewParameters::fCullCovered, G4ViewParameters::fCulling, G4ViewParameters::fCullInvisible, G4ViewParameters::fCurrentTargetPoint, G4ViewParameters::fCutawayPlanes, G4ViewParameters::fDefaultMarker, G4ViewParameters::fDefaultTextVisAttributes, G4ViewParameters::fDefaultVisAttributes, G4ViewParameters::fDensityCulling, G4ViewParameters::fDisplayHeadTime, G4ViewParameters::fDisplayHeadTimeBlue, G4ViewParameters::fDisplayHeadTimeGreen, G4ViewParameters::fDisplayHeadTimeRed, G4ViewParameters::fDisplayHeadTimeSize, G4ViewParameters::fDisplayHeadTimeX, G4ViewParameters::fDisplayHeadTimeY, G4ViewParameters::fDisplayLightFront, G4ViewParameters::fDisplayLightFrontBlue, G4ViewParameters::fDisplayLightFrontGreen, G4ViewParameters::fDisplayLightFrontRed, G4ViewParameters::fDisplayLightFrontT, G4ViewParameters::fDisplayLightFrontX, G4ViewParameters::fDisplayLightFrontY, G4ViewParameters::fDisplayLightFrontZ, G4ViewParameters::fDolly, G4ViewParameters::fDrawingStyle, G4ViewParameters::fEndTime, G4ViewParameters::fExplodeCentre, G4ViewParameters::fExplodeFactor, G4ViewParameters::fFadeFactor, G4ViewParameters::fFieldHalfAngle, G4ViewParameters::fGeometryMask, G4ViewParameters::fGlobalLineWidthScale, G4ViewParameters::fGlobalMarkerScale, G4ViewParameters::fLightsMoveWithCamera, G4ViewParameters::fMarkerNotHidden, G4ViewParameters::fNoOfSides, G4ViewParameters::fNumberOfCloudPoints, G4ViewParameters::fPicking, G4ViewParameters::freeRotation, G4ViewParameters::fRelativeLightpointDirection, G4ViewParameters::fRotationStyle, G4ViewParameters::fScaleFactor, G4ViewParameters::fSection, G4ViewParameters::fSectionPlane, G4ViewParameters::fStartTime, G4ViewParameters::fUpVector, G4ViewParameters::fViewpointDirection, G4ViewParameters::fVisAttributesModifiers, G4ViewParameters::fVisibleDensity, G4ViewParameters::fWindowSizeHintX, G4ViewParameters::fXGeometryString, G4ViewParameters::fZoomFactor, Acts::UnitConstants::g, G4BestUnit, G4ViewParameters::GetCameraDistance(), G4ViewParameters::GetFarDistance(), G4ViewParameters::GetFrontHalfHeight(), G4ViewParameters::GetNearDistance(), G4ViewParameters::IsCutaway(), mm, ns, radius, right, and v.

+ Here is the call graph for this function: