#include <G4VisAttributes.hh>
Definition at line 65 of file G4VisAttributes.hh.
G4VisAttributes::G4VisAttributes | ( | ) |
Definition at line 58 of file G4VisAttributes.cc.
00058 : 00059 fVisible (true), 00060 fDaughtersInvisible (false), 00061 fColour (G4Colour ()), 00062 fLineStyle (unbroken), 00063 fLineWidth (1.), 00064 fForceDrawingStyle (false), 00065 fForcedStyle (wireframe), 00066 fForceAuxEdgeVisible (false), 00067 fForcedLineSegmentsPerCircle (0), // <=0 means not forced. 00068 fStartTime (-DBL_MAX), 00069 fEndTime (DBL_MAX), 00070 fAttValues (0), 00071 fAttDefs (0) 00072 {}
G4VisAttributes::G4VisAttributes | ( | const G4VisAttributes & | ) |
Definition at line 37 of file G4VisAttributes.cc.
00037 : 00038 fVisible (va.fVisible), 00039 fDaughtersInvisible (va.fDaughtersInvisible), 00040 fColour (va.fColour), 00041 fLineStyle (va.fLineStyle), 00042 fLineWidth (va.fLineWidth), 00043 fForceDrawingStyle (va.fForceDrawingStyle), 00044 fForcedStyle (va.fForcedStyle), 00045 fForceAuxEdgeVisible (va.fForceAuxEdgeVisible), 00046 fForcedLineSegmentsPerCircle (va.fForcedLineSegmentsPerCircle), 00047 fStartTime (va.fStartTime), 00048 fEndTime (va.fEndTime), 00049 // AttValues are created afresh for each object (using the 00050 // CreateAttValues message), but deletion is the responsibility of 00051 // the creator. So just copy pointer. 00052 fAttValues (va.fAttValues), 00053 // AttDefs, if any, belong to the object from which they were obtained 00054 // (with a GetAttDefs message), so just copy pointer. 00055 fAttDefs (va.fAttDefs) 00056 {}
G4VisAttributes::G4VisAttributes | ( | G4bool | visibility | ) |
Definition at line 74 of file G4VisAttributes.cc.
00074 : 00075 fVisible (visibility), 00076 fDaughtersInvisible (false), 00077 fColour (G4Colour ()), 00078 fLineStyle (unbroken), 00079 fLineWidth (1.), 00080 fForceDrawingStyle (false), 00081 fForcedStyle (wireframe), 00082 fForceAuxEdgeVisible (false), 00083 fForcedLineSegmentsPerCircle (0), // <=0 means not forced. 00084 fStartTime (-DBL_MAX), 00085 fEndTime (DBL_MAX), 00086 fAttValues (0), 00087 fAttDefs (0) 00088 {}
G4VisAttributes::G4VisAttributes | ( | const G4Colour & | colour | ) |
Definition at line 90 of file G4VisAttributes.cc.
00090 : 00091 fVisible (true), 00092 fDaughtersInvisible (false), 00093 fColour (colour), 00094 fLineStyle (unbroken), 00095 fLineWidth (1.), 00096 fForceDrawingStyle (false), 00097 fForcedStyle (wireframe), 00098 fForceAuxEdgeVisible (false), 00099 fForcedLineSegmentsPerCircle (0), // <=0 means not forced. 00100 fStartTime (-DBL_MAX), 00101 fEndTime (DBL_MAX), 00102 fAttValues (0), 00103 fAttDefs (0) 00104 {}
Definition at line 106 of file G4VisAttributes.cc.
00107 : 00108 fVisible (visibility), 00109 fDaughtersInvisible (false), 00110 fColour (colour), 00111 fLineStyle (unbroken), 00112 fLineWidth (1.), 00113 fForceDrawingStyle (false), 00114 fForcedStyle (wireframe), 00115 fForceAuxEdgeVisible (false), 00116 fForcedLineSegmentsPerCircle (0), // <=0 means not forced. 00117 fStartTime (-DBL_MAX), 00118 fEndTime (DBL_MAX), 00119 fAttValues (0), 00120 fAttDefs (0) 00121 {}
G4VisAttributes::~G4VisAttributes | ( | ) |
const std::vector< G4AttValue > * G4VisAttributes::CreateAttValues | ( | ) | const |
Definition at line 153 of file G4VisAttributes.cc.
Referenced by G4VSceneHandler::LoadAtts(), and G4XXXStoredSceneHandler::PreAddSolid().
00153 { 00154 // Create an expendable copy on the heap... 00155 return new std::vector<G4AttValue>(*fAttValues); 00156 }
Definition at line 148 of file G4VisAttributes.icc.
Referenced by G4VSceneHandler::LoadAtts(), and G4XXXStoredSceneHandler::PreAddSolid().
const G4Color & G4VisAttributes::GetColor | ( | ) | const [inline] |
Definition at line 108 of file G4VisAttributes.icc.
Referenced by G4GMocrenFileSceneHandler::AddPrimitive().
const G4Colour & G4VisAttributes::GetColour | ( | ) | const [inline] |
Definition at line 106 of file G4VisAttributes.icc.
Referenced by G4TheRayTracer::Attenuate(), G4XXXStoredViewer::CompareForKernelVisit(), G4XXXSGViewer::CompareForKernelVisit(), G4PhysicalVolumeModel::DescribeAndDescend(), G4TheRayTracer::GetSurfaceColour(), operator<<(), G4VisCommandsViewerSet::SetNewValue(), G4ViewParameters::TouchableCommands(), and G4RTSteppingAction::UserSteppingAction().
G4double G4VisAttributes::GetEndTime | ( | ) | const [inline] |
G4VisAttributes::ForcedDrawingStyle G4VisAttributes::GetForcedDrawingStyle | ( | ) | const [inline] |
Definition at line 123 of file G4VisAttributes.icc.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), operator<<(), G4ViewParameters::TouchableCommands(), G4RTSteppingAction::UserSteppingAction(), and G4TheRayTracer::ValidColour().
G4int G4VisAttributes::GetForcedLineSegmentsPerCircle | ( | ) | const [inline] |
Definition at line 135 of file G4VisAttributes.icc.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), G4PhysicalVolumeModel::DescribeSolid(), G4VSceneHandler::GetNoOfSides(), operator<<(), and G4ViewParameters::TouchableCommands().
const G4VisAttributes & G4VisAttributes::GetInvisible | ( | ) | [inline, static] |
Definition at line 32 of file G4VisAttributes.icc.
References Invisible.
Referenced by G4FlavoredParallelWorldModel::G4FlavoredParallelWorldModel().
00032 { 00033 return Invisible; 00034 }
G4VisAttributes::LineStyle G4VisAttributes::GetLineStyle | ( | ) | const [inline] |
Definition at line 110 of file G4VisAttributes.icc.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), operator<<(), and G4ViewParameters::TouchableCommands().
G4double G4VisAttributes::GetLineWidth | ( | ) | const [inline] |
Definition at line 114 of file G4VisAttributes.icc.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), G4VSceneHandler::GetLineWidth(), operator<<(), and G4ViewParameters::TouchableCommands().
G4double G4VisAttributes::GetStartTime | ( | ) | const [inline] |
G4bool G4VisAttributes::IsDaughtersInvisible | ( | ) | const [inline] |
Definition at line 102 of file G4VisAttributes.icc.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), operator<<(), and G4ViewParameters::TouchableCommands().
G4bool G4VisAttributes::IsForceAuxEdgeVisible | ( | ) | const [inline] |
Definition at line 127 of file G4VisAttributes.icc.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), operator<<(), and G4ViewParameters::TouchableCommands().
G4bool G4VisAttributes::IsForceDrawingStyle | ( | ) | const [inline] |
Definition at line 118 of file G4VisAttributes.icc.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), operator<<(), G4ViewParameters::TouchableCommands(), G4RTSteppingAction::UserSteppingAction(), and G4TheRayTracer::ValidColour().
G4bool G4VisAttributes::IsForceLineSegmentsPerCircle | ( | ) | const [inline] |
Definition at line 131 of file G4VisAttributes.icc.
Referenced by G4PhysicalVolumeModel::DescribeSolid(), and G4VSceneHandler::GetNoOfSides().
G4bool G4VisAttributes::IsVisible | ( | ) | const [inline] |
Definition at line 100 of file G4VisAttributes.icc.
Referenced by G4HepRepFileSceneHandler::AddPrimitive(), G4HepRepFileSceneHandler::AddSolid(), G4PhysicalVolumeModel::DescribeAndDescend(), operator<<(), G4ViewParameters::TouchableCommands(), G4RTSteppingAction::UserSteppingAction(), and G4TheRayTracer::ValidColour().
G4bool G4VisAttributes::operator!= | ( | const G4VisAttributes & | a | ) | const |
Definition at line 229 of file G4VisAttributes.cc.
References fAttDefs, fAttValues, fColour, fDaughtersInvisible, fEndTime, fForceAuxEdgeVisible, fForcedLineSegmentsPerCircle, fForceDrawingStyle, fForcedStyle, fLineStyle, fLineWidth, fStartTime, and fVisible.
Referenced by operator==().
00229 { 00230 00231 if ( 00232 (fVisible != a.fVisible) || 00233 (fDaughtersInvisible != a.fDaughtersInvisible) || 00234 (fColour != a.fColour) || 00235 (fLineStyle != a.fLineStyle) || 00236 (fLineWidth != a.fLineWidth) || 00237 (fForceDrawingStyle != a.fForceDrawingStyle) || 00238 (fForceAuxEdgeVisible!= a.fForceAuxEdgeVisible)|| 00239 (fForcedLineSegmentsPerCircle != a.fForcedLineSegmentsPerCircle) || 00240 (fStartTime != a.fStartTime) || 00241 (fEndTime != a.fEndTime) || 00242 (fAttValues != a.fAttValues) || 00243 (fAttDefs != a.fAttDefs) 00244 ) 00245 return true; 00246 00247 if (fForceDrawingStyle) { 00248 if (fForcedStyle != a.fForcedStyle) return true; 00249 } 00250 00251 return false; 00252 }
G4VisAttributes & G4VisAttributes::operator= | ( | const G4VisAttributes & | ) |
Definition at line 127 of file G4VisAttributes.cc.
References fAttDefs, fAttValues, fColour, fDaughtersInvisible, fEndTime, fForceAuxEdgeVisible, fForcedLineSegmentsPerCircle, fForceDrawingStyle, fForcedStyle, fLineStyle, fLineWidth, fStartTime, and fVisible.
00128 { 00129 if (&rhs == this) return *this; 00130 fVisible = rhs.fVisible; 00131 fDaughtersInvisible = rhs.fDaughtersInvisible; 00132 fColour = rhs.fColour; 00133 fLineStyle = rhs.fLineStyle; 00134 fLineWidth = rhs.fLineWidth; 00135 fForceDrawingStyle = rhs.fForceDrawingStyle; 00136 fForcedStyle = rhs.fForcedStyle; 00137 fForceAuxEdgeVisible = rhs.fForceAuxEdgeVisible; 00138 fForcedLineSegmentsPerCircle = rhs.fForcedLineSegmentsPerCircle; 00139 fStartTime = rhs.fStartTime; 00140 fEndTime = rhs.fEndTime; 00141 // AttValues are created afresh for each object (using the 00142 // CreateAttValues message), but deletion is the responsibility of 00143 // the creator. So just copy pointer. 00144 fAttValues = rhs.fAttValues; 00145 // AttDefs, if any, belong to the object from which they were obtained 00146 // (with a GetAttDefs message), so just copy pointer. 00147 fAttDefs = rhs.fAttDefs; 00148 return *this; 00149 }
G4bool G4VisAttributes::operator== | ( | const G4VisAttributes & | a | ) | const |
Definition at line 254 of file G4VisAttributes.cc.
References operator!=().
00254 { 00255 return !(G4VisAttributes::operator != (a)); 00256 }
void G4VisAttributes::SetAttValues | ( | const std::vector< G4AttValue > * | ) | [inline] |
void G4VisAttributes::SetColor | ( | G4double | red, | |
G4double | green, | |||
G4double | blue, | |||
G4double | alpha = 1. | |||
) | [inline] |
void G4VisAttributes::SetColor | ( | const G4Color & | ) | [inline] |
void G4VisAttributes::SetColour | ( | G4double | red, | |
G4double | green, | |||
G4double | blue, | |||
G4double | alpha = 1. | |||
) | [inline] |
void G4VisAttributes::SetColour | ( | const G4Colour & | ) | [inline] |
Definition at line 42 of file G4VisAttributes.icc.
Referenced by G4tgbVolume::ConstructG4LogVol(), G4PhysicalVolumeModel::DescribeAndDescend(), G4PhysicalVolumeModel::DescribeSolid(), G4ScoringCylinder::Draw(), G4ScoringBox::Draw(), G4ScoringCylinder::DrawColumn(), G4ScoringBox::DrawColumn(), G4ArrowModel::G4ArrowModel(), G4DrawVoxels::G4DrawVoxels(), G4VisCommandGeometrySetColourFunction::operator()(), G4ViewParameters::SetDefaultColour(), G4ViewParameters::SetDefaultTextColour(), G4VisCommandsViewerSet::SetNewValue(), and G4VisCommandsTouchableSet::SetNewValue().
void G4VisAttributes::SetDaughtersInvisible | ( | G4bool | ) | [inline] |
Definition at line 38 of file G4VisAttributes.icc.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), G4VisCommandGeometrySetDaughtersInvisibleFunction::operator()(), and G4VisCommandsTouchableSet::SetNewValue().
void G4VisAttributes::SetEndTime | ( | G4double | ) | [inline] |
void G4VisAttributes::SetForceAuxEdgeVisible | ( | G4bool | ) | [inline] |
Definition at line 78 of file G4VisAttributes.icc.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), G4ScoringCylinder::Draw(), G4ScoringBox::Draw(), G4ScoringCylinder::DrawColumn(), G4ScoringBox::DrawColumn(), G4VisCommandGeometrySetForceAuxEdgeVisibleFunction::operator()(), and G4VisCommandsTouchableSet::SetNewValue().
void G4VisAttributes::SetForceLineSegmentsPerCircle | ( | G4int | nSegments | ) |
Definition at line 158 of file G4VisAttributes.cc.
References G4cout, and G4endl.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction::operator()(), and G4VisCommandsTouchableSet::SetNewValue().
00158 { 00159 const G4int nSegmentsMin = 12; 00160 if (nSegments > 0 && nSegments < nSegmentsMin) { 00161 nSegments = nSegmentsMin; 00162 G4cout << 00163 "G4VisAttributes::SetForcedLineSegmentsPerCircle: attempt to set the" 00164 "\nnumber of line segements per circle < " << nSegmentsMin 00165 << "; forced to " << nSegments << G4endl; 00166 } 00167 fForcedLineSegmentsPerCircle = nSegments; 00168 }
void G4VisAttributes::SetForceSolid | ( | G4bool | ) | [inline] |
Definition at line 73 of file G4VisAttributes.icc.
References solid.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), G4ScoringCylinder::Draw(), G4ScoringBox::Draw(), G4ScoringCylinder::DrawColumn(), G4ScoringBox::DrawColumn(), G4ArrowModel::G4ArrowModel(), G4VisCommandGeometrySetForceSolidFunction::operator()(), G4VisCommandsTouchableSet::SetNewValue(), and G4VisCommandSceneAddLogo::SetNewValue().
00073 { 00074 fForceDrawingStyle = force; 00075 fForcedStyle = G4VisAttributes::solid; 00076 }
void G4VisAttributes::SetForceWireframe | ( | G4bool | ) | [inline] |
Definition at line 68 of file G4VisAttributes.icc.
References wireframe.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), G4LogicalVolumeModel::DescribeSolid(), G4VisCommandGeometrySetForceWireframeFunction::operator()(), and G4VisCommandsTouchableSet::SetNewValue().
00068 { 00069 fForceDrawingStyle = force; 00070 fForcedStyle = G4VisAttributes::wireframe; 00071 }
void G4VisAttributes::SetLineStyle | ( | LineStyle | ) | [inline] |
Definition at line 60 of file G4VisAttributes.icc.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), G4VisCommandGeometrySetLineStyleFunction::operator()(), and G4VisCommandsTouchableSet::SetNewValue().
void G4VisAttributes::SetLineWidth | ( | G4double | ) | [inline] |
Definition at line 64 of file G4VisAttributes.icc.
Referenced by G4PhysicalVolumeModel::DescribeAndDescend(), G4VisCommandGeometrySetLineWidthFunction::operator()(), and G4VisCommandsTouchableSet::SetNewValue().
void G4VisAttributes::SetStartTime | ( | G4double | ) | [inline] |
void G4VisAttributes::SetVisibility | ( | G4bool | ) | [inline] |
Definition at line 36 of file G4VisAttributes.icc.
Referenced by G4tgbVolume::ConstructG4LogVol(), G4PhysicalVolumeModel::DescribeAndDescend(), G4VisCommandGeometrySetVisibilityFunction::operator()(), and G4VisCommandsTouchableSet::SetNewValue().
std::ostream& operator<< | ( | std::ostream & | os, | |
const G4VisAttributes & | a | |||
) | [friend] |
Definition at line 170 of file G4VisAttributes.cc.
00170 { 00171 00172 os << "G4VisAttributes: "; 00173 if (&a){ 00174 if (!a.fVisible) os << "in"; 00175 os << "visible, daughters "; 00176 if (a.fDaughtersInvisible) os << "in"; 00177 os << "visible, colour: " << a.fColour; 00178 os << "\n linestyle: "; 00179 switch (a.fLineStyle) { 00180 case G4VisAttributes::unbroken: 00181 os << "solid"; break; 00182 case G4VisAttributes::dashed: 00183 os << "dashed"; break; 00184 case G4VisAttributes::dotted: os << "dotted"; break; 00185 default: os << "unrecognised"; break; 00186 } 00187 os << ", line width: " << a.fLineWidth; 00188 os << "\n drawing style: "; 00189 if (a.fForceDrawingStyle) { 00190 os << "forced to: "; 00191 switch (a.fForcedStyle) { 00192 case G4VisAttributes::wireframe: 00193 os << "wireframe"; break; 00194 case G4VisAttributes::solid: 00195 os << "solid"; break; 00196 default: os << "unrecognised"; break; 00197 } 00198 } 00199 else { 00200 os << "not forced"; 00201 } 00202 os << ", auxiliary edge visibility: "; 00203 if (!a.fForceAuxEdgeVisible) { 00204 os << "not "; 00205 } 00206 os << "forced"; 00207 os << "\n line segments per circle: "; 00208 if (a.fForcedLineSegmentsPerCircle > 0) { 00209 os << "forced to " << a.fForcedLineSegmentsPerCircle; 00210 } else { 00211 os << "not forced."; 00212 } 00213 os << "\n time range: (" << a.fStartTime << ',' << a.fEndTime << ')'; 00214 os << "\n G4AttValue pointer is "; 00215 if (a.fAttValues) { 00216 os << "non-"; 00217 } 00218 os << "zero"; 00219 os << ", G4AttDef pointer is "; 00220 if (a.fAttDefs) { 00221 os << "non-"; 00222 } 00223 os << "zero"; 00224 } 00225 else os << " zero G4VisAttributes pointer"; 00226 return os; 00227 }
const G4VisAttributes G4VisAttributes::Invisible = G4VisAttributes (false) [static] |
Definition at line 82 of file G4VisAttributes.hh.
Referenced by G4BuildGeom(), GetInvisible(), and G4GDMLReadStructure::GetWorldVolume().