source: trunk/source/geometry/solids/BREPS/src/G4BREPSolidOpenPCone.cc

Last change on this file was 1337, checked in by garnier, 15 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 4.0 KB
Line 
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//
27// $Id: G4BREPSolidOpenPCone.cc,v 1.11 2006/06/29 18:41:21 gunter Exp $
28// GEANT4 tag $Name: geant4-09-04-beta-01 $
29//
30// ----------------------------------------------------------------------
31// GEANT 4 class source file
32//
33// G4BREPSolidOpenPCone.cc
34//
35// ----------------------------------------------------------------------
36
37#include "G4BREPSolidOpenPCone.hh"
38#include "G4BREPSolidPCone.hh"
39#include "G4Tubs.hh"
40#include "G4VGraphicsScene.hh"
41
42G4BREPSolidOpenPCone::G4BREPSolidOpenPCone
43 (const G4String& name,
44 G4double start_angle,
45 G4double opening_angle,
46 G4int num_z_planes, // sections,
47 G4double z_start,
48 G4double z_values[],
49 G4double RMIN[],
50 G4double RMAX[]
51 )
52 : G4IntersectionSolid ( name,
53 new G4BREPSolidPCone( name,
54 start_angle, opening_angle,
55 num_z_planes, z_start, z_values,
56 RMIN, RMAX
57 ),
58 new G4Tubs( "IntersectionTubs",
59 0., 1., 1., start_angle, opening_angle
60 )
61 )
62 //, constructorParams.z_values( 0 ), constructorParams.RMIN( 0 ), constructorParams.RMAX( 0 )
63{
64
65// compute max radius
66
67 G4double MaxRMAX = 0;
68 for ( int i = 0; i < num_z_planes; i++ )
69 if ( RMAX[i] > MaxRMAX ) MaxRMAX = RMAX[i];
70
71 G4double length = z_values[num_z_planes-1] - z_values[0];
72
73 ((G4Tubs*)fPtrSolidB)->SetOuterRadius ( MaxRMAX );
74 ((G4Tubs*)fPtrSolidB)->SetZHalfLength ( length );
75
76}
77
78G4BREPSolidOpenPCone::G4BREPSolidOpenPCone( __void__& a )
79 : G4IntersectionSolid(a)
80{
81}
82
83G4BREPSolidOpenPCone::~G4BREPSolidOpenPCone()
84{
85}
86
87void G4BREPSolidOpenPCone::DescribeYourselfTo (G4VGraphicsScene& scene) const
88{
89 scene.AddSolid ( *this );
90}
91
92// Streams solid contents to output stream.
93std::ostream& G4BREPSolidOpenPCone::StreamInfo(std::ostream& os) const
94{
95 G4IntersectionSolid::StreamInfo( os );
96
97 return os;
98}
99
Note: See TracBrowser for help on using the repository browser.