source: trunk/source/geometry/volumes/include/G4AssemblyTriplet.icc

Last change on this file was 1337, checked in by garnier, 15 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 4.7 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: G4AssemblyTriplet.icc,v 1.2 2006/06/29 18:56:49 gunter Exp $
28// GEANT4 tag $Name: geant4-09-04-beta-01 $
29//
30//
31// Class G4AssemblyTriplet - inline implementation
32//
33// ----------------------------------------------------------------------
34
35inline
36G4AssemblyTriplet::G4AssemblyTriplet()
37 : fVolume( 0 ), fRotation( 0 ), fAssembly(0), fIsReflection(false)
38{
39 G4ThreeVector v(0.,0.,0.);
40 fTranslation = v;
41}
42
43inline
44G4AssemblyTriplet::G4AssemblyTriplet( G4LogicalVolume* pVolume,
45 G4ThreeVector& translation,
46 G4RotationMatrix* pRotation,
47 G4bool isReflection )
48 : fVolume( pVolume ), fTranslation( translation ), fRotation( pRotation ),
49 fAssembly( 0 ), fIsReflection(isReflection)
50{
51}
52
53inline
54G4AssemblyTriplet::G4AssemblyTriplet( G4AssemblyVolume* pAssembly,
55 G4ThreeVector& translation,
56 G4RotationMatrix* pRotation,
57 G4bool isReflection )
58 : fVolume( 0 ), fTranslation( translation ), fRotation( pRotation ),
59 fAssembly( pAssembly ), fIsReflection(isReflection)
60{
61}
62
63inline
64G4AssemblyTriplet::G4AssemblyTriplet( const G4AssemblyTriplet& second )
65{
66 fVolume = second.GetVolume();
67 fRotation = second.GetRotation();
68 fTranslation = second.GetTranslation();
69 fAssembly = second.GetAssembly();
70 fIsReflection = second.IsReflection();
71}
72
73inline
74G4AssemblyTriplet::~G4AssemblyTriplet()
75{
76}
77
78inline
79G4LogicalVolume* G4AssemblyTriplet::GetVolume() const
80{
81 return fVolume;
82}
83
84inline
85void G4AssemblyTriplet::SetVolume( G4LogicalVolume* pVolume )
86{
87 if ( fAssembly )
88 {
89 G4Exception("G4AssemblyTriplet::SetVolume()",
90 "IllegalCall", JustWarning,
91 "There is an assembly already set, it will be ignored.");
92 }
93 fVolume = pVolume;
94 fAssembly = 0;
95}
96
97inline
98G4AssemblyVolume* G4AssemblyTriplet::GetAssembly() const
99{
100 return fAssembly;
101}
102
103inline
104void G4AssemblyTriplet::SetAssembly( G4AssemblyVolume* pAssembly )
105{
106 if ( fVolume )
107 {
108 G4Exception("G4AssemblyTriplet::SetAssembly()",
109 "IllegalCall", JustWarning,
110 "There is a volume already set, it will be ignored.");
111 }
112 fAssembly = pAssembly;
113 fVolume = 0;
114}
115
116inline
117G4ThreeVector G4AssemblyTriplet::GetTranslation() const
118{
119 return fTranslation;
120}
121
122inline
123void G4AssemblyTriplet::SetTranslation( G4ThreeVector& translation )
124{
125 fTranslation = translation;
126}
127
128inline
129G4RotationMatrix* G4AssemblyTriplet::GetRotation() const
130{
131 return fRotation;
132}
133
134inline
135void G4AssemblyTriplet::SetRotation( G4RotationMatrix* pRotation )
136{
137 fRotation = pRotation;
138}
139
140inline
141G4bool G4AssemblyTriplet::IsReflection() const
142{
143 return fIsReflection;
144}
145
146inline
147G4AssemblyTriplet&
148G4AssemblyTriplet::operator=( const G4AssemblyTriplet& second )
149{
150 if( this != &second )
151 {
152 fVolume = second.GetVolume();
153 fRotation = second.GetRotation();
154 fTranslation = second.GetTranslation();
155 fAssembly = second.GetAssembly();
156 fIsReflection = second.IsReflection();
157 }
158
159 return *this;
160}
Note: See TracBrowser for help on using the repository browser.