[531] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // |
---|
[593] | 27 | // $Id: G4ViewParameters.icc,v 1.16 2007/04/03 13:33:16 allison Exp $ |
---|
[850] | 28 | // GEANT4 tag $Name: HEAD $ |
---|
[531] | 29 | // |
---|
| 30 | // |
---|
| 31 | // John Allison 20th October 1996 |
---|
| 32 | // View parameters and options. |
---|
| 33 | |
---|
| 34 | inline G4ViewParameters::DrawingStyle |
---|
| 35 | G4ViewParameters::GetDrawingStyle () const { |
---|
| 36 | return fDrawingStyle; |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | inline G4bool G4ViewParameters::IsAuxEdgeVisible () const { |
---|
| 40 | return fAuxEdgeVisible; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | inline G4ViewParameters::RepStyle G4ViewParameters::GetRepStyle () const { |
---|
| 44 | return fRepStyle; |
---|
| 45 | } |
---|
| 46 | |
---|
| 47 | inline G4bool G4ViewParameters::IsCulling () const { |
---|
| 48 | return fCulling; |
---|
| 49 | } |
---|
| 50 | |
---|
| 51 | inline G4bool G4ViewParameters::IsCullingInvisible () const { |
---|
| 52 | return fCullInvisible; |
---|
| 53 | } |
---|
| 54 | |
---|
| 55 | inline G4bool G4ViewParameters::IsDensityCulling () const { |
---|
| 56 | return fDensityCulling; |
---|
| 57 | } |
---|
| 58 | |
---|
| 59 | inline G4double G4ViewParameters::GetVisibleDensity () const { |
---|
| 60 | return fVisibleDensity; |
---|
| 61 | } |
---|
| 62 | |
---|
| 63 | inline G4bool G4ViewParameters::IsCullingCovered () const { |
---|
| 64 | return fCullCovered; |
---|
| 65 | } |
---|
| 66 | |
---|
| 67 | inline G4bool G4ViewParameters::IsSection () const { |
---|
| 68 | return fSection; |
---|
| 69 | } |
---|
| 70 | |
---|
| 71 | inline const G4Plane3D& G4ViewParameters::GetSectionPlane () const { |
---|
| 72 | return fSectionPlane; |
---|
| 73 | } |
---|
| 74 | |
---|
| 75 | inline G4bool G4ViewParameters::IsCutaway () const { |
---|
| 76 | return fCutawayPlanes.size() > 0; |
---|
| 77 | } |
---|
| 78 | |
---|
| 79 | inline G4ViewParameters::CutawayMode G4ViewParameters::GetCutawayMode () const |
---|
| 80 | { return fCutawayMode;} |
---|
| 81 | |
---|
| 82 | inline const G4Planes& G4ViewParameters::GetCutawayPlanes () const { |
---|
| 83 | return fCutawayPlanes; |
---|
| 84 | } |
---|
| 85 | |
---|
| 86 | inline G4bool G4ViewParameters::IsExplode () const { |
---|
| 87 | return fExplodeFactor > 1.; |
---|
| 88 | } |
---|
| 89 | |
---|
| 90 | inline G4double G4ViewParameters::GetExplodeFactor () const { |
---|
| 91 | return fExplodeFactor; |
---|
| 92 | } |
---|
| 93 | |
---|
| 94 | inline const G4Point3D& G4ViewParameters::GetExplodeCentre () const { |
---|
| 95 | return fExplodeCentre; |
---|
| 96 | } |
---|
| 97 | |
---|
| 98 | inline G4int G4ViewParameters::GetNoOfSides () const { |
---|
| 99 | return fNoOfSides; |
---|
| 100 | } |
---|
| 101 | |
---|
| 102 | inline const G4Vector3D& G4ViewParameters::GetViewpointDirection () const { |
---|
| 103 | return fViewpointDirection; |
---|
| 104 | } |
---|
| 105 | |
---|
| 106 | inline const G4Vector3D& G4ViewParameters::GetUpVector () const { |
---|
| 107 | return fUpVector; |
---|
| 108 | } |
---|
| 109 | |
---|
| 110 | inline G4double G4ViewParameters::GetFieldHalfAngle () const { |
---|
| 111 | return fFieldHalfAngle; |
---|
| 112 | } |
---|
| 113 | |
---|
| 114 | inline G4double G4ViewParameters::GetZoomFactor () const { |
---|
| 115 | return fZoomFactor; |
---|
| 116 | } |
---|
| 117 | |
---|
| 118 | inline const G4Vector3D& G4ViewParameters::GetScaleFactor () const { |
---|
| 119 | return fScaleFactor; |
---|
| 120 | } |
---|
| 121 | |
---|
| 122 | inline const G4Point3D& G4ViewParameters::GetCurrentTargetPoint () const { |
---|
| 123 | return fCurrentTargetPoint; |
---|
| 124 | } |
---|
| 125 | |
---|
| 126 | inline G4double G4ViewParameters::GetDolly () const { |
---|
| 127 | return fDolly; |
---|
| 128 | } |
---|
| 129 | |
---|
| 130 | inline const G4Vector3D& G4ViewParameters::GetLightpointDirection () const { |
---|
| 131 | return fRelativeLightpointDirection; |
---|
| 132 | } |
---|
| 133 | |
---|
| 134 | inline G4bool G4ViewParameters::GetLightsMoveWithCamera () const { |
---|
| 135 | return fLightsMoveWithCamera; |
---|
| 136 | } |
---|
| 137 | |
---|
| 138 | inline const G4VisAttributes* |
---|
| 139 | G4ViewParameters::GetDefaultVisAttributes () const { |
---|
| 140 | return &fDefaultVisAttributes; |
---|
| 141 | } |
---|
| 142 | |
---|
| 143 | inline const G4VisAttributes* |
---|
| 144 | G4ViewParameters::GetDefaultTextVisAttributes () const { |
---|
| 145 | return &fDefaultTextVisAttributes; |
---|
| 146 | } |
---|
| 147 | |
---|
| 148 | inline const G4VMarker& G4ViewParameters::GetDefaultMarker () const { |
---|
| 149 | return fDefaultMarker; |
---|
| 150 | } |
---|
| 151 | |
---|
| 152 | inline G4double G4ViewParameters::GetGlobalMarkerScale () const { |
---|
| 153 | return fGlobalMarkerScale; |
---|
| 154 | } |
---|
| 155 | |
---|
| 156 | inline G4double G4ViewParameters::GetGlobalLineWidthScale () const { |
---|
| 157 | return fGlobalLineWidthScale; |
---|
| 158 | } |
---|
| 159 | |
---|
| 160 | inline G4bool G4ViewParameters::IsMarkerNotHidden () const { |
---|
| 161 | return fMarkerNotHidden; |
---|
| 162 | } |
---|
| 163 | |
---|
| 164 | inline G4int G4ViewParameters::GetWindowSizeHintX () const { |
---|
| 165 | return fWindowSizeHintX; |
---|
| 166 | } |
---|
| 167 | |
---|
| 168 | inline G4int G4ViewParameters::GetWindowSizeHintY () const { |
---|
| 169 | return fWindowSizeHintY; |
---|
| 170 | } |
---|
| 171 | |
---|
[893] | 172 | inline G4int G4ViewParameters::GetWindowLocationHintX () const { |
---|
| 173 | #ifdef G4DEBUG |
---|
| 174 | printf("G4ViewParameters::GetWindowLocationHintX () :: %d\n",fWindowLocationHintX); |
---|
| 175 | #endif |
---|
| 176 | return fWindowLocationHintX; |
---|
| 177 | } |
---|
| 178 | |
---|
| 179 | inline G4int G4ViewParameters::GetWindowLocationHintY () const { |
---|
| 180 | #ifdef G4DEBUG |
---|
| 181 | printf("G4ViewParameters::GetWindowLocationHintY () :: %d\n",fWindowLocationHintY); |
---|
| 182 | #endif |
---|
| 183 | return fWindowLocationHintY; |
---|
| 184 | } |
---|
| 185 | |
---|
[531] | 186 | inline const G4String& G4ViewParameters::GetXGeometryString () const { |
---|
| 187 | return fXGeometryString; |
---|
| 188 | } |
---|
| 189 | |
---|
| 190 | inline G4bool G4ViewParameters::IsAutoRefresh () const { |
---|
| 191 | return fAutoRefresh; |
---|
| 192 | } |
---|
| 193 | |
---|
| 194 | inline const G4Colour& G4ViewParameters::GetBackgroundColour () const { |
---|
| 195 | return fBackgroundColour; |
---|
| 196 | } |
---|
| 197 | |
---|
[593] | 198 | inline G4bool G4ViewParameters::IsPicking () const { |
---|
| 199 | return fPicking; |
---|
| 200 | } |
---|
| 201 | |
---|
[531] | 202 | inline void |
---|
| 203 | G4ViewParameters::SetDrawingStyle (G4ViewParameters::DrawingStyle style) { |
---|
| 204 | fDrawingStyle = style; |
---|
| 205 | } |
---|
| 206 | |
---|
| 207 | inline void G4ViewParameters::SetAuxEdgeVisible (G4bool vis) { |
---|
| 208 | fAuxEdgeVisible = vis; |
---|
| 209 | } |
---|
| 210 | |
---|
| 211 | inline void |
---|
| 212 | G4ViewParameters::SetRepStyle (G4ViewParameters::RepStyle style) { |
---|
| 213 | fRepStyle = style; |
---|
| 214 | } |
---|
| 215 | |
---|
| 216 | inline void G4ViewParameters::SetCulling (G4bool value) { |
---|
| 217 | fCulling = value; |
---|
| 218 | } |
---|
| 219 | |
---|
| 220 | inline void G4ViewParameters::SetCullingInvisible (G4bool value) { |
---|
| 221 | fCullInvisible = value; |
---|
| 222 | } |
---|
| 223 | |
---|
| 224 | inline void G4ViewParameters::SetDensityCulling (G4bool value) { |
---|
| 225 | fDensityCulling = value; |
---|
| 226 | } |
---|
| 227 | |
---|
| 228 | inline void G4ViewParameters::SetCullingCovered (G4bool value) { |
---|
| 229 | fCullCovered = value; |
---|
| 230 | } |
---|
| 231 | |
---|
| 232 | inline void G4ViewParameters::SetSectionPlane (const G4Plane3D& sectionPlane) { |
---|
| 233 | fSection = true; |
---|
| 234 | fSectionPlane = sectionPlane; |
---|
| 235 | } |
---|
| 236 | |
---|
| 237 | inline void G4ViewParameters::UnsetSectionPlane () { |
---|
| 238 | fSection = false; |
---|
| 239 | } |
---|
| 240 | |
---|
| 241 | inline void G4ViewParameters::SetCutawayMode |
---|
| 242 | (G4ViewParameters::CutawayMode cutawayMode) { |
---|
| 243 | fCutawayMode = cutawayMode; |
---|
| 244 | } |
---|
| 245 | |
---|
| 246 | inline void G4ViewParameters::ClearCutawayPlanes () { |
---|
| 247 | fCutawayPlanes.clear (); |
---|
| 248 | } |
---|
| 249 | |
---|
| 250 | inline void G4ViewParameters::SetViewpointDirection |
---|
| 251 | (const G4Vector3D& viewpointDirection) { |
---|
| 252 | SetViewAndLights (viewpointDirection); |
---|
| 253 | } |
---|
| 254 | |
---|
| 255 | inline void G4ViewParameters::SetExplodeFactor (G4double explodeFactor) { |
---|
| 256 | fExplodeFactor = explodeFactor; |
---|
| 257 | if (fExplodeFactor < 1.) fExplodeFactor = 1.; |
---|
| 258 | } |
---|
| 259 | |
---|
| 260 | inline void G4ViewParameters::UnsetExplodeFactor () { |
---|
| 261 | fExplodeFactor = 1.; |
---|
| 262 | } |
---|
| 263 | |
---|
| 264 | inline void G4ViewParameters::SetExplodeCentre |
---|
| 265 | (const G4Point3D& explodeCentre) { |
---|
| 266 | fExplodeCentre = explodeCentre; |
---|
| 267 | } |
---|
| 268 | inline void G4ViewParameters::SetUpVector (const G4Vector3D& upVector) { |
---|
| 269 | fUpVector = upVector; |
---|
| 270 | } |
---|
| 271 | |
---|
| 272 | inline void G4ViewParameters::SetFieldHalfAngle (G4double fieldHalfAngle) { |
---|
| 273 | fFieldHalfAngle = fieldHalfAngle; |
---|
| 274 | } |
---|
| 275 | |
---|
| 276 | inline void G4ViewParameters::SetZoomFactor (G4double zoomFactor) { |
---|
| 277 | fZoomFactor = zoomFactor; |
---|
| 278 | } |
---|
| 279 | |
---|
| 280 | inline void |
---|
| 281 | G4ViewParameters::MultiplyZoomFactor (G4double zoomFactorMultiplier) { |
---|
| 282 | fZoomFactor *= zoomFactorMultiplier; |
---|
| 283 | } |
---|
| 284 | |
---|
| 285 | inline void G4ViewParameters::SetScaleFactor (const G4Vector3D& scaleFactor) { |
---|
| 286 | fScaleFactor = scaleFactor; |
---|
| 287 | } |
---|
| 288 | |
---|
| 289 | inline void |
---|
| 290 | G4ViewParameters::SetCurrentTargetPoint (const G4Point3D& currentTargetPoint) { |
---|
| 291 | fCurrentTargetPoint = currentTargetPoint; |
---|
| 292 | } |
---|
| 293 | |
---|
| 294 | inline void G4ViewParameters::SetDolly (G4double dolly) { |
---|
| 295 | fDolly = dolly; |
---|
| 296 | } |
---|
| 297 | |
---|
| 298 | inline void G4ViewParameters::IncrementDolly (G4double dollyIncrement) { |
---|
| 299 | fDolly += dollyIncrement; |
---|
| 300 | } |
---|
| 301 | |
---|
| 302 | inline void G4ViewParameters::SetLightsMoveWithCamera (G4bool moves) { |
---|
| 303 | fLightsMoveWithCamera = moves; |
---|
| 304 | } |
---|
| 305 | |
---|
| 306 | inline void G4ViewParameters::SetDefaultVisAttributes |
---|
| 307 | (const G4VisAttributes& defaultVisAttributes) { |
---|
| 308 | fDefaultVisAttributes = defaultVisAttributes; |
---|
| 309 | } |
---|
| 310 | |
---|
| 311 | inline void G4ViewParameters::SetDefaultTextVisAttributes |
---|
| 312 | (const G4VisAttributes& defaultTextVisAttributes) { |
---|
| 313 | fDefaultTextVisAttributes = defaultTextVisAttributes; |
---|
| 314 | } |
---|
| 315 | |
---|
| 316 | inline void |
---|
| 317 | G4ViewParameters::SetDefaultMarker (const G4VMarker& defaultMarker) { |
---|
| 318 | fDefaultMarker = defaultMarker; |
---|
| 319 | } |
---|
| 320 | |
---|
| 321 | inline void |
---|
| 322 | G4ViewParameters::SetGlobalMarkerScale (G4double globalMarkerScale) { |
---|
| 323 | fGlobalMarkerScale = globalMarkerScale; |
---|
| 324 | } |
---|
| 325 | |
---|
| 326 | inline void |
---|
| 327 | G4ViewParameters::SetGlobalLineWidthScale (G4double globalLineWidthScale) { |
---|
| 328 | fGlobalLineWidthScale = globalLineWidthScale; |
---|
| 329 | } |
---|
| 330 | |
---|
| 331 | inline void G4ViewParameters::SetMarkerHidden () { |
---|
| 332 | fMarkerNotHidden = false; |
---|
| 333 | } |
---|
| 334 | |
---|
| 335 | inline void G4ViewParameters::SetMarkerNotHidden () { |
---|
| 336 | fMarkerNotHidden = true; |
---|
| 337 | } |
---|
| 338 | |
---|
| 339 | inline void G4ViewParameters::SetWindowSizeHint (G4int xHint, G4int yHint) { |
---|
| 340 | fWindowSizeHintX = xHint; |
---|
| 341 | fWindowSizeHintY = yHint; |
---|
| 342 | } |
---|
| 343 | |
---|
[893] | 344 | inline void G4ViewParameters::SetWindowLocationHint (G4int xHint, G4int yHint) { |
---|
| 345 | #ifdef G4DEBUG |
---|
| 346 | printf("G4ViewParameters::SetWindowLocationHint () :: %d %d\n",xHint,yHint); |
---|
| 347 | #endif |
---|
| 348 | fWindowLocationHintX = xHint; |
---|
| 349 | fWindowLocationHintY = yHint; |
---|
| 350 | } |
---|
| 351 | |
---|
[531] | 352 | inline void G4ViewParameters::SetXGeometryString (const G4String& geomString) { |
---|
| 353 | fXGeometryString = geomString; |
---|
| 354 | } |
---|
| 355 | |
---|
| 356 | inline void G4ViewParameters::SetAutoRefresh (G4bool state) { |
---|
| 357 | fAutoRefresh = state; |
---|
| 358 | } |
---|
| 359 | |
---|
| 360 | inline void G4ViewParameters::SetBackgroundColour (const G4Colour& colour) { |
---|
| 361 | fBackgroundColour = colour; |
---|
| 362 | } |
---|
[593] | 363 | |
---|
| 364 | inline void G4ViewParameters::SetPicking (G4bool picking) { |
---|
| 365 | fPicking = picking; |
---|
| 366 | } |
---|