Geant4  10.00.p01
G4ViewParameters.icc
Go to the documentation of this file.
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 //
27 // $Id: G4ViewParameters.icc 66373 2012-12-18 09:41:34Z gcosmo $
28 //
29 //
30 // John Allison 20th October 1996
31 // View parameters and options.
32 
33 inline G4ViewParameters::DrawingStyle
34 G4ViewParameters::GetDrawingStyle () const {
35  return fDrawingStyle;
36 }
37 
38 inline G4bool G4ViewParameters::IsAuxEdgeVisible () const {
39  return fAuxEdgeVisible;
40 }
41 
42 inline G4bool G4ViewParameters::IsCulling () const {
43  return fCulling;
44 }
45 
46 inline G4bool G4ViewParameters::IsCullingInvisible () const {
47  return fCullInvisible;
48 }
49 
50 inline G4bool G4ViewParameters::IsDensityCulling () const {
51  return fDensityCulling;
52 }
53 
54 inline G4double G4ViewParameters::GetVisibleDensity () const {
55  return fVisibleDensity;
56 }
57 
58 inline G4bool G4ViewParameters::IsCullingCovered () const {
59  return fCullCovered;
60 }
61 
62 inline G4bool G4ViewParameters::IsSection () const {
63  return fSection;
64 }
65 
66 inline const G4Plane3D& G4ViewParameters::GetSectionPlane () const {
67  return fSectionPlane;
68 }
69 
70 inline G4bool G4ViewParameters::IsCutaway () const {
71  return fCutawayPlanes.size() > 0;
72 }
73 
74 inline G4ViewParameters::CutawayMode G4ViewParameters::GetCutawayMode () const
75 { return fCutawayMode;}
76 
77 inline const G4Planes& G4ViewParameters::GetCutawayPlanes () const {
78  return fCutawayPlanes;
79 }
80 
81 inline G4bool G4ViewParameters::IsExplode () const {
82  return fExplodeFactor > 1.;
83 }
84 
85 inline G4double G4ViewParameters::GetExplodeFactor () const {
86  return fExplodeFactor;
87 }
88 
89 inline const G4Point3D& G4ViewParameters::GetExplodeCentre () const {
90  return fExplodeCentre;
91 }
92 
93 inline G4int G4ViewParameters::GetNoOfSides () const {
94  return fNoOfSides;
95 }
96 
97 inline const G4Vector3D& G4ViewParameters::GetViewpointDirection () const {
98  return fViewpointDirection;
99 }
100 
101 inline const G4Vector3D& G4ViewParameters::GetUpVector () const {
102  return fUpVector;
103 }
104 
105 inline G4double G4ViewParameters::GetFieldHalfAngle () const {
106  return fFieldHalfAngle;
107 }
108 
109 inline G4double G4ViewParameters::GetZoomFactor () const {
110  return fZoomFactor;
111 }
112 
113 inline const G4Vector3D& G4ViewParameters::GetScaleFactor () const {
114  return fScaleFactor;
115 }
116 
117 inline const G4Point3D& G4ViewParameters::GetCurrentTargetPoint () const {
118  return fCurrentTargetPoint;
119 }
120 
121 inline G4double G4ViewParameters::GetDolly () const {
122  return fDolly;
123 }
124 
125 inline const G4Vector3D& G4ViewParameters::GetLightpointDirection () const {
126  return fRelativeLightpointDirection;
127 }
128 
129 inline G4bool G4ViewParameters::GetLightsMoveWithCamera () const {
130  return fLightsMoveWithCamera;
131 }
132 
133 inline const G4VisAttributes*
134 G4ViewParameters::GetDefaultVisAttributes () const {
135  return &fDefaultVisAttributes;
136 }
137 
138 inline const G4VisAttributes*
139 G4ViewParameters::GetDefaultTextVisAttributes () const {
140  return &fDefaultTextVisAttributes;
141 }
142 
143 inline const G4VMarker& G4ViewParameters::GetDefaultMarker () const {
144  return fDefaultMarker;
145 }
146 
147 inline G4double G4ViewParameters::GetGlobalMarkerScale () const {
148  return fGlobalMarkerScale;
149 }
150 
151 inline G4double G4ViewParameters::GetGlobalLineWidthScale () const {
152  return fGlobalLineWidthScale;
153 }
154 
155 inline G4bool G4ViewParameters::IsMarkerNotHidden () const {
156  return fMarkerNotHidden;
157 }
158 
159 inline bool G4ViewParameters::IsWindowSizeHintX () const {
160  return (fGeometryMask & fWidthValue);
161 }
162 
163 inline bool G4ViewParameters::IsWindowSizeHintY () const {
164  return (fGeometryMask & fHeightValue);
165 }
166 
167 inline bool G4ViewParameters::IsWindowLocationHintX () const {
168  return (fGeometryMask & fXValue);
169 }
170 
171 inline bool G4ViewParameters::IsWindowLocationHintY () const {
172  return (fGeometryMask & fYValue);
173 }
174 
175 inline unsigned int G4ViewParameters::GetWindowSizeHintX () const {
176  return fWindowSizeHintX;
177 }
178 
179 inline unsigned int G4ViewParameters::GetWindowSizeHintY () const {
180  return fWindowSizeHintY;
181 }
182 
183 inline G4int G4ViewParameters::GetWindowLocationHintX () const {
184  return fWindowLocationHintX;
185 }
186 
187 inline G4int G4ViewParameters::GetWindowLocationHintY () const {
188  return fWindowLocationHintY;
189 }
190 
191 inline const G4String& G4ViewParameters::GetXGeometryString () const {
192  return fXGeometryString;
193 }
194 
195 inline G4bool G4ViewParameters::IsAutoRefresh () const {
196  return fAutoRefresh;
197 }
198 
199 inline const G4Colour& G4ViewParameters::GetBackgroundColour () const {
200  return fBackgroundColour;
201 }
202 
203 inline G4bool G4ViewParameters::IsPicking () const {
204  return fPicking;
205 }
206 
207 inline G4ViewParameters::RotationStyle
208 G4ViewParameters::GetRotationStyle() const {return fRotationStyle;}
209 
210 inline const std::vector<G4ModelingParameters::VisAttributesModifier>&
211 G4ViewParameters::GetVisAttributesModifiers() const {
212  return fVisAttributesModifiers;
213 }
214 
215 inline void
216 G4ViewParameters::SetDrawingStyle (G4ViewParameters::DrawingStyle style) {
217  fDrawingStyle = style;
218 }
219 
220 inline void G4ViewParameters::SetAuxEdgeVisible (G4bool vis) {
221  fAuxEdgeVisible = vis;
222 }
223 
224 inline void G4ViewParameters::SetCulling (G4bool value) {
225  fCulling = value;
226 }
227 
228 inline void G4ViewParameters::SetCullingInvisible (G4bool value) {
229  fCullInvisible = value;
230 }
231 
232 inline void G4ViewParameters::SetDensityCulling (G4bool value) {
233  fDensityCulling = value;
234 }
235 
236 inline void G4ViewParameters::SetCullingCovered (G4bool value) {
237  fCullCovered = value;
238 }
239 
240 inline void G4ViewParameters::SetSectionPlane (const G4Plane3D& sectionPlane) {
241  fSection = true;
242  fSectionPlane = sectionPlane;
243 }
244 
245 inline void G4ViewParameters::UnsetSectionPlane () {
246  fSection = false;
247 }
248 
249 inline void G4ViewParameters::SetCutawayMode
250 (G4ViewParameters::CutawayMode cutawayMode) {
251  fCutawayMode = cutawayMode;
252 }
253 
254 inline void G4ViewParameters::ClearCutawayPlanes () {
255  fCutawayPlanes.clear ();
256 }
257 
258 inline void G4ViewParameters::SetViewpointDirection
259 (const G4Vector3D& viewpointDirection) {
260  SetViewAndLights (viewpointDirection);
261 }
262 
263 inline void G4ViewParameters::SetExplodeFactor (G4double explodeFactor) {
264  fExplodeFactor = explodeFactor;
265  if (fExplodeFactor < 1.) fExplodeFactor = 1.;
266 }
267 
268 inline void G4ViewParameters::UnsetExplodeFactor () {
269  fExplodeFactor = 1.;
270 }
271 
272 inline void G4ViewParameters::SetExplodeCentre
273 (const G4Point3D& explodeCentre) {
274  fExplodeCentre = explodeCentre;
275 }
276 inline void G4ViewParameters::SetUpVector (const G4Vector3D& upVector) {
277  fUpVector = upVector;
278 }
279 
280 inline void G4ViewParameters::SetFieldHalfAngle (G4double fieldHalfAngle) {
281  fFieldHalfAngle = fieldHalfAngle;
282 }
283 
284 inline void G4ViewParameters::SetOrthogonalProjection () {
285  SetFieldHalfAngle(0.);
286 }
287 
288 inline void G4ViewParameters::SetPerspectiveProjection(G4double fieldHalfAngle) {
289  SetFieldHalfAngle(fieldHalfAngle);
290 }
291 
292 inline void G4ViewParameters::SetZoomFactor (G4double zoomFactor) {
293  fZoomFactor = zoomFactor;
294 }
295 
296 inline void
297 G4ViewParameters::MultiplyZoomFactor (G4double zoomFactorMultiplier) {
298  fZoomFactor *= zoomFactorMultiplier;
299 }
300 
301 inline void G4ViewParameters::SetScaleFactor (const G4Vector3D& scaleFactor) {
302  fScaleFactor = scaleFactor;
303 }
304 
305 inline void
306 G4ViewParameters::SetCurrentTargetPoint (const G4Point3D& currentTargetPoint) {
307  fCurrentTargetPoint = currentTargetPoint;
308 }
309 
310 inline void G4ViewParameters::SetDolly (G4double dolly) {
311  fDolly = dolly;
312 }
313 
314 inline void G4ViewParameters::IncrementDolly (G4double dollyIncrement) {
315  fDolly += dollyIncrement;
316 }
317 
318 inline void G4ViewParameters::SetLightsMoveWithCamera (G4bool moves) {
319  fLightsMoveWithCamera = moves;
320 }
321 
322 inline void G4ViewParameters::SetDefaultVisAttributes
323 (const G4VisAttributes& defaultVisAttributes) {
324  fDefaultVisAttributes = defaultVisAttributes;
325 }
326 
327 inline void G4ViewParameters::SetDefaultColour (const G4Colour& colour) {
328  fDefaultVisAttributes.SetColour (colour);
329 }
330 
331 inline void G4ViewParameters::SetDefaultTextVisAttributes
332 (const G4VisAttributes& defaultTextVisAttributes) {
333  fDefaultTextVisAttributes = defaultTextVisAttributes;
334 }
335 
336 inline void G4ViewParameters::SetDefaultTextColour (const G4Colour& colour) {
337  fDefaultTextVisAttributes.SetColour (colour);
338 }
339 
340 inline void
341 G4ViewParameters::SetDefaultMarker (const G4VMarker& defaultMarker) {
342  fDefaultMarker = defaultMarker;
343 }
344 
345 inline void
346 G4ViewParameters::SetGlobalMarkerScale (G4double globalMarkerScale) {
347  fGlobalMarkerScale = globalMarkerScale;
348 }
349 
350 inline void
351 G4ViewParameters::SetGlobalLineWidthScale (G4double globalLineWidthScale) {
352  fGlobalLineWidthScale = globalLineWidthScale;
353 }
354 
355 inline void G4ViewParameters::SetMarkerHidden () {
356  fMarkerNotHidden = false;
357 }
358 
359 inline void G4ViewParameters::SetMarkerNotHidden () {
360  fMarkerNotHidden = true;
361 }
362 
363 inline void G4ViewParameters::SetWindowSizeHint (G4int xHint, G4int yHint) {
364  fWindowSizeHintX = xHint;
365  fWindowSizeHintY = yHint;
366 }
367 
368 inline void G4ViewParameters::SetWindowLocationHint (G4int xHint, G4int yHint) {
369  fWindowLocationHintX = xHint;
370  fWindowLocationHintY = yHint;
371 }
372 
373 inline void G4ViewParameters::SetAutoRefresh (G4bool state) {
374  fAutoRefresh = state;
375 }
376 
377 inline void G4ViewParameters::SetBackgroundColour (const G4Colour& colour) {
378  fBackgroundColour = colour;
379 }
380 
381 inline void G4ViewParameters::SetPicking (G4bool picking) {
382  fPicking = picking;
383 }
384 
385 inline void G4ViewParameters::SetRotationStyle
386  (G4ViewParameters::RotationStyle style) {
387  fRotationStyle = style;
388 }
389 
390 inline void G4ViewParameters::AddVisAttributesModifier
391 (const G4ModelingParameters::VisAttributesModifier& vam) {
392  fVisAttributesModifiers.push_back(vam);
393 }