source: trunk/source/graphics_reps/src/G4Scale.cc @ 1350

Last change on this file since 1350 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 3.0 KB
Line 
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: G4Scale.cc,v 1.9 2006/06/29 19:07:14 gunter Exp $
28// GEANT4 tag $Name: geant4-09-04-beta-01 $
29//
30//
31// John Allison  21st July 2001
32
33#include "G4Scale.hh"
34
35G4Scale::G4Scale (G4double length, const G4String& annotation,
36                  G4Scale::Direction direction,
37                  G4bool autoPlacing,
38                  G4double xmid, G4double ymid, G4double zmid):
39  fLength(length),
40  fAnnotation(annotation),
41  fDirection(direction),
42  fAutoPlacing(autoPlacing),
43  fXmid(xmid), fYmid(ymid), fZmid(zmid) {}
44
45G4Scale::~G4Scale () {}
46
47const G4String G4Scale::GuidanceString
48(
49 "An annotated line in the specified direction with tick marks at the"
50 "\nend.  If autoPlacing is true it is required to be centred at the"
51 "\nfront, right, bottom corner of the world space, comfortably outside"
52 "\nthe existing bounding box/sphere so that existing objects do not"
53 "\nobscure it.  Otherwise it is required to be drawn with mid-point at"
54 "\n(xmid, ymid, zmid)."
55 "\n"
56 "\nThe auto placing algorithm might be:"
57 "\n  x = xmin + (1 + comfort) * (xmax - xmin);"
58 "\n  y = ymin - comfort * (ymax - ymin);"
59 "\n  z = zmin + (1 + comfort) * (zmax - zmin);"
60 "\n  if direction == x then (x - length,y,z) to (x,y,z);"
61 "\n  if direction == y then (x,y,z) to (x,y + length,z);"
62 "\n  if direction == z then (x,y,z - length) to (x,y,z);"
63);
64
65const G4String& G4Scale::GetGuidanceString()
66{
67  return GuidanceString;
68}
Note: See TracBrowser for help on using the repository browser.