32 #include <boost/python.hpp> 33 #include "G4Version.hh" 35 #if G4VERSION_NUMBER >= 830 36 #include "G4TwoVector.hh" 39 using namespace CLHEP;
41 typedef G4TwoVector
XXX;
46 namespace pyG4TwoVector {
54 using namespace pyG4TwoVector;
63 #if G4VERSION_NUMBER >= 830 65 class_<G4TwoVector>(
"G4TwoVector",
"general 2-vector")
67 .def(init<G4double>())
68 .def(init<G4double, G4double>())
69 .def(init<const XXX&>())
72 .add_property(
"x", &
XXX::x, &XXX::setX)
73 .add_property(
"y", &
XXX::y, &XXX::setY)
76 .def(
"set", &XXX::set)
77 .def(
"phi", &XXX::phi)
78 .def(
"mag", &XXX::mag)
81 .def(
"setPhi", &XXX::setPhi)
82 .def(
"setMag", &XXX::setMag)
83 .def(
"setR", &XXX::setR)
84 .def(
"setPolar", &XXX::setPolar)
85 .def(
"howNear", &XXX::howNear)
86 .def(
"isNear", &XXX::isNear, f_isNear())
87 .def(
"howParallel", &XXX::howParallel)
88 .def(
"isParallel", &XXX::isParallel, f_isParallel())
89 .def(
"howOrthogonal", &XXX::howOrthogonal)
90 .def(
"isOrthogonal", &XXX::isOrthogonal, f_isOrthogonal())
91 .def(
"unit", &XXX::unit)
92 .def(
"orthogonal", &XXX::orthogonal)
94 .def(
"angle", &XXX::angle)
95 .def(
"rotate", &XXX::rotate)
98 .def(self_ns::str(
self))
106 .def(
self * G4double())
107 .def(
self / G4double())
108 .def(G4double() *
self)
109 .def(
self *= G4double())
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateTubeVolume, CreateTubeVolume, 4, 6) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_CreateConeVolume
constexpr auto dot(Vector const &a, Vector const &b)
Return cross product of two vectors.
ExN03DetectorConstruction XXX
void export_G4TwoVector()
auto mag2(Vector const &v)
Return norm of the specified vector.