ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyG4RotationMatrix.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pyG4RotationMatrix.cc
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 // pyG4RotationMatrix.cc
28 //
29 // 2005 Q
30 // ====================================================================
31 #include <boost/python.hpp>
32 #include "G4RotationMatrix.hh"
33 
34 using namespace boost::python;
35 
36 typedef G4RotationMatrix XXX; // ...
37 
38 // ====================================================================
39 // thin wrappers
40 // ====================================================================
41 namespace pyG4RotationMatrix {
42 
45 
46 }
47 
48 using namespace pyG4RotationMatrix;
49 
50 // ====================================================================
51 // module definition
52 // ====================================================================
54 {
55  class_<G4RotationMatrix>("G4RotationMatrix", "rotation matrix")
56  // constructors
57  .def(init<const XXX&>())
58 
59  // property
60  .add_property("xx", &XXX::xx)
61  .add_property("xy", &XXX::xy)
62  .add_property("xz", &XXX::xz)
63  .add_property("yx", &XXX::yx)
64  .add_property("yy", &XXX::yy)
65  .add_property("yz", &XXX::yz)
66  .add_property("zx", &XXX::zx)
67  .add_property("zy", &XXX::zy)
68  .add_property("zz", &XXX::zz)
69  .def_readonly("IDENTITY", &XXX::IDENTITY)
70 
71  // methods
72  .def("colX", &XXX::colX)
73  .def("colY", &XXX::colY)
74  .def("colZ", &XXX::colZ)
75  .def("rowX", &XXX::rowX)
76  .def("rowY", &XXX::rowY)
77  .def("rowZ", &XXX::rowZ)
78  .def("getPhi", &XXX::getPhi)
79  .def("getTheta", &XXX::getTheta)
80  .def("getPsi", &XXX::getPsi)
81  .def("phi", &XXX::phi)
82  .def("theta", &XXX::theta)
83  .def("psi", &XXX::psi)
84  .def("getDelta", &XXX::getDelta)
85  .def("getAxis", &XXX::getAxis)
86  .def("delta", &XXX::axis)
87  .def("axis", &XXX::delta)
88  .def("phiX", &XXX::phiX)
89  .def("phiY", &XXX::phiY)
90  .def("phiZ", &XXX::phiZ)
91  .def("thetaX", &XXX::thetaX)
92  .def("thetaY", &XXX::thetaY)
93  .def("thetaZ", &XXX::thetaZ)
94  .def("setPhi", &XXX::setPhi)
95  .def("setTheta", &XXX::setTheta)
96  .def("setPsi", &XXX::setPsi)
97  .def("setAxis", &XXX::setAxis)
98  .def("setDelta", &XXX::setDelta)
99  .def("isIdentity", &XXX::isIdentity)
100  .def("rotateX", &XXX::rotateX,
101  return_value_policy<reference_existing_object>())
102  .def("rotateY", &XXX::rotateY,
103  return_value_policy<reference_existing_object>())
104  .def("rotateZ", &XXX::rotateZ,
105  return_value_policy<reference_existing_object>())
106  .def("rotate", f1_rotate,
107  return_value_policy<reference_existing_object>())
108  .def("rotate", f2_rotate,
109  return_value_policy<reference_existing_object>())
110  .def("rotateAxes", &XXX::rotateAxes,
111  return_value_policy<reference_existing_object>())
112  .def("inverse", &XXX::inverse)
113  .def("invert", &XXX::invert,
114  return_value_policy<reference_existing_object>())
115 
116  // operators
117  .def(self_ns::str(self))
118  .def(self == self)
119  .def(self != self)
120  .def(self > self)
121  .def(self < self)
122  .def(self >= self)
123  .def(self <= self)
124  .def(self * self)
125  .def(self * G4ThreeVector())
126  .def(self *= self)
127  ;
128 }
129