Files
geant4/source/geometry/solids/specific/include/G4SolidExtentList.hh
T
2016-06-08 16:03:00 +02:00

65 lines
1.6 KiB
C++

// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4SolidExtentList.hh,v 1.3 2000/11/02 16:54:49 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-01 $
//
//
// --------------------------------------------------------------------
// GEANT 4 class header file
//
//
// G4SolidExtentList
//
// Class description:
//
// Defines a list of (voxel) extents along one axis.
//
// This utility class is designed for one specific purpose:
// to calculate the extent of a CSG solid for a voxel
// (G4VSolid::CalculateExtent).
// Author:
// David C. Williams (davidw@scipp.ucsc.edu)
// --------------------------------------------------------------------
#ifndef G4SolidExtentList_hh
#define G4SolidExtentList_hh
#include "globals.hh"
#include "G4ClippablePolygon.hh"
class G4SolidExtentList
{
public:
G4SolidExtentList();
G4SolidExtentList( const EAxis targetAxis, const G4VoxelLimits &voxelLimits );
~G4SolidExtentList();
void AddSurface( const G4ClippablePolygon &surface );
G4bool GetExtent( G4double &min, G4double &max ) const;
protected:
EAxis axis; // Target axis
G4bool limited; // True if limited
G4double minLimit; // ... min limit
G4double maxLimit; // ... max limit
G4ClippablePolygon minSurface, // Minimum surface within limits
maxSurface, // Maximum
minAbove, // Minimum surface totally above max limit
maxBelow; // Maximum surface totally below min limit
};
#endif