32 Vector3DInt32((std::numeric_limits<int32_t>::min)(), (std::numeric_limits<int32_t>::min)(), (std::numeric_limits<int32_t>::min)()),
33 Vector3DInt32((std::numeric_limits<int32_t>::max)(), (std::numeric_limits<int32_t>::max)(), (std::numeric_limits<int32_t>::max)())
38 :m_v3dLowerCorner(0,0,0)
39 ,m_v3dUpperCorner(0,0,0)
44 :m_v3dLowerCorner(v3dLowerCorner)
45 ,m_v3dUpperCorner(v3dUpperCorner)
48 assert(m_v3dUpperCorner.
getX() >= m_v3dLowerCorner.
getX());
49 assert(m_v3dUpperCorner.
getY() >= m_v3dLowerCorner.
getY());
50 assert(m_v3dUpperCorner.
getZ() >= m_v3dLowerCorner.
getZ());
54 :m_v3dLowerCorner(iLowerX, iLowerY, iLowerZ)
55 ,m_v3dUpperCorner(iUpperX, iUpperY, iUpperZ)
58 assert(m_v3dUpperCorner.
getX() >= m_v3dLowerCorner.
getX());
59 assert(m_v3dUpperCorner.
getY() >= m_v3dLowerCorner.
getY());
60 assert(m_v3dUpperCorner.
getZ() >= m_v3dLowerCorner.
getZ());
71 return ((m_v3dLowerCorner == rhs.m_v3dLowerCorner) && (m_v3dUpperCorner == rhs.m_v3dUpperCorner));
82 return !(*
this == rhs);
87 return m_v3dLowerCorner;
92 return m_v3dUpperCorner;
117 return m_v3dUpperCorner.
getX() - m_v3dLowerCorner.
getX();
122 return m_v3dUpperCorner.
getY() - m_v3dLowerCorner.
getY();
127 return m_v3dUpperCorner - m_v3dLowerCorner;
132 return m_v3dUpperCorner.
getZ() - m_v3dLowerCorner.
getZ();
137 m_v3dLowerCorner = v3dLowerCorner;
142 m_v3dUpperCorner = v3dUpperCorner;
147 return (pos.
getX() <= m_v3dUpperCorner.
getX() - boundary)
148 && (pos.
getY() <= m_v3dUpperCorner.
getY() - boundary)
149 && (pos.
getZ() <= m_v3dUpperCorner.
getZ() - boundary)
150 && (pos.
getX() >= m_v3dLowerCorner.
getX() + boundary)
151 && (pos.
getY() >= m_v3dLowerCorner.
getY() + boundary)
152 && (pos.
getZ() >= m_v3dLowerCorner.
getZ() + boundary);
157 return (pos.
getX() <= m_v3dUpperCorner.
getX() - boundary)
158 && (pos.
getY() <= m_v3dUpperCorner.
getY() - boundary)
159 && (pos.
getZ() <= m_v3dUpperCorner.
getZ() - boundary)
160 && (pos.
getX() >= m_v3dLowerCorner.
getX() + boundary)
161 && (pos.
getY() >= m_v3dLowerCorner.
getY() + boundary)
162 && (pos.
getZ() >= m_v3dLowerCorner.
getZ() + boundary);
167 return (pos <= m_v3dUpperCorner.
getX() - boundary)
168 && (pos >= m_v3dLowerCorner.
getX() + boundary);
173 return (pos <= m_v3dUpperCorner.
getX() - boundary)
174 && (pos >= m_v3dLowerCorner.
getX() + boundary);
179 return (pos <= m_v3dUpperCorner.
getY() - boundary)
180 && (pos >= m_v3dLowerCorner.
getY() + boundary);
185 return (pos <= m_v3dUpperCorner.
getY() - boundary)
186 && (pos >= m_v3dLowerCorner.
getY() + boundary);
191 return (pos <= m_v3dUpperCorner.
getZ() - boundary)
192 && (pos >= m_v3dLowerCorner.
getZ() + boundary);
197 return (pos <= m_v3dUpperCorner.
getZ() - boundary)
198 && (pos >= m_v3dLowerCorner.
getZ() + boundary);
203 m_v3dLowerCorner.
setX((std::max)(m_v3dLowerCorner.
getX(), other.m_v3dLowerCorner.
getX()));
204 m_v3dLowerCorner.
setY((std::max)(m_v3dLowerCorner.
getY(), other.m_v3dLowerCorner.
getY()));
205 m_v3dLowerCorner.
setZ((std::max)(m_v3dLowerCorner.
getZ(), other.m_v3dLowerCorner.
getZ()));
206 m_v3dUpperCorner.
setX((std::min)(m_v3dUpperCorner.
getX(), other.m_v3dUpperCorner.
getX()));
207 m_v3dUpperCorner.
setY((std::min)(m_v3dUpperCorner.
getY(), other.m_v3dUpperCorner.
getY()));
208 m_v3dUpperCorner.
setZ((std::min)(m_v3dUpperCorner.
getZ(), other.m_v3dUpperCorner.
getZ()));
212 int32_t Region::depth(
void)
const
216 return m_v3dUpperCorner.
getZ() - m_v3dLowerCorner.
getZ();
220 int32_t Region::height(
void)
const
224 return m_v3dUpperCorner.
getY() - m_v3dLowerCorner.
getY();
229 m_v3dLowerCorner += amount;
230 m_v3dUpperCorner += amount;
235 m_v3dLowerCorner += amount;
240 m_v3dUpperCorner += amount;
248 return m_v3dUpperCorner - m_v3dLowerCorner;
252 int32_t Region::width(
void)
const
256 return m_v3dUpperCorner.
getX() - m_v3dLowerCorner.
getX();