Geant4-11
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// ====================================================================
27// pyG4RotationMatrix.cc
28//
29// 2005 Q
30// ====================================================================
31#include <boost/python.hpp>
32#include "G4RotationMatrix.hh"
33
34using namespace boost::python;
35
36typedef G4RotationMatrix XXX; // ...
37
38// ====================================================================
39// thin wrappers
40// ====================================================================
42
45
46}
47
48using 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
CLHEP::Hep3Vector G4ThreeVector
double G4double
Definition: G4Types.hh:83
double getPsi() const
double getPhi() const
double zz() const
double yz() const
Hep3Vector colX() const
HepRotation & rotateAxes(const Hep3Vector &newX, const Hep3Vector &newY, const Hep3Vector &newZ)
Definition: Rotation.cc:100
double zx() const
void setPsi(double psi)
Definition: RotationE.cc:267
Hep3Vector axis() const
Definition: RotationA.cc:75
double phi() const
Definition: RotationE.cc:67
double thetaY() const
Definition: Rotation.cc:140
HepRotation inverse() const
HepRotation & rotate(double delta, const Hep3Vector &axis)
Definition: Rotation.cc:42
Hep3Vector rowY() const
Hep3Vector colY() const
Hep3Vector getAxis() const
bool isIdentity() const
Definition: Rotation.cc:167
double delta() const
Definition: RotationA.cc:62
double phiY() const
Definition: Rotation.cc:128
double yx() const
static DLL_API const HepRotation IDENTITY
Definition: Rotation.h:366
double zy() const
double thetaX() const
Definition: Rotation.cc:136
void setDelta(double delta)
Definition: RotationA.cc:131
Hep3Vector colZ() const
double xx() const
HepRotation & rotateX(double delta)
Definition: Rotation.cc:61
double psi() const
Definition: RotationE.cc:107
Hep3Vector rowX() const
double theta() const
Definition: RotationE.cc:101
double phiX() const
Definition: Rotation.cc:124
HepRotation & rotateZ(double delta)
Definition: Rotation.cc:87
double yy() const
void setAxis(const Hep3Vector &axis)
Definition: RotationA.cc:127
double xz() const
void setPhi(double phi)
Definition: RotationE.cc:259
HepRotation & rotateY(double delta)
Definition: Rotation.cc:74
Hep3Vector rowZ() const
double getTheta() const
double thetaZ() const
Definition: Rotation.cc:144
HepRotation & invert()
double xy() const
double getDelta() const
void setTheta(double theta)
Definition: RotationE.cc:263
double phiZ() const
Definition: Rotation.cc:132
XXX &(XXX::* f2_rotate)(G4double, const G4ThreeVector *)
XXX &(XXX::* f1_rotate)(G4double, const G4ThreeVector &)
void export_G4RotationMatrix()
G4RotationMatrix XXX