LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
pymodG4graphics_reps.cc File Reference
#include <boost/python.hpp>

Go to the source code of this file.

Functions

void export_G4VisAttributes ()
 
void export_G4Colour ()
 
 BOOST_PYTHON_MODULE (G4graphics_reps)
 

Function Documentation

BOOST_PYTHON_MODULE ( G4graphics_reps  )

Definition at line 42 of file pymodG4graphics_reps.cc.

References export_G4Colour(), and export_G4VisAttributes().

43 {
46 }
void export_G4VisAttributes()
void export_G4Colour()
Definition: pyG4Colour.cc:40
void export_G4Colour ( )

Definition at line 40 of file pyG4Colour.cc.

Referenced by BOOST_PYTHON_MODULE().

41 {
42  class_<G4Colour> ("G4Color", "color class", no_init)
43  // constructors
44  .def(init<>())
45  .def(init<G4double>())
46  .def(init<G4double, G4double>())
47  .def(init<G4double, G4double, G4double>())
48  .def(init<G4double, G4double, G4double, G4double>())
49  .def(init<G4ThreeVector>())
50  // ---
51  .def("GetRed", &G4Colour::GetRed)
52  .def("GetGreen", &G4Colour::GetGreen)
53  .def("GetBlue", &G4Colour::GetBlue)
54  .def("GetAlpha", &G4Colour::GetAlpha)
55  // operators
56  .def(self_ns::str(self))
57  .def(self != self)
58  ;
59 
60  //class_<G4Color> ("G4Color", "color class", no_init)
61  // // constructors
62  // .def(init<>())
63  // .def(init<G4double>())
64  // .def(init<G4double, G4double>())
65  // .def(init<G4double, G4double, G4double>())
66  // .def(init<G4double, G4double, G4double, G4double>())
67  // .def(init<G4ThreeVector>())
68  // // ---
69  // .def("GetRed", &G4Colour::GetRed)
70  // .def("GetGreen", &G4Colour::GetGreen)
71  // .def("GetBlue", &G4Colour::GetBlue)
72  // .def("GetAlpha", &G4Colour::GetAlpha)
73  // // operators
74  // .def(self_ns::str(self))
75  // .def(self != self)
76  // ;
77 }
void export_G4VisAttributes ( )

Definition at line 67 of file pyG4VisAttributes.cc.

References pyG4VisAttributes::f1_SetColor, pyG4VisAttributes::f1_SetColour, pyG4VisAttributes::f2_SetColor, pyG4VisAttributes::f2_SetColour, SetLineStyle(), SetLineWidth(), and value.

Referenced by BOOST_PYTHON_MODULE().

68 {
69  scope in_G4VisAttributes=
70  class_<G4VisAttributes, G4VisAttributes*>
71  ("G4VisAttributes", "visualization attributes")
72  // constructors
73  .def(init<G4bool>())
74  .def(init<const G4Colour&>())
75  .def(init<G4bool, const G4Colour&>())
76  // ---
77  .def("GetInvisible", &G4VisAttributes::GetInvisible,
78  return_value_policy<reference_existing_object>())
79  .staticmethod("GetInvisible")
80  .def("IsVisible", &G4VisAttributes::IsVisible)
81  .def("IsDaughtersInvisible", &G4VisAttributes::IsDaughtersInvisible)
82  // ---
83  .def("GetColour", &G4VisAttributes::GetColour,
84  return_internal_reference<>())
85  .def("GetColor", &G4VisAttributes::GetColor,
86  return_internal_reference<>())
87  // ---
88  .def("GetLineStyle", &G4VisAttributes::GetLineStyle)
89  .def("GetLineWidth", &G4VisAttributes::GetLineWidth)
90  .def("IsForceDrawingStyle", &G4VisAttributes::IsForceDrawingStyle)
91  .def("GetForcedDrawingStyle", &G4VisAttributes::GetForcedDrawingStyle)
92  .def("IsForceAuxEdgeVisible", &G4VisAttributes::IsForceAuxEdgeVisible)
93  .def("SetVisibility", &G4VisAttributes::SetVisibility)
94  .def("SetDaughtersInvisible", &G4VisAttributes::SetDaughtersInvisible)
95  .def("SetColor", f1_SetColor)
96  .def("SetColour", f1_SetColour)
97  .def("SetColor", f2_SetColor, f_SetColor())
98  .def("SetColour", f2_SetColour, f_SetColour())
99  .def("SetLineStyle", &G4VisAttributes::SetLineStyle)
100  .def("SetLineWidth", &G4VisAttributes::SetLineWidth)
101  .def("SetForceWireframe", &G4VisAttributes::SetForceWireframe)
102  .def("SetForceSolid", &G4VisAttributes::SetForceSolid)
103  .def("SetForceAuxEdgeVisible", &G4VisAttributes::SetForceAuxEdgeVisible)
104  .def("SetAttValues", &G4VisAttributes::SetAttValues)
105  .def("SetAttDefs", &G4VisAttributes::SetAttDefs)
106  // operators
107  .def(self_ns::str(self))
108  .def(self == self)
109  .def(self != self)
110  ;
111 
112  // enum LineStyle
113  enum_<G4VisAttributes::LineStyle>("LineStyle")
114  .value("unbroken", G4VisAttributes::unbroken)
115  .value("dashed", G4VisAttributes::dashed)
116  .value("dotted", G4VisAttributes::dotted)
117  ;
118 
119  // enum ForcedDrawingStyle
120  enum_<G4VisAttributes::ForcedDrawingStyle>("ForcedDrawingStyle")
121  .value("wireframe", G4VisAttributes::wireframe)
122  .value("solid", G4VisAttributes::solid)
123  ;
124 
125 }
void(G4VisAttributes::* f1_SetColor)(const G4Color &)
void(G4VisAttributes::* f2_SetColor)(G4double, G4double, G4double, G4double)
void(G4VisAttributes::* f2_SetColour)(G4double, G4double, G4double, G4double)
void(G4VisAttributes::* f1_SetColour)(const G4Colour &)
double value
Definition: spectrum.C:18
h_2 SetLineStyle(kDashed)
gr1 SetLineWidth(1)