00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // $Id$ 00028 // 00029 // 00030 // class G4DrawVoxels 00031 // 00032 // Class description: 00033 // 00034 // Utility class for the visualization of voxels in the detector geometry. 00035 // Define G4DrawVoxelsDebug in the environment at compilation for debugging 00036 // information printed to G4cout. 00037 00038 // History: 00039 // 03/08/1999 The G4VisAttributes have been made member data for lifetime 00040 // reasons / visualisation - L.G (ask John Allison for further 00041 // explanation). 00042 // 29/07/1999 First comitted version - L.G. 00043 // -------------------------------------------------------------------- 00044 #ifndef G4DrawVoxels_HH 00045 #define G4DrawVoxels_HH 00046 00047 #include "G4VisAttributes.hh" 00048 #include "G4VoxelLimits.hh" 00049 #include "G4PlacedPolyhedron.hh" 00050 00051 class G4SmartVoxelHeader; 00052 class G4LogicalVolume; 00053 00054 // *********************************************************************** 00055 00056 class G4DrawVoxels 00057 { 00058 public: // with description 00059 00060 G4DrawVoxels(); 00061 // Constructor. It initialises the members data to default colors 00062 // Copy constructor and assignment operator not supported (array 00063 // fvoxelcolours ...). 00064 00065 ~G4DrawVoxels(); 00066 // Destructor NOT virtual. Not a base class. 00067 00068 void DrawVoxels(const G4LogicalVolume* lv) const; 00069 G4PlacedPolyhedronList* CreatePlacedPolyhedra(const G4LogicalVolume*) const; 00070 00071 void SetVoxelsVisAttributes(G4VisAttributes&, 00072 G4VisAttributes&, 00073 G4VisAttributes&); 00074 void SetBoundingBoxVisAttributes(G4VisAttributes&); 00075 00076 private: 00077 00078 // Member data 00079 G4VisAttributes fVoxelsVisAttributes[3]; 00080 G4VisAttributes fBoundingBoxVisAttributes; 00081 00082 void ComputeVoxelPolyhedra(const G4LogicalVolume*, 00083 const G4SmartVoxelHeader*, 00084 G4VoxelLimits&, 00085 G4PlacedPolyhedronList*) const; 00086 00087 // Copy constructor Assignment operator not supported 00088 // (array fvoxelcolours ...) 00089 G4DrawVoxels(const G4DrawVoxels&); 00090 G4DrawVoxels operator=(const G4DrawVoxels&); 00091 }; 00092 00093 #endif