// // ******************************************************************** // * DISCLAIMER * // * * // * The following disclaimer summarizes all the specific disclaimers * // * of contributors to this software. The specific disclaimers,which * // * govern, are listed with their locations in: * // * http://cern.ch/geant4/license * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. * // * * // * 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: G4VoxelLimits.icc,v 1.1.4.1 2001/06/28 19:08:29 gunter Exp $ // GEANT4 tag $Name: $ // // // G4VoxelLimits Inline implementation // inline G4double G4VoxelLimits::GetMaxXExtent() const { return fxAxisMax; } inline G4double G4VoxelLimits::GetMaxYExtent() const { return fyAxisMax; } inline G4double G4VoxelLimits::GetMaxZExtent() const { return fzAxisMax; } inline G4double G4VoxelLimits::GetMinXExtent() const { return fxAxisMin; } inline G4double G4VoxelLimits::GetMinYExtent() const { return fyAxisMin; } inline G4double G4VoxelLimits::GetMinZExtent() const { return fzAxisMin; } inline G4double G4VoxelLimits::GetMaxExtent(const EAxis pAxis) const { if (pAxis==kXAxis) { return GetMaxXExtent(); } else if (pAxis==kYAxis) { return GetMaxYExtent(); } else { assert(pAxis==kZAxis); return GetMaxZExtent(); } } inline G4double G4VoxelLimits::GetMinExtent(const EAxis pAxis) const { if (pAxis==kXAxis) { return GetMinXExtent(); } else if (pAxis==kYAxis) { return GetMinYExtent(); } else { assert(pAxis==kZAxis); return GetMinZExtent(); } } inline G4bool G4VoxelLimits::IsXLimited() const { return (fxAxisMin==-kInfinity&&fxAxisMax==kInfinity) ? false : true; } inline G4bool G4VoxelLimits::IsYLimited() const { return (fyAxisMin==-kInfinity&&fyAxisMax==kInfinity) ? false : true; } inline G4bool G4VoxelLimits::IsZLimited() const { return (fzAxisMin==-kInfinity&&fzAxisMax==kInfinity) ? false : true; } inline G4bool G4VoxelLimits::IsLimited() const { return (IsXLimited()||IsYLimited()||IsZLimited()); } inline G4bool G4VoxelLimits::IsLimited(const EAxis pAxis) const { if (pAxis==kXAxis) { return IsXLimited(); } else if (pAxis==kYAxis) { return IsYLimited(); } else { assert(pAxis==kZAxis); return IsZLimited(); } } inline G4bool G4VoxelLimits::Inside(const G4ThreeVector& pVec) const { return ((GetMinXExtent()<=pVec.x()) && (GetMaxXExtent()>=pVec.x()) && (GetMinYExtent()<=pVec.y()) && (GetMaxYExtent()>=pVec.y()) && (GetMinZExtent()<=pVec.z()) && (GetMaxZExtent()>=pVec.z()) ) ? true : false; }