Geant4  10.00.p03
pyG4VTouchable.cc
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 // $Id: pyG4VTouchable.cc 76884 2013-11-18 12:54:03Z gcosmo $
27 // ====================================================================
28 // pyG4VTouchable.cc
29 //
30 // 2005 Q
31 // ====================================================================
32 #include <boost/python.hpp>
33 #include "G4VTouchable.hh"
34 #include "G4VPhysicalVolume.hh"
35 #include "G4VSolid.hh"
36 
37 using namespace boost::python;
38 
39 // ====================================================================
40 // thin wrappers
41 // ====================================================================
42 namespace pyG4VTouchable {
43 
45  GetTranslation, 0, 1)
46 
48  GetRotation, 0, 1)
49 
50 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetVolume, GetVolume, 0, 1)
51 
52 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetSolid, GetSolid, 0, 1)
53 
55  GetReplicaNumber, 0, 1)
56 
57 BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_MoveUpHistory, MoveUpHistory, 0, 1)
58 
59 }
60 
61 using namespace pyG4VTouchable;
62 
63 // ====================================================================
64 // module definition
65 // ====================================================================
67 {
68  class_<G4VTouchable, G4VTouchable*, boost::noncopyable>
69  ("G4VTouchable", "touchable class", no_init)
70  .def("GetTranslation", &G4VTouchable::GetTranslation,
71  f_GetTranslation()
72  [return_value_policy<return_by_value>()])
73  .def("GetRotation", &G4VTouchable::GetRotation,
74  f_GetRotation()
75  [return_value_policy<reference_existing_object>()])
76  .def("GetVolume", &G4VTouchable::GetVolume,
77  f_GetVolume()
78  [return_value_policy<reference_existing_object>()])
79  .def("GetSolid", &G4VTouchable::GetSolid,
80  f_GetSolid()
81  [return_value_policy<reference_existing_object>()])
82  .def("GetReplicaNumber", &G4VTouchable::GetReplicaNumber,
83  f_GetReplicaNumber())
84  .def("GetHistoryDepth", &G4VTouchable::GetHistoryDepth)
85  .def("MoveUpHistory", &G4VTouchable::MoveUpHistory,
86  f_MoveUpHistory())
87  ;
88 }
89 
BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetTranslation, GetTranslation, 0, 1) BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(f_GetRotation
virtual G4VSolid * GetSolid(G4int depth=0) const
Definition: G4VTouchable.cc:51
virtual G4int MoveUpHistory(G4int num_levels=1)
Definition: G4VTouchable.cc:65
virtual G4int GetHistoryDepth() const
Definition: G4VTouchable.cc:79
virtual const G4ThreeVector & GetTranslation(G4int depth=0) const =0
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:44
virtual G4int GetReplicaNumber(G4int depth=0) const
Definition: G4VTouchable.cc:58
void export_G4VTouchable()
virtual const G4RotationMatrix * GetRotation(G4int depth=0) const =0