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