2 // ********************************************************************
3 // * License and Disclaimer *
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. *
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. *
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 // ********************************************************************
27 // $Id: G4ViewParameters.icc 86974 2014-11-21 11:58:31Z gcosmo $
30 // John Allison 20th October 1996
31 // View parameters and options.
33 inline G4ViewParameters::DrawingStyle
34 G4ViewParameters::GetDrawingStyle () const {
38 inline G4bool G4ViewParameters::IsAuxEdgeVisible () const {
39 return fAuxEdgeVisible;
42 inline G4bool G4ViewParameters::IsCulling () const {
46 inline G4bool G4ViewParameters::IsCullingInvisible () const {
47 return fCullInvisible;
50 inline G4bool G4ViewParameters::IsDensityCulling () const {
51 return fDensityCulling;
54 inline G4double G4ViewParameters::GetVisibleDensity () const {
55 return fVisibleDensity;
58 inline G4bool G4ViewParameters::IsCullingCovered () const {
62 inline G4bool G4ViewParameters::IsSection () const {
66 inline const G4Plane3D& G4ViewParameters::GetSectionPlane () const {
70 inline G4bool G4ViewParameters::IsCutaway () const {
71 return fCutawayPlanes.size() > 0;
74 inline G4ViewParameters::CutawayMode G4ViewParameters::GetCutawayMode () const
75 { return fCutawayMode;}
77 inline const G4Planes& G4ViewParameters::GetCutawayPlanes () const {
78 return fCutawayPlanes;
81 inline G4bool G4ViewParameters::IsExplode () const {
82 return fExplodeFactor > 1.;
85 inline G4double G4ViewParameters::GetExplodeFactor () const {
86 return fExplodeFactor;
89 inline const G4Point3D& G4ViewParameters::GetExplodeCentre () const {
90 return fExplodeCentre;
93 inline G4int G4ViewParameters::GetNoOfSides () const {
97 inline const G4Vector3D& G4ViewParameters::GetViewpointDirection () const {
98 return fViewpointDirection;
101 inline const G4Vector3D& G4ViewParameters::GetUpVector () const {
105 inline G4double G4ViewParameters::GetFieldHalfAngle () const {
106 return fFieldHalfAngle;
109 inline G4double G4ViewParameters::GetZoomFactor () const {
113 inline const G4Vector3D& G4ViewParameters::GetScaleFactor () const {
117 inline const G4Point3D& G4ViewParameters::GetCurrentTargetPoint () const {
118 return fCurrentTargetPoint;
121 inline G4double G4ViewParameters::GetDolly () const {
125 inline const G4Vector3D& G4ViewParameters::GetLightpointDirection () const {
126 return fRelativeLightpointDirection;
129 inline G4bool G4ViewParameters::GetLightsMoveWithCamera () const {
130 return fLightsMoveWithCamera;
133 inline const G4VisAttributes*
134 G4ViewParameters::GetDefaultVisAttributes () const {
135 return &fDefaultVisAttributes;
138 inline const G4VisAttributes*
139 G4ViewParameters::GetDefaultTextVisAttributes () const {
140 return &fDefaultTextVisAttributes;
143 inline const G4VMarker& G4ViewParameters::GetDefaultMarker () const {
144 return fDefaultMarker;
147 inline G4double G4ViewParameters::GetGlobalMarkerScale () const {
148 return fGlobalMarkerScale;
151 inline G4double G4ViewParameters::GetGlobalLineWidthScale () const {
152 return fGlobalLineWidthScale;
155 inline G4bool G4ViewParameters::IsMarkerNotHidden () const {
156 return fMarkerNotHidden;
159 inline bool G4ViewParameters::IsWindowSizeHintX () const {
160 return ((fGeometryMask & fWidthValue) != 0);
163 inline bool G4ViewParameters::IsWindowSizeHintY () const {
164 return ((fGeometryMask & fHeightValue) != 0);
167 inline bool G4ViewParameters::IsWindowLocationHintX () const {
168 return ((fGeometryMask & fXValue) != 0);
171 inline bool G4ViewParameters::IsWindowLocationHintY () const {
172 return ((fGeometryMask & fYValue) != 0);
175 inline unsigned int G4ViewParameters::GetWindowSizeHintX () const {
176 return fWindowSizeHintX;
179 inline unsigned int G4ViewParameters::GetWindowSizeHintY () const {
180 return fWindowSizeHintY;
183 inline G4int G4ViewParameters::GetWindowLocationHintX () const {
184 return fWindowLocationHintX;
187 inline G4int G4ViewParameters::GetWindowLocationHintY () const {
188 return fWindowLocationHintY;
191 inline const G4String& G4ViewParameters::GetXGeometryString () const {
192 return fXGeometryString;
195 inline G4bool G4ViewParameters::IsAutoRefresh () const {
199 inline const G4Colour& G4ViewParameters::GetBackgroundColour () const {
200 return fBackgroundColour;
203 inline G4bool G4ViewParameters::IsPicking () const {
207 inline G4ViewParameters::RotationStyle
208 G4ViewParameters::GetRotationStyle() const {return fRotationStyle;}
210 inline const std::vector<G4ModelingParameters::VisAttributesModifier>&
211 G4ViewParameters::GetVisAttributesModifiers() const {
212 return fVisAttributesModifiers;
216 G4ViewParameters::SetDrawingStyle (G4ViewParameters::DrawingStyle style) {
217 fDrawingStyle = style;
220 inline void G4ViewParameters::SetAuxEdgeVisible (G4bool vis) {
221 fAuxEdgeVisible = vis;
224 inline void G4ViewParameters::SetCulling (G4bool value) {
228 inline void G4ViewParameters::SetCullingInvisible (G4bool value) {
229 fCullInvisible = value;
232 inline void G4ViewParameters::SetDensityCulling (G4bool value) {
233 fDensityCulling = value;
236 inline void G4ViewParameters::SetCullingCovered (G4bool value) {
237 fCullCovered = value;
240 inline void G4ViewParameters::SetSectionPlane (const G4Plane3D& sectionPlane) {
242 fSectionPlane = sectionPlane;
245 inline void G4ViewParameters::UnsetSectionPlane () {
249 inline void G4ViewParameters::SetCutawayMode
250 (G4ViewParameters::CutawayMode cutawayMode) {
251 fCutawayMode = cutawayMode;
254 inline void G4ViewParameters::ClearCutawayPlanes () {
255 fCutawayPlanes.clear ();
258 inline void G4ViewParameters::SetViewpointDirection
259 (const G4Vector3D& viewpointDirection) {
260 SetViewAndLights (viewpointDirection);
263 inline void G4ViewParameters::SetExplodeFactor (G4double explodeFactor) {
264 fExplodeFactor = explodeFactor;
265 if (fExplodeFactor < 1.) fExplodeFactor = 1.;
268 inline void G4ViewParameters::UnsetExplodeFactor () {
272 inline void G4ViewParameters::SetExplodeCentre
273 (const G4Point3D& explodeCentre) {
274 fExplodeCentre = explodeCentre;
276 inline void G4ViewParameters::SetUpVector (const G4Vector3D& upVector) {
277 fUpVector = upVector;
280 inline void G4ViewParameters::SetFieldHalfAngle (G4double fieldHalfAngle) {
281 fFieldHalfAngle = fieldHalfAngle;
284 inline void G4ViewParameters::SetOrthogonalProjection () {
285 SetFieldHalfAngle(0.);
288 inline void G4ViewParameters::SetPerspectiveProjection(G4double fieldHalfAngle) {
289 SetFieldHalfAngle(fieldHalfAngle);
292 inline void G4ViewParameters::SetZoomFactor (G4double zoomFactor) {
293 fZoomFactor = zoomFactor;
297 G4ViewParameters::MultiplyZoomFactor (G4double zoomFactorMultiplier) {
298 fZoomFactor *= zoomFactorMultiplier;
301 inline void G4ViewParameters::SetScaleFactor (const G4Vector3D& scaleFactor) {
302 fScaleFactor = scaleFactor;
306 G4ViewParameters::SetCurrentTargetPoint (const G4Point3D& currentTargetPoint) {
307 fCurrentTargetPoint = currentTargetPoint;
310 inline void G4ViewParameters::SetDolly (G4double dolly) {
314 inline void G4ViewParameters::IncrementDolly (G4double dollyIncrement) {
315 fDolly += dollyIncrement;
318 inline void G4ViewParameters::SetLightsMoveWithCamera (G4bool moves) {
319 fLightsMoveWithCamera = moves;
322 inline void G4ViewParameters::SetDefaultVisAttributes
323 (const G4VisAttributes& defaultVisAttributes) {
324 fDefaultVisAttributes = defaultVisAttributes;
327 inline void G4ViewParameters::SetDefaultColour (const G4Colour& colour) {
328 fDefaultVisAttributes.SetColour (colour);
331 inline void G4ViewParameters::SetDefaultTextVisAttributes
332 (const G4VisAttributes& defaultTextVisAttributes) {
333 fDefaultTextVisAttributes = defaultTextVisAttributes;
336 inline void G4ViewParameters::SetDefaultTextColour (const G4Colour& colour) {
337 fDefaultTextVisAttributes.SetColour (colour);
341 G4ViewParameters::SetDefaultMarker (const G4VMarker& defaultMarker) {
342 fDefaultMarker = defaultMarker;
346 G4ViewParameters::SetGlobalMarkerScale (G4double globalMarkerScale) {
347 fGlobalMarkerScale = globalMarkerScale;
351 G4ViewParameters::SetGlobalLineWidthScale (G4double globalLineWidthScale) {
352 fGlobalLineWidthScale = globalLineWidthScale;
355 inline void G4ViewParameters::SetMarkerHidden () {
356 fMarkerNotHidden = false;
359 inline void G4ViewParameters::SetMarkerNotHidden () {
360 fMarkerNotHidden = true;
363 inline void G4ViewParameters::SetWindowSizeHint (G4int xHint, G4int yHint) {
364 fWindowSizeHintX = xHint;
365 fWindowSizeHintY = yHint;
368 inline void G4ViewParameters::SetWindowLocationHint (G4int xHint, G4int yHint) {
369 fWindowLocationHintX = xHint;
370 fWindowLocationHintY = yHint;
373 inline void G4ViewParameters::SetAutoRefresh (G4bool state) {
374 fAutoRefresh = state;
377 inline void G4ViewParameters::SetBackgroundColour (const G4Colour& colour) {
378 fBackgroundColour = colour;
381 inline void G4ViewParameters::SetPicking (G4bool picking) {
385 inline void G4ViewParameters::SetRotationStyle
386 (G4ViewParameters::RotationStyle style) {
387 fRotationStyle = style;
390 inline void G4ViewParameters::AddVisAttributesModifier
391 (const G4ModelingParameters::VisAttributesModifier& vam) {
392 fVisAttributesModifiers.push_back(vam);