G4BREPSolidOpenPCone Class Reference

#include <G4BREPSolidOpenPCone.hh>

Inheritance diagram for G4BREPSolidOpenPCone:

G4IntersectionSolid G4BooleanSolid G4VSolid

Public Member Functions

 G4BREPSolidOpenPCone (const G4String &name, G4double start_angle, G4double opening_angle, G4int num_z_planes, G4double z_start, G4double z_values[], G4double RMIN[], G4double RMAX[])
 ~G4BREPSolidOpenPCone ()
void DescribeYourselfTo (G4VGraphicsScene &scene) const
G4VSolidClone () const
std::ostream & StreamInfo (std::ostream &os) const
 G4BREPSolidOpenPCone (__void__ &)
 G4BREPSolidOpenPCone (const G4BREPSolidOpenPCone &rhs)
G4BREPSolidOpenPConeoperator= (const G4BREPSolidOpenPCone &rhs)

Data Structures

struct  G4BREPOpenPConeParams

Detailed Description

Definition at line 53 of file G4BREPSolidOpenPCone.hh.


Constructor & Destructor Documentation

G4BREPSolidOpenPCone::G4BREPSolidOpenPCone ( const G4String name,
G4double  start_angle,
G4double  opening_angle,
G4int  num_z_planes,
G4double  z_start,
G4double  z_values[],
G4double  RMIN[],
G4double  RMAX[] 
)

Definition at line 42 of file G4BREPSolidOpenPCone.cc.

Referenced by Clone().

00050  : G4IntersectionSolid ( name,
00051                          new G4BREPSolidPCone( name,
00052                                                sangle, oangle, 
00053                                                nplanes, zstart, zvalues,
00054                                                radmin, radmax ),
00055                          new G4Tubs( "IntersectionTubs",
00056                                      0., 1., 1., sangle, oangle ) )
00057 {
00058   // Save local data
00059   //
00060   constructorParams.start_angle = sangle;
00061   constructorParams.opening_angle = oangle;
00062   constructorParams.num_z_planes = nplanes;
00063   constructorParams.z_start = zstart;
00064   constructorParams.z_values = 0;
00065   constructorParams.RMIN     = 0;
00066   constructorParams.RMAX     = 0;
00067   if ( nplanes>0 )
00068   {
00069     constructorParams.z_values = new G4double[nplanes];
00070     constructorParams.RMIN     = new G4double[nplanes];
00071     constructorParams.RMAX     = new G4double[nplanes];
00072     for ( G4int i = 0; i < nplanes; ++i )
00073     { 
00074       constructorParams.z_values[i] = zvalues[i];
00075       constructorParams.RMIN[i] = radmin[i];
00076       constructorParams.RMAX[i] = radmax[i];
00077     }
00078   }
00079 
00080   // compute max radius
00081   //
00082   InitializeOPCone();
00083 }

G4BREPSolidOpenPCone::~G4BREPSolidOpenPCone (  ) 

Definition at line 97 of file G4BREPSolidOpenPCone.cc.

00098 {
00099   if( constructorParams.num_z_planes > 0 )
00100   {
00101     delete [] constructorParams.z_values;
00102     delete [] constructorParams.RMIN;
00103     delete [] constructorParams.RMAX;
00104   }
00105 }

G4BREPSolidOpenPCone::G4BREPSolidOpenPCone ( __void__ &   ) 

Definition at line 85 of file G4BREPSolidOpenPCone.cc.

00086   : G4IntersectionSolid(a)
00087 {
00088   constructorParams.start_angle    = 0.;
00089   constructorParams.opening_angle  = 0.;
00090   constructorParams.num_z_planes   = 0;
00091   constructorParams.z_start        = 0.;
00092   constructorParams.z_values = 0;
00093   constructorParams.RMIN = 0;
00094   constructorParams.RMAX = 0;
00095 }

G4BREPSolidOpenPCone::G4BREPSolidOpenPCone ( const G4BREPSolidOpenPCone rhs  ) 

Definition at line 107 of file G4BREPSolidOpenPCone.cc.

References constructorParams, G4VSolid::GetName(), and G4VSolid::SetName().

