source: trunk/source/g3tog4/src/G3toG4RotationMatrix.cc@ 1136

Last change on this file since 1136 was 965, checked in by garnier, 17 years ago

update g3tog4

File size: 2.8 KB
RevLine 
[817]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: G3toG4RotationMatrix.cc,v 1.4 2006/06/29 18:13:31 gunter Exp $
[965]28// GEANT4 tag $Name: geant4-09-02-ref-02 $
[817]29
30#include "G3toG4RotationMatrix.hh"
31
32G3toG4RotationMatrix::G3toG4RotationMatrix()
33{
34 rxx = 1;
35 ryx = 0;
36 rzx = 0;
37 rxy = 0;
38 ryy = 1;
39 rzy = 0;
40 rxz = 0;
41 ryz = 0;
42 rzz = 1;
43}
44
45G3toG4RotationMatrix::~G3toG4RotationMatrix()
46{
47 ;
48}
49
50void
51G3toG4RotationMatrix::SetRotationMatrixByCol(const G4ThreeVector& col1,
52 const G4ThreeVector& col2,
53 const G4ThreeVector& col3)
54{
55 rxx = col1.x();
56 ryx = col1.y();
57 rzx = col1.z();
58
59 rxy = col2.x();
60 ryy = col2.y();
61 rzy = col2.z();
62
63 rxz = col3.x();
64 ryz = col3.y();
65 rzz = col3.z();
66
67}
68
69void
70G3toG4RotationMatrix::SetRotationMatrixByRow(const G4ThreeVector& row1,
71 const G4ThreeVector& row2,
72 const G4ThreeVector& row3)
73{
74 rxx = row1.x();
75 rxy = row1.y();
76 rxz = row1.z();
77
78 ryx = row2.x();
79 ryy = row2.y();
80 ryz = row2.z();
81
82 rzx = row3.x();
83 rzy = row3.y();
84 rzz = row3.z();
85
86}
87
88
89
Note: See TracBrowser for help on using the repository browser.