source: trunk/source/geometry/magneticfield/test/NTST/src/NTSTRotationMatrix.cc @ 1228

Last change on this file since 1228 was 1199, checked in by garnier, 15 years ago

nvx fichiers dans CVS

File size: 2.5 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#include "NTSTRotationMatrix.hh"
27
28NTSTRotationMatrix::NTSTRotationMatrix()
29{
30  rxx = 1;
31  ryx = 0;
32  rzx = 0;
33  rxy = 0;
34  ryy = 1;
35  rzy = 0;
36  rxz = 0;
37  ryz = 0;
38  rzz = 1;
39}
40
41NTSTRotationMatrix::~NTSTRotationMatrix()
42{
43    ;
44}
45
46void 
47NTSTRotationMatrix::SetRotationMatrixByCol(const G4ThreeVector& col1,
48                                           const G4ThreeVector& col2,
49                                           const G4ThreeVector& col3)
50{
51  rxx = col1.x();
52  ryx = col1.y();
53  rzx = col1.z();
54 
55  rxy = col2.x();
56  ryy = col2.y();
57  rzy = col2.z();
58 
59  rxz = col3.x();
60  ryz = col3.y();
61  rzz = col3.z();
62 
63}
64
65void 
66NTSTRotationMatrix::SetRotationMatrixByRow(const G4ThreeVector& row1,
67                                           const G4ThreeVector& row2,
68                                           const G4ThreeVector& row3)
69{
70  rxx = row1.x();
71  rxy = row1.y();
72  rxz = row1.z();
73 
74  ryx = row2.x();
75  ryy = row2.y();
76  ryz = row2.z();
77 
78  rzx = row3.x();
79  rzy = row3.y();
80  rzz = row3.z();
81 
82}
83
84
85
Note: See TracBrowser for help on using the repository browser.