00108   : G4IntersectionSolid ( rhs.GetName(),
00109     new G4BREPSolidPCone( rhs.GetName(), rhs.constructorParams.start_angle,
00110                           rhs.constructorParams.opening_angle, 
00111                           rhs.constructorParams.num_z_planes,
00112                           rhs.constructorParams.z_start,
00113                           rhs.constructorParams.z_values,
00114                           rhs.constructorParams.RMIN,
00115                           rhs.constructorParams.RMAX ),
00116     new G4Tubs( "IntersectionTubs", 0., 1., 1.,
00117                 rhs.constructorParams.start_angle,
00118                 rhs.constructorParams.opening_angle ) )
00119 
00120 {
00121   SetName(rhs.GetName());
00122   constructorParams.start_angle = rhs.constructorParams.start_angle;
00123   constructorParams.opening_angle = rhs.constructorParams.opening_angle;
00124   constructorParams.num_z_planes = rhs.constructorParams.num_z_planes;
00125   constructorParams.z_start = rhs.constructorParams.z_start;
00126   constructorParams.z_values = 0;
00127   constructorParams.RMIN     = 0;
00128   constructorParams.RMAX     = 0;
00129   G4int nplanes = constructorParams.num_z_planes;
00130   if( nplanes > 0 )
00131   {
00132     constructorParams.z_values = new G4double[nplanes];
00133     constructorParams.RMIN     = new G4double[nplanes];
00134     constructorParams.RMAX     = new G4double[nplanes];
00135     for ( G4int i = 0; i < nplanes; ++i )
00136     { 
00137       constructorParams.z_values[i] = rhs.constructorParams.z_values[i];
00138       constructorParams.RMIN[i] = rhs.constructorParams.RMIN[i];
00139       constructorParams.RMAX[i] = rhs.constructorParams.RMAX[i];
00140     }
00141   }
00142   InitializeOPCone();
00143 }


Member Function Documentation

G4VSolid * G4BREPSolidOpenPCone::Clone (  )  const [virtual]

Reimplemented from G4IntersectionSolid.

Definition at line 204 of file G4BREPSolidOpenPCone.cc.

References G4BREPSolidOpenPCone().

00205 {
00206   return new G4BREPSolidOpenPCone(*this);
00207 }

void G4BREPSolidOpenPCone::DescribeYourselfTo ( G4VGraphicsScene scene  )  const [virtual]

Reimplemented from G4IntersectionSolid.

Definition at line 199 of file G4BREPSolidOpenPCone.cc.

References G4VGraphicsScene::AddSolid().

00200 {
00201   scene.AddSolid ( *this );
00202 }

G4BREPSolidOpenPCone & G4BREPSolidOpenPCone::operator= ( const G4BREPSolidOpenPCone rhs  ) 

Definition at line 146 of file G4BREPSolidOpenPCone.cc.

References constructorParams, G4VSolid::GetName(), G4IntersectionSolid::operator=(), and G4VSolid::SetName().

00147 {
00148   // Check assignment to self
00149   //
00150   if (this == &rhs)  { return *this; }
00151 
00152   // Copy base class data
00153   //
00154   G4IntersectionSolid::operator=(rhs);
00155 
00156   // Copy data
00157   //
00158   SetName(rhs.GetName());
00159   constructorParams.start_angle = rhs.constructorParams.start_angle;
00160   constructorParams.opening_angle = rhs.constructorParams.opening_angle;
00161   constructorParams.num_z_planes = rhs.constructorParams.num_z_planes;
00162   constructorParams.z_start = rhs.constructorParams.z_start;
00163   G4int nplanes = constructorParams.num_z_planes;
00164   if( nplanes > 0 )
00165   {
00166     delete [] constructorParams.z_values;
00167     delete [] constructorParams.RMIN;
00168     delete [] constructorParams.RMAX;
00169     constructorParams.z_values = new G4double[nplanes];
00170     constructorParams.RMIN     = new G4double[nplanes];
00171     constructorParams.RMAX     = new G4double[nplanes];
00172     for( G4int idx = 0; idx < nplanes; ++idx )
00173     {
00174       constructorParams.z_values[idx] = rhs.constructorParams.z_values[idx];
00175       constructorParams.RMIN[idx]     = rhs.constructorParams.RMIN[idx];
00176       constructorParams.RMAX[idx]     = rhs.constructorParams.RMAX[idx];      
00177     }
00178   }
00179   InitializeOPCone();
00180 
00181   return *this;
00182 }  

std::ostream & G4BREPSolidOpenPCone::StreamInfo ( std::ostream &  os  )  const [virtual]

Reimplemented from G4BooleanSolid.

Definition at line 209 of file G4BREPSolidOpenPCone.cc.

References G4BooleanSolid::StreamInfo().

00210 {  
00211   // Streams solid contents to output stream.
00212 
00213   G4IntersectionSolid::StreamInfo( os );
00214 
00215   return os;
00216 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:34 2013 for Geant4 by  doxygen 1.4.7