Geant4-11
Namespaces | Typedefs | Functions
pyG4TwoVector.cc File Reference
#include <boost/python.hpp>
#include "G4Version.hh"
#include "G4TwoVector.hh"

Go to the source code of this file.

Namespaces

namespace  pyG4TwoVector
 

Typedefs

typedef G4TwoVector XXX
 

Functions

void export_G4TwoVector ()
 

Typedef Documentation

◆ XXX

typedef G4TwoVector XXX

Definition at line 38 of file pyG4TwoVector.cc.

Function Documentation

◆ export_G4TwoVector()

void export_G4TwoVector ( )

Definition at line 56 of file pyG4TwoVector.cc.

57{
58 class_<G4TwoVector>("G4TwoVector", "general 2-vector")
59 // constructors
60 .def(init<G4double>())
61 .def(init<G4double, G4double>())
62 .def(init<const XXX&>())
63
64 // property
65 .add_property("x", &XXX::x, &XXX::setX)
66 .add_property("y", &XXX::y, &XXX::setY)
67
68 // methods
69 .def("set", &XXX::set)
70 .def("phi", &XXX::phi)
71 .def("mag", &XXX::mag)
72 .def("mag2", &XXX::mag2)
73 .def("r", &XXX::r)
74 .def("setPhi", &XXX::setPhi)
75 .def("setMag", &XXX::setMag)
76 .def("setR", &XXX::setR)
77 .def("setPolar", &XXX::setPolar)
78 .def("howNear", &XXX::howNear)
79 .def("isNear", &XXX::isNear, f_isNear())
80 .def("howParallel", &XXX::howParallel)
81 .def("isParallel", &XXX::isParallel, f_isParallel())
82 .def("howOrthogonal", &XXX::howOrthogonal)
83 .def("isOrthogonal", &XXX::isOrthogonal, f_isOrthogonal())
84 .def("unit", &XXX::unit)
85 .def("orthogonal", &XXX::orthogonal)
86 .def("dot", &XXX::dot)
87 .def("angle", &XXX::angle)
88 .def("rotate", &XXX::rotate)
89
90 // operators
91 .def(self_ns::str(self))
92 .def(self == self)
93 .def(self != self)
94 .def(self += self)
95 .def(self -= self)
96 .def(self - self)
97 .def(self + self)
98 .def(self * self)
99 .def(self * G4double())
100 .def(self / G4double())
101 .def(G4double() * self)
102 .def(self *= G4double())
103 .def(self > self)
104 .def(self < self)
105 .def(self >= self)
106 .def(self <= self)
107 ;
108}
static const G4double angle[DIMMOTT]
double G4double
Definition: G4Types.hh:83
double phi() const
Definition: RotationE.cc:67
HepRotation & rotate(double delta, const Hep3Vector &axis)
Definition: Rotation.cc:42
HepRotation & set(const Hep3Vector &axis, double delta)
Definition: RotationA.cc:23
bool isNear(const HepRotation &r, double epsilon=Hep4RotationInterface::tolerance) const
Definition: RotationP.cc:41
double howNear(const HepRotation &r) const
Definition: RotationP.cc:37
void setPhi(double phi)
Definition: RotationE.cc:259

References angle, CLHEP::HepRotation::howNear(), CLHEP::HepRotation::isNear(), CLHEP::HepRotation::phi(), CLHEP::HepRotation::rotate(), CLHEP::HepRotation::set(), and CLHEP::HepRotation::setPhi().

Referenced by BOOST_PYTHON_MODULE().