Import Geant4 9.1.0 source tree
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: pyG4Trap.cc,v 1.4 2006/06/29 15:32:39 gunter Exp $
|
||||
// $Name: geant4-09-00 $
|
||||
// $Id: pyG4Trap.cc,v 1.6 2007/07/13 04:57:50 kmura Exp $
|
||||
// $Name: geant4-09-01 $
|
||||
// ====================================================================
|
||||
// pyG4Trap.cc
|
||||
//
|
||||
@@ -35,6 +35,68 @@
|
||||
|
||||
using namespace boost::python;
|
||||
|
||||
// ====================================================================
|
||||
// wrappers
|
||||
// ====================================================================
|
||||
namespace pyG4Trap {
|
||||
|
||||
G4Trap* f1_CreateTrap(const G4String& name)
|
||||
{
|
||||
return new G4Trap(name);
|
||||
}
|
||||
|
||||
|
||||
G4Trap* f2_CreateTrap(const G4String& name, G4double pDz,
|
||||
G4double pTheta, G4double pPhi,
|
||||
G4double pDy1, G4double pDx1, G4double pDx2,
|
||||
G4double pAlp1,
|
||||
G4double pDy2, G4double pDx3, G4double pDx4,
|
||||
G4double pAlp2)
|
||||
{
|
||||
return new G4Trap(name, pDz, pTheta, pPhi,
|
||||
pDy1, pDx1, pDx2, pAlp1,
|
||||
pDy2, pDx3, pDx4, pAlp2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
G4Trap* f3_CreateTrap(const G4String& name,
|
||||
const std::vector<G4ThreeVector>& pt)
|
||||
{
|
||||
G4ThreeVector ptlist[8];
|
||||
for (G4int i=0; i<8; i++) {
|
||||
ptlist[i]= pt[i];
|
||||
}
|
||||
|
||||
return new G4Trap(name, ptlist);
|
||||
}
|
||||
|
||||
|
||||
G4Trap* f4_CreateTrap(const G4String& name, G4double pZ,
|
||||
G4double pY, G4double pX, G4double pLTX)
|
||||
{
|
||||
return new G4Trap(name, pZ, pY, pX, pLTX);
|
||||
}
|
||||
|
||||
|
||||
G4Trap* f5_CreateTrap(const G4String& name, G4double pDx1, G4double pDx2,
|
||||
G4double pDy1, G4double pDy2, G4double pDz)
|
||||
{
|
||||
return new G4Trap(name, pDx1, pDx2, pDy1, pDy2, pDz);
|
||||
}
|
||||
|
||||
|
||||
G4Trap* f6_CreateTrap(const G4String& name, G4double pDx, G4double pDy,
|
||||
G4double pDz,
|
||||
G4double pAlpha, G4double pTheta, G4double pPhi )
|
||||
{
|
||||
return new G4Trap(name, pDx, pDy, pDz, pAlpha, pTheta, pPhi);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
using namespace pyG4Trap;
|
||||
|
||||
// ====================================================================
|
||||
// module definition
|
||||
// ====================================================================
|
||||
@@ -65,8 +127,17 @@ void export_G4Trap()
|
||||
.def("GetSidePlane", &G4Trap::GetSidePlane)
|
||||
.def("GetSymAxis", &G4Trap::GetSymAxis)
|
||||
.def("SetAllParameters", &G4Trap::SetAllParameters)
|
||||
.def("GetCubicVolume", &G4Trap::GetCubicVolume)
|
||||
// operators
|
||||
.def(self_ns::str(self))
|
||||
;
|
||||
|
||||
// Create solid
|
||||
def("CreateTrap", f1_CreateTrap, return_value_policy<manage_new_object>());
|
||||
def("CreateTrap", f2_CreateTrap, return_value_policy<manage_new_object>());
|
||||
def("CreateTrap", f3_CreateTrap, return_value_policy<manage_new_object>());
|
||||
def("CreateTrap", f4_CreateTrap, return_value_policy<manage_new_object>());
|
||||
def("CreateTrap", f5_CreateTrap, return_value_policy<manage_new_object>());
|
||||
def("CreateTrap", f6_CreateTrap, return_value_policy<manage_new_object>());
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user