G4PolyhedronArbitrary.hh

Go to the documentation of this file.
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 and of QinetiQ Ltd,   *
00020 // * subject to DEFCON 705 IPR conditions.                            *
00021 // * By using,  copying,  modifying or  distributing the software (or *
00022 // * any work based  on the software)  you  agree  to acknowledge its *
00023 // * use  in  resulting  scientific  publications,  and indicate your *
00024 // * acceptance of all terms of the Geant4 Software license.          *
00025 // ********************************************************************
00026 //
00027 //
00028 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00029 //
00030 // MODULE:              G4PolyhedronArbitrary.hh
00031 //
00032 // Date:                15/06/2005
00033 // Author:              P R Truscott
00034 // Organisation:        QinetiQ Ltd, UK
00035 // Customer:            UK Ministry of Defence : RAO CRP TD Electronic Systems
00036 // Contract:            C/MAT/N03517
00037 //
00038 // This software is the intelectual property of QinetiQ Ltd, subject
00039 // DEFCON 705 IPR conditions.
00040 //
00041 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00042 //
00043 // CHANGE HISTORY
00044 // --------------
00045 //
00046 // 11th November 2011, J Allison.  Added private copy constructor and
00047 //    assignment operator added to satisfy Coverity.
00048 // 27th July 2011, J Allison.  Added SetReferences and InvertFacets.
00049 //   SetReferences is necessary at the end to complete the polyhedron.
00050 //   It particularly matters if the polyhedron suffers subsequent
00051 //   boolean operations.
00052 //   InvertFacets can be useful.
00053 // 13 January 2006, J Allison.  Removed unnecessary operator= functions.
00054 // 31 October 2004, P R Truscott, QinetiQ Ltd, UK
00055 // Created.
00056 //
00057 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
00058 //
00059 // DESCRIPTION
00060 // -----------
00061 //
00062 //
00063 //
00065 //
00066 //
00067 #ifndef G4PolyhedronArbitrary_h
00068 #define G4PolyhedronArbitrary_h 1
00069 
00070 #include "G4Polyhedron.hh"
00071 #include "G4ThreeVector.hh"
00072 
00074 //
00075 class G4PolyhedronArbitrary : public G4Polyhedron
00076 {
00077   public:
00078     G4PolyhedronArbitrary (const G4int nVertices, const G4int nFacets);
00079     virtual ~G4PolyhedronArbitrary ();
00080     
00081     void AddVertex (const G4ThreeVector v);
00082     void AddFacet (const G4int iv1, const G4int iv2, const G4int iv3,
00083       const G4int iv4=0);
00084     
00085     // Call this after all vertices and facets have been added.
00086     void SetReferences() {HepPolyhedron::SetReferences();}
00087 
00088     // Can be useful.
00089     void InvertFacets() {HepPolyhedron::InvertFacets();}
00090 
00091   protected:
00092     G4int nVertexCount;
00093     G4int nFacetCount;
00094 
00095   private:
00096     // Private copy constructor and assignment operator added to satisfy
00097     // Coverity - JA 11/11/11.
00098     G4PolyhedronArbitrary(const G4PolyhedronArbitrary&);
00099     G4PolyhedronArbitrary& operator= (const G4PolyhedronArbitrary&);
00100 };
00101 #endif
00103 //
00104 

Generated on Mon May 27 17:49:24 2013 for Geant4 by  doxygen 1.4.7