Geant4  10.02.p01
pyG4VPhysicalVolume.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: pyG4VPhysicalVolume.cc 76884 2013-11-18 12:54:03Z gcosmo $
27 // ====================================================================
28 // pyG4VPhysicalVolume.cc
29 //
30 // 2005 Q
31 // ====================================================================
32 #include <boost/python.hpp>
33 #include "G4Version.hh"
34 #include "G4VPhysicalVolume.hh"
35 #include "G4LogicalVolume.hh"
36 #include "G4VPVParameterisation.hh"
37 
38 using namespace boost::python;
39 
40 // ====================================================================
41 // thin wrappers
42 // ====================================================================
44 
47 
50 
51 }
52 
53 using namespace pyG4VPhysicalVolume;
54 
55 // ====================================================================
56 // module definition
57 // ====================================================================
59 {
60  class_<G4VPhysicalVolume, G4VPhysicalVolume*, boost::noncopyable>
61  ("G4VPhysicalVolume", "physical volume class", no_init)
62  // ---
63  .def("SetTranslation", &G4VPhysicalVolume::SetTranslation)
64  .def("GetTranslation", &G4VPhysicalVolume::GetTranslation,
65  return_internal_reference<>())
66  .def("GetObjectTranslation", &G4VPhysicalVolume::GetObjectTranslation)
67  .def("GetFrameTranslation", &G4VPhysicalVolume::GetObjectTranslation)
68  // ---
69  .def("SetRotation", &G4VPhysicalVolume::SetRotation)
70  .def("GetRotation", f1_GetRotation,
71  return_internal_reference<>())
72  .def("GetRotation", f2_GetRotation,
73  return_internal_reference<>())
74  .def("GetObjectRotationValue", &G4VPhysicalVolume::GetObjectRotationValue)
75  .def("GetFrameRotation", &G4VPhysicalVolume::GetFrameRotation,
76  return_internal_reference<>())
77  // ---
78  .def("SetLogicalVolume", &G4VPhysicalVolume::SetLogicalVolume)
79  .def("SetMotherLogical", &G4VPhysicalVolume::SetMotherLogical)
80  .def("GetLogicalVolume", &G4VPhysicalVolume::GetLogicalVolume,
81  return_internal_reference<>())
82  .def("GetMotherLogical", &G4VPhysicalVolume::GetMotherLogical,
83  return_internal_reference<>())
84  // ---
85  .def("SetName", &G4VPhysicalVolume::SetName)
86 #if G4VERSION_NUMBER <= 801
87  .def("GetName", &G4VPhysicalVolume::GetName)
88 #else
89  .def("GetName", &G4VPhysicalVolume::GetName,
90  return_value_policy<return_by_value>())
91 #endif
92  .def("SetCopyNo", &G4VPhysicalVolume::SetCopyNo)
93  .def("GetCopyNo", &G4VPhysicalVolume::GetCopyNo)
94  // ---
95  .def("IsMany", &G4VPhysicalVolume::IsMany)
96  .def("IsReplicated", &G4VPhysicalVolume::IsReplicated)
97  .def("IsParameterised", &G4VPhysicalVolume::IsParameterised)
98  .def("GetMultiplicity", &G4VPhysicalVolume::GetMultiplicity)
99  .def("GetParameterisation", &G4VPhysicalVolume::GetParameterisation,
100  return_value_policy<reference_existing_object>())
101  ;
102 }
103 
const G4ThreeVector & GetTranslation() const
const G4RotationMatrix *(G4VPhysicalVolume::* f1_GetRotation)() const
CLHEP::HepRotation G4RotationMatrix
virtual G4bool IsReplicated() const =0
void SetName(const G4String &pName)
void SetRotation(G4RotationMatrix *)
const G4RotationMatrix * GetFrameRotation() const
const G4String & GetName() const
virtual G4bool IsMany() const =0
virtual G4VPVParameterisation * GetParameterisation() const =0
virtual void SetCopyNo(G4int CopyNo)=0
G4RotationMatrix GetObjectRotationValue() const
void SetTranslation(const G4ThreeVector &v)
void export_G4VPhysicalVolume()
G4LogicalVolume * GetMotherLogical() const
virtual G4bool IsParameterised() const =0
G4LogicalVolume * GetLogicalVolume() const
virtual G4int GetCopyNo() const =0
const G4RotationMatrix * GetRotation() const
virtual G4int GetMultiplicity() const
void SetMotherLogical(G4LogicalVolume *pMother)
G4ThreeVector GetObjectTranslation() const
G4RotationMatrix *(G4VPhysicalVolume::* f2_GetRotation)()
void SetLogicalVolume(G4LogicalVolume *pLogical)