G4GenericTrap.icc

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.                      *
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: G4GenericTrap.icc 67011 2013-01-29 16:17:41Z gcosmo $
00028 //
00029 // --------------------------------------------------------------------
00030 // GEANT 4 inline definitions file
00031 //
00032 // G4GenericTrap.icc
00033 //
00034 // Implementation of inline methods of G4GenericTrap
00035 // --------------------------------------------------------------------
00036 
00037 inline 
00038 G4double G4GenericTrap::GetZHalfLength() const
00039 {
00040   return fDz;
00041 }
00042 
00043 // --------------------------------------------------------------------
00044 
00045 inline 
00046 G4int G4GenericTrap::GetNofVertices() const
00047 {
00048   return fVertices.size();
00049 }  
00050 
00051 // --------------------------------------------------------------------
00052 
00053 inline
00054 G4TwoVector G4GenericTrap::GetVertex(G4int index) const
00055 {
00056   if ( index<0 || index >= G4int(fVertices.size()) )
00057   {
00058     G4Exception ("G4GenericTrap::GetVertex()", "GeomSolids0003",
00059                  FatalException, "Index outside range.");
00060     return G4TwoVector();
00061   }
00062   return fVertices[index];
00063 }  
00064 
00065 // --------------------------------------------------------------------
00066 
00067 inline 
00068 const std::vector<G4TwoVector>& G4GenericTrap::GetVertices() const
00069 {
00070   return fVertices;
00071 }  
00072 
00073 // --------------------------------------------------------------------
00074 
00075 inline 
00076 G4double G4GenericTrap::GetTwistAngle(G4int index) const
00077 {
00078   if ( (index<0) || (index >= G4int(fVertices.size())) )
00079   {
00080     G4Exception ("G4GenericTrap::GetTwistAngle()", "GeomSolids0003",
00081                  FatalException, "Index outside range.");
00082     return 0.;
00083   }
00084   return fTwist[index];
00085 }
00086 
00087 // --------------------------------------------------------------------
00088 
00089 inline
00090 G4bool G4GenericTrap::IsTwisted() const
00091 {
00092   return fIsTwisted;
00093 }
00094 
00095 // --------------------------------------------------------------------
00096 
00097 inline
00098 void G4GenericTrap::SetTwistAngle(G4int index, G4double twist)
00099 {
00100   if ( (index<0) || (index >= G4int(fVertices.size())) )
00101   {
00102     G4Exception ("G4GenericTrap::SetTwistAngle()", "GeomSolids0003",
00103                  FatalException, "Index outside range.");
00104   }
00105   else
00106   {
00107     fTwist[index]=twist;
00108   }
00109 }
00110 
00111 // --------------------------------------------------------------------
00112 
00113 inline
00114 G4int G4GenericTrap::GetVisSubdivisions()const
00115 {
00116   return fVisSubdivisions;
00117 }
00118 
00119 // --------------------------------------------------------------------
00120 
00121 inline
00122 void G4GenericTrap::SetVisSubdivisions(G4int subdiv)
00123 {
00124   fVisSubdivisions=subdiv;
00125 }
00126 
00127 // --------------------------------------------------------------------
00128 
00129 inline
00130 G4ThreeVector G4GenericTrap::GetMinimumBBox() const
00131 {
00132   return fMinBBoxVector;
00133 }
00134 
00135 // --------------------------------------------------------------------
00136 
00137 inline
00138 G4ThreeVector G4GenericTrap::GetMaximumBBox() const
00139 {
00140   return fMaxBBoxVector;
00141 }
00142 
00143 // --------------------------------------------------------------------
00144 

Generated on Mon May 27 17:48:21 2013 for Geant4 by  doxygen 1.4.7