LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 43 of file pymodG4graphics_reps.cc.

References export_G4Colour(), and export_G4VisAttributes().

44 {
47 }
void export_G4VisAttributes()
void export_G4Colour()
Definition: pyG4Colour.cc:41
void export_G4Colour ( )

Definition at line 41 of file pyG4Colour.cc.

Referenced by BOOST_PYTHON_MODULE().

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

Definition at line 68 of file pyG4VisAttributes.cc.

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

Referenced by BOOST_PYTHON_MODULE().

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