31 #include <boost/python.hpp> 32 #include "G4Version.hh" 33 #include "G4TwoVector.hh" 36 using namespace CLHEP;
38 typedef G4TwoVector
XXX;
58 class_<G4TwoVector>(
"G4TwoVector",
"general 2-vector")
60 .def(init<G4double>())
61 .def(init<G4double, G4double>())
62 .def(init<const XXX&>())
65 .add_property(
"x", &
XXX::x, &XXX::setX)
66 .add_property(
"y", &
XXX::y, &XXX::setY)
69 .def(
"set", &XXX::set)
70 .def(
"phi", &XXX::phi)
71 .def(
"mag", &XXX::mag)
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)
87 .def(
"angle", &XXX::angle)
88 .def(
"rotate", &XXX::rotate)
91 .def(self_ns::str(
self))
99 .def(
self * G4double())
100 .def(
self / G4double())
101 .def(G4double() *
self)
102 .def(
self *= G4double())
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateTubeVolume, CreateTubeVolume, 4, 6) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateConeVolume
void export_G4TwoVector()
constexpr auto dot(Vector const &a, OtherVector const &b)
Return cross product of two vectors.
auto mag2(Vector const &v)
Return norm of the specified vector.