File indexing completed on 2026-09-11 09:12:18
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 inline
0032 G4double G4VoxelLimits::GetMaxXExtent() const
0033 {
0034 return fxAxisMax;
0035 }
0036
0037 inline
0038 G4double G4VoxelLimits::GetMaxYExtent() const
0039 {
0040 return fyAxisMax;
0041 }
0042
0043 inline
0044 G4double G4VoxelLimits::GetMaxZExtent() const
0045 {
0046 return fzAxisMax;
0047 }
0048
0049 inline
0050 G4double G4VoxelLimits::GetMinXExtent() const
0051 {
0052 return fxAxisMin;
0053 }
0054
0055 inline
0056 G4double G4VoxelLimits::GetMinYExtent() const
0057 {
0058 return fyAxisMin;
0059 }
0060
0061 inline
0062 G4double G4VoxelLimits::GetMinZExtent() const
0063 {
0064 return fzAxisMin;
0065 }
0066
0067 inline
0068 G4double G4VoxelLimits::GetMaxExtent(const EAxis pAxis) const
0069 {
0070 if (pAxis==kXAxis)
0071 {
0072 return GetMaxXExtent();
0073 }
0074 if (pAxis==kYAxis)
0075 {
0076 return GetMaxYExtent();
0077 }
0078 assert(pAxis==kZAxis);
0079 return GetMaxZExtent();
0080 }
0081
0082 inline
0083 G4double G4VoxelLimits::GetMinExtent(const EAxis pAxis) const
0084 {
0085 if (pAxis==kXAxis)
0086 {
0087 return GetMinXExtent();
0088 }
0089 if (pAxis==kYAxis)
0090 {
0091 return GetMinYExtent();
0092 }
0093 assert(pAxis==kZAxis);
0094 return GetMinZExtent();
0095 }
0096
0097 inline
0098 G4bool G4VoxelLimits::IsXLimited() const
0099 {
0100 return fxAxisMin!=-kInfinity||fxAxisMax!=kInfinity;
0101 }
0102
0103 inline
0104 G4bool G4VoxelLimits::IsYLimited() const
0105 {
0106 return fyAxisMin!=-kInfinity||fyAxisMax!=kInfinity;
0107 }
0108
0109 inline
0110 G4bool G4VoxelLimits::IsZLimited() const
0111 {
0112 return fzAxisMin!=-kInfinity||fzAxisMax!=kInfinity;
0113 }
0114
0115 inline
0116 G4bool G4VoxelLimits::IsLimited() const
0117 {
0118 return (IsXLimited()||IsYLimited()||IsZLimited());
0119 }
0120
0121 inline
0122 G4bool G4VoxelLimits::IsLimited(const EAxis pAxis) const
0123 {
0124 if (pAxis==kXAxis)
0125 {
0126 return IsXLimited();
0127 }
0128 if (pAxis==kYAxis)
0129 {
0130 return IsYLimited();
0131 }
0132 assert(pAxis==kZAxis);
0133 return IsZLimited();
0134 }
0135
0136 inline
0137 G4bool G4VoxelLimits::Inside(const G4ThreeVector& pVec) const
0138 {
0139 return (GetMinXExtent()<=pVec.x()) &&
0140 (GetMaxXExtent()>=pVec.x()) &&
0141 (GetMinYExtent()<=pVec.y()) &&
0142 (GetMaxYExtent()>=pVec.y()) &&
0143 (GetMinZExtent()<=pVec.z()) &&
0144 (GetMaxZExtent()>=pVec.z());
0145 }