Itasca C++ Interface
Loading...
Searching...
No Matches
extent3.h
Go to the documentation of this file.
1#pragma once
8#include "extent2.h"
9
16template <class T> class Extent3 {
17public:
18 // Creators
20#ifdef _DEBUG
21 Extent3() { tx1_ = tx2_ = ty1_ = ty2_ = tz1_ = tz2_ = initVal<T>(); }
22#else
23 Extent3() { }
24#endif
26 Extent3(const T &x1,const T &x2,const T &y1,const T &y2,const T &z1,const T &z2)
27 :tx1_(x1), tx2_(x2), ty1_(y1), ty2_(y2), tz1_(z1), tz2_(z2) { }
29 Extent3(const Vector3<T> &v111,const Vector3<T> &v222)
30 :tx1_(v111.x()), tx2_(v222.x()), ty1_(v111.y()), ty2_(v222.y()), tz1_(v111.z()), tz2_(v222.z()) { }
32 Extent3(const Extent3<T> &r) : tx1_(r.tx1_), tx2_(r.tx2_), ty1_(r.ty1_), ty2_(r.ty2_), tz1_(r.tz1_), tz2_(r.tz2_) { }
33 constexpr const Extent3 &operator=(const Extent3 &e) { tx1_=e.tx1_; tx2_=e.tx2_; ty1_=e.ty1_; ty2_=e.ty2_; tz1_=e.tz1_; tz2_=e.tz2_; return *this; }
35 explicit Extent3(const Extent2<T> &r) : tx1_(r.x1()), tx2_(r.x2()), ty1_(r.y1()), ty2_(r.y2()), tz1_(0), tz2_(1) { }
40 // Accessors
42 const T &x1() const { return tx1_; }
44 const T &x2() const { return tx2_; }
46 const T &y1() const { return ty1_; }
48 const T &y2() const { return ty2_; }
50 const T &z1() const { return tz1_; }
52 const T &z2() const { return tz2_; }
54 const T &dof1(uint32 u) const {
55 assert(u<3);
56 switch (u) {
57 case 1: return ty1_;
58 case 2: return tz1_;
59 }
60 return tx1_;
61 }
63 const T &dof2(uint32 u) const {
64 assert(u<3);
65 switch (u) {
66 case 1: return ty2_;
67 case 2: return tz2_;
68 }
69 return tx2_;
70 }
72 T width() const { return (tx2_-tx1_); }
74 T height() const { return (ty2_-ty1_); }
76 T depth() const { return (tz2_-tz1_); }
78 Vector3<T> centroid() const { Vector3<T> v((tx1_+tx2_)/2,(ty1_+ty2_)/2,(tz1_+tz2_)/2); return v; }
80 T volume() const { return (width()*height()*depth()); }
82 T diagonal() const { return (size().mag()); }
85 Vector3<T> corner(uint32 x,uint32 y,uint32 z) const {
86 if (x) {
87 if (y) { if (z) return c222(); else return c221(); }
88 else { if (z) return c212(); else return c211(); }
89 } else {
90 if (y) { if (z) return c122(); else return c121(); }
91 else { if (z) return c112(); else return c111(); }
92 }
93 }
94
95 // Corner functions - returns the 8 corners of the region.
97 Vector3<T> c111() const { Vector3<T> out(tx1_,ty1_,tz1_); return out; }
99 Vector3<T> c121() const { Vector3<T> out(tx1_,ty2_,tz1_); return out; }
101 Vector3<T> c211() const { Vector3<T> out(tx2_,ty1_,tz1_); return out; }
103 Vector3<T> c221() const { Vector3<T> out(tx2_,ty2_,tz1_); return out; }
105 Vector3<T> c112() const { Vector3<T> out(tx1_,ty1_,tz2_); return out; }
107 Vector3<T> c122() const { Vector3<T> out(tx1_,ty2_,tz2_); return out; }
109 Vector3<T> c212() const { Vector3<T> out(tx2_,ty1_,tz2_); return out; }
111 Vector3<T> c222() const { Vector3<T> out(tx2_,ty2_,tz2_); return out; }
113 Vector3<T> lowerBound() const { return c111(); }
115 Vector3<T> upperBound() const { return c222(); }
117 Vector3<T> size() const { Vector3<T> out(width(),height(),depth()); return out; }
118
119 // Comparison Operators
121 bool isEmpty() const { return ( (tx1_>=tx2_) || (ty1_>=ty2_) || (tz1_>=tz2_) ); }
123 bool tolIsEmpty(const double &tol = limits<double>::epsilon() * 100) const { return ( (tx1_ + tol >= tx2_) || (ty1_ + tol >= ty2_) || (tz1_ + tol >= tz2_) ); }
125 bool operator==(const Extent3<T> &c) const {
126 return( (tx1_==c.tx1_)&&(tx2_==c.tx2_)&&(ty1_==c.ty1_)&&(ty2_==c.ty2_)&&(tz1_==c.tz1_)&&(tz2_==c.tz2_) );
127 }
129 bool operator!=(const Extent3<T> &r) const { return !operator==(r); }
131 bool operator<(const Extent3<T> &c) const { return (volume() < c.volume()); }
133 bool operator>(const Extent3<T> &c) const { return (volume() > c.volume()); }
135 bool isIn(const Vector3<T> &v) const {
136 if ( (v.x()>=tx1_) && (v.x()<=tx2_) && (v.y()>=ty1_) && (v.y()<=ty2_) && (v.z()>=tz1_) && (v.z()<=tz2_) ) return true;
137 return false;
138 }
140 bool isIn(const Extent3<T> &c) const {
141 if ( (c.x1()>=tx1_) && (c.x2()<=tx2_) && (c.y1()>=ty1_) && (c.y2()<=ty2_) && (c.z1()>=tz1_) && (c.z2()<=tz2_) ) return true;
142 return false;
143 }
145 bool tolIsIn(const Vector3<T> &v,const T &tol) const {
146 if ( (v.x()>=tx1_-tol) && (v.x()<=tx2_+tol) && (v.y()>=ty1_-tol) && (v.y()<=ty2_+tol) && (v.z()>=tz1_-tol) && (v.z()<=tz2_+tol) ) return true;
147 return false;
148 }
150 bool tolIsIn(const Extent3<T> &c,const T &tol) const {
151 if ( (c.x1()>=tx1_-tol) && (c.x2()<=tx2_+tol) && (c.y1()>=ty1_-tol) && (c.y2()<=ty2_+tol) && (c.z1()>=tz1_-tol) && (c.z2()<=tz2_+tol) ) return true;
152 return false;
153 }
155 bool intersects(const Extent3<T> &c) const {
156 if ((c.tx2_<tx1_) || (c.tx1_>tx2_) ||
157 (c.ty2_<ty1_) || (c.ty1_>ty2_) ||
158 (c.tz2_<tz1_) || (c.tz1_>tz2_)) return false;
159 return true;
160 }
162 bool tolIntersects(const Extent3<T> &c,const T &tol) const {
163 if ((c.tx2_<tx1_-tol) || (c.tx1_>tx2_+tol) ||
164 (c.ty2_<ty1_-tol) || (c.ty1_>ty2_+tol) ||
165 (c.tz2_<tz1_-tol) || (c.tz1_>tz2_+tol)) return false;
166 return true;
167 }
168
169 // Setters
170 T &rx1() { return tx1_; }
171 T &rx2() { return tx2_; }
172 T &ry1() { return ty1_; }
173 T &ry2() { return ty2_; }
174 T &rz1() { return tz1_; }
175 T &rz2() { return tz2_; }
177 T &rdof1(uint32 u) {
178 assert(u<3);
179 switch (u) {
180 case 1: return ty1_;
181 case 2: return tz1_;
182 }
183 return tx1_;
184 }
186 T &rdof2(uint32 u) {
187 assert(u<3);
188 switch (u) {
189 case 1: return ty2_;
190 case 2: return tz2_;
191 }
192 return tx2_;
193 }
194 // Setting width, height, depth assumes LL corner (c111) stays constant.
196 void width(const T &t) { tx2_ = tx1_ + t; }
198 void height(const T &t) { ty2_ = ty1_ + t; }
200 void depth(const T &t) { tz2_ = tz1_ + t; }
202 void c111(const Vector3<T> &v) { tx1_ = v.x(); ty1_ = v.y(); tz1_ = v.z(); }
204 void c121(const Vector3<T> &v) { tx1_ = v.x(); ty2_ = v.y(); tz1_ = v.z(); }
206 void c211(const Vector3<T> &v) { tx2_ = v.x(); ty1_ = v.y(); tz1_ = v.z(); }
208 void c221(const Vector3<T> &v) { tx2_ = v.x(); ty2_ = v.y(); tz1_ = v.z(); }
210 void c112(const Vector3<T> &v) { tx1_ = v.x(); ty1_ = v.y(); tz2_ = v.z(); }
212 void c122(const Vector3<T> &v) { tx1_ = v.x(); ty2_ = v.y(); tz2_ = v.z(); }
214 void c212(const Vector3<T> &v) { tx2_ = v.x(); ty1_ = v.y(); tz2_ = v.z(); }
216 void c222(const Vector3<T> &v) { tx2_ = v.x(); ty2_ = v.y(); tz2_ = v.z(); }
218 void lowerBound(const Vector3<T> &v) { c111(v); }
220 void upperBound(const Vector3<T> &v) { c222(v); }
222 void size(const Vector3<T> &v) { width(v.x()); height(v.y()); depth(v.z()); }
225 Vector3<T> bound(const Vector3<T> &v) const { return Vector3<T>(pBound(tx1_,v.x(),tx2_),pBound(ty1_,v.y(),ty2_),pBound(tz1_,v.z(),tz2_)); }
226
227 // Manipulators - unary in place
229 const Extent3<T> &operator+=(const Vector3<T> &v) { tx1_+=v.x(); tx2_+=v.x(); ty1_+=v.y(); ty2_+=v.y(); tz1_+=v.z(); tz2_+=v.z(); return *this;}
231 const Extent3<T> &operator-=(const Vector3<T> &v) { tx1_-=v.x(); tx2_-=v.x(); ty1_-=v.y(); ty2_-=v.y(); tz1_-=v.z(); tz2_-=v.z(); return *this;}
232
233 // binary operators
235 Extent3<T> operator+(const Vector3<T> &v) const { Extent3<T> out(tx1_+v.x(),tx2_+v.x(),ty1_+v.y(),ty2_+v.y(),tz1_+v.z(),tz2_+v.z()); return out; }
237 Extent3<T> operator-(const Vector3<T> &v) const { Extent3<T> out(tx1_-v.x(),tx2_-v.x(),ty1_-v.y(),ty2_-v.y(),tz1_-v.z(),tz2_-v.z()); return out; }
240 Extent3<T> out(std::max<T>(tx1_,r.tx1_),std::min<T>(tx2_,r.tx2_),
241 std::max<T>(ty1_,r.ty1_),std::min<T>(ty2_,r.ty2_),
242 std::max<T>(tz1_,r.tz1_),std::min<T>(tz2_,r.tz2_));
243 return out;
244 }
247 tx1_ = std::min<T>(tx1_,r.tx1_);
248 ty1_ = std::min<T>(ty1_,r.ty1_);
249 tz1_ = std::min<T>(tz1_,r.tz1_);
250 tx2_ = std::max<T>(tx2_,r.tx2_);
251 ty2_ = std::max<T>(ty2_,r.ty2_);
252 tz2_ = std::max<T>(tz2_,r.tz2_);
253 return *this;
254 }
257 tx1_ = std::min<T>(tx1_,v.x());
258 ty1_ = std::min<T>(ty1_,v.y());
259 tz1_ = std::min<T>(tz1_,v.z());
260 tx2_ = std::max<T>(tx2_,v.x());
261 ty2_ = std::max<T>(ty2_,v.y());
262 tz2_ = std::max<T>(tz2_,v.z());
263 return *this;
264 }
266 const Extent3<T> &expandToInclude(const T &x,const T &y,const T &z) {
267 return expandToInclude(Vector3<T>(x,y,z));
268 }
271 Extent3<T> out(*this);
272 out.expandToInclude(r);
273 return out;
274 }
277 Extent3<T> out(*this);
278 out.expandToInclude(v);
279 return out;
280 }
282 Extent3<T> expandedToInclude(const T &x,const T &y,const T &z) const {
283 return expandedToInclude(Vector3<T>(x,y,z));
284 }
288 const Extent3<T> &expand(const T &tol) { tx1_ -= tol; tx2_ += tol; ty1_ -= tol; ty2_ += tol; tz1_ -= tol; tz2_ += tol; return *this; }
292 Extent3<T> expanded(const T &tol) const { Extent3<T> out(*this); return out.expand(tol); }
295 Extent3<T> biggerBy(const T &fact) const {
296 auto s = size()*0.5;
297 s += s*fact;
298 auto c = centroid();
299 Extent3<T> out(c-s,c+s);
300 return out;
301 }
303 const Extent3<T> &center(const Vector3<T> &v) {
304 Vector3<T> trans = v - this->centroid();
305 tx1_ += trans.x();
306 tx2_ += trans.x();
307 ty1_ += trans.y();
308 ty2_ += trans.y();
309 tz1_ += trans.z();
310 tz2_ += trans.z();
311 return *this;
312 }
314 Extent3<T> center(const Vector3<T> &v) const {
315 Extent3<T> out(*this);
316 out.center(v);
317 return out;
318 }
319
320private:
321 T pBound(const T &min,const T &v,const T &max) const { return std::min(std::max(v,min),max); }
322 T tx1_;
323 T tx2_;
324 T ty1_;
325 T ty2_;
326 T tz1_;
327 T tz2_;
328};
329
330
331// Predefined types for standard template arguments.
332typedef Extent3<double> DExtent3;
333typedef Extent3<float> FExtent3;
334typedef Extent3<int32> IExtent3;
335typedef Extent3<uint32> UExtent3;
336typedef Extent3<int64> I64Extent3;
337typedef Extent3<uint64> U64Extent3;
338
340template <class T> inline const Extent3<T> &toExtent3(const Extent3<T> &t) { return t; }
342template <class T> inline Extent3<T> toExtent3(const Extent2<T> &t) { return Extent3<T>(t.x1(),t.x2(),t.y1(),t.y2(),0.0,0.0); }
343
345// EoF
2D cartesian region in space.
Definition extent2.h:12
const T & y1() const
Returns the lower y-bound.
Definition extent2.h:37
const T & y2() const
Returns the upper y-bound.
Definition extent2.h:39
const T & x2() const
Returns the upper x-bound.
Definition extent2.h:35
const T & x1() const
Returns the lower x-bound.
Definition extent2.h:33
A Class representing a cartesian extent in 3D.
Definition extent3.h:16
const T & dof1(uint32 u) const
Returns the lower bound of degree-of-freedom dof.
Definition extent3.h:54
Extent3< T > center(const Vector3< T > &v) const
Returns a Extent2 centered about point v.
Definition extent3.h:314
T & rdof2(uint32 u)
Reference access to lower bound of degree-of-freedom dof.
Definition extent3.h:186
T volume() const
Returns the volume of the extent ( width() * height() * depth() ).
Definition extent3.h:80
Vector3< T > centroid() const
Returns the geometric center of the extent as a Vector3.
Definition extent3.h:78
void c212(const Vector3< T > &v)
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant.
Definition extent3.h:214
Vector3< T > c211() const
Returns one of the eith corners that characterize the extent.
Definition extent3.h:101
const T & z1() const
Returns the lower bound of the extent in the y-direction.
Definition extent3.h:50
Extent3< T > operator+(const Vector3< T > &v) const
Returns the extent created ty translating this one v units.
Definition extent3.h:235
Extent3< T > expandedToInclude(const Extent3< T > &r) const
Returns an extent large enough to contain this one and r.
Definition extent3.h:270
bool intersects(const Extent3< T > &c) const
Returns true if the Extent3 C intersects (inclusive) this extent in any way.
Definition extent3.h:155
bool operator==(const Extent3< T > &c) const
Comparison operator.
Definition extent3.h:125
Vector3< T > c222() const
Returns one of the eith corners that characterize the extent.
Definition extent3.h:111
T diagonal() const
Returns the diagonal length of the extent, or the distance from the lower bound corner to the upper b...
Definition extent3.h:82
void height(const T &t)
Sets the height of the extent by moving the maximum y extent, keeping the minimum constant.
Definition extent3.h:198
Vector3< T > c121() const
Returns one of the eith corners that characterize the extent.
Definition extent3.h:99
void c211(const Vector3< T > &v)
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant.
Definition extent3.h:206
Extent3(const Extent3< T > &r)
Copy constructor.
Definition extent3.h:32
void c111(const Vector3< T > &v)
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant.
Definition extent3.h:202
Extent3(const Vector3< T > &v111, const Vector3< T > &v222)
Explicit constructor, by providing the lower-bound and upper-bound as two Vector3.
Definition extent3.h:29
T height() const
Returns the size of the extent in the y-direction.
Definition extent3.h:74
Extent3()
Default constructor, no data initialization.
Definition extent3.h:23
T depth() const
Returns the size of the extent in the z-direction.
Definition extent3.h:76
const Extent3< T > & expandToInclude(const Vector3< T > &v)
Enlarges the extent to contain v.
Definition extent3.h:256
bool tolIsIn(const Extent3< T > &c, const T &tol) const
Returns true if the Extent3 c falls completely inside (inclusive) the extent with an added tolerance ...
Definition extent3.h:150
bool tolIntersects(const Extent3< T > &c, const T &tol) const
Returns true if the Extent3 C intersects (inclusive) this extent in any way with an added tolerance f...
Definition extent3.h:162
bool operator<(const Extent3< T > &c) const
Comparison operator, based on volume.
Definition extent3.h:131
const T & x1() const
Returns the lower bound of the extent in the x-direction.
Definition extent3.h:42
Extent3< T > expandedToInclude(const T &x, const T &y, const T &z) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition extent3.h:282
bool isIn(const Vector3< T > &v) const
Returns true if Vector3 v is "inside" the extent, inclusive.
Definition extent3.h:135
void lowerBound(const Vector3< T > &v)
Sets the lower bound of the exetnt, keeping the upper bound constant. Synonym to c111().
Definition extent3.h:218
Vector3< T > upperBound() const
Returns the upper bounding corner of the extent, maximum value of x,y, and z.
Definition extent3.h:115
const Extent3< T > & center(const Vector3< T > &v)
Centers this Extent2 about point v.
Definition extent3.h:303
Vector3< T > c112() const
Returns one of the eith corners that characterize the extent.
Definition extent3.h:105
const T & y2() const
Returns the upper bound of the extent in the y-direction.
Definition extent3.h:48
T & rz1()
Reference access to the minimum z extent.
Definition extent3.h:174
const T & dof2(uint32 u) const
Returns the upper bound of degree-of-freedom dof.
Definition extent3.h:63
T & ry1()
Reference access to the minimum y extent.
Definition extent3.h:172
bool isIn(const Extent3< T > &c) const
Returns true if the Extent3 c falls completely inside (inclusive) the extent.
Definition extent3.h:140
Vector3< T > size() const
Returns the size of the extent as a Vector3(width(),height(),depth()).
Definition extent3.h:117
bool operator>(const Extent3< T > &c) const
Comparison operator, based on volume.
Definition extent3.h:133
void c221(const Vector3< T > &v)
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant.
Definition extent3.h:208
Extent3< T > operator-(const Vector3< T > &v) const
Returns the extent created ty translating this one -v units.
Definition extent3.h:237
void c112(const Vector3< T > &v)
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant.
Definition extent3.h:210
T & ry2()
Reference access to the maximum y extent.
Definition extent3.h:173
const Extent3< T > & operator+=(const Vector3< T > &v)
Adds v to all extent boundaries, effectively translating it.
Definition extent3.h:229
T & rdof1(uint32 u)
Reference access to lower bound of degree-of-freedom dof.
Definition extent3.h:177
const Extent3< T > & operator-=(const Vector3< T > &v)
Subtracts v from all extent boundaries, effectively translating it.
Definition extent3.h:231
Vector3< T > corner(uint32 x, uint32 y, uint32 z) const
Definition extent3.h:85
void width(const T &t)
Sets the width of the extent by moving the maximum x extent, keeping the minimum constant.
Definition extent3.h:196
T & rx2()
Reference access to the maximum x extent.
Definition extent3.h:171
Vector3< T > c212() const
Returns one of the eith corners that characterize the extent.
Definition extent3.h:109
Extent3< T > intersectedWith(const Extent3< T > &r) const
Returns the extent formed by the intersections of the two extents. May end up empty.
Definition extent3.h:239
Vector3< T > c122() const
Returns one of the eith corners that characterize the extent.
Definition extent3.h:107
void c122(const Vector3< T > &v)
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant.
Definition extent3.h:212
T width() const
Returns the size of the extent in the x-direction.
Definition extent3.h:72
Extent3(const Extent2< T > &r)
Explicit contructor, from a Extent2. The z extent is set to (0,1).
Definition extent3.h:35
T & rz2()
Definition extent3.h:175
Extent3(const T &x1, const T &x2, const T &y1, const T &y2, const T &z1, const T &z2)
Explicit constructor, by providing all six cartesian extents.
Definition extent3.h:26
T & rx1()
Reference access to the minimum x extent.
Definition extent3.h:170
Extent3< T > expanded(const T &tol) const
Definition extent3.h:292
Extent3< T > biggerBy(const T &fact) const
Definition extent3.h:295
void depth(const T &t)
Sets the depth of the extent by moving the maximum z extent, keeping the minimum constant.
Definition extent3.h:200
void upperBound(const Vector3< T > &v)
Sets the upper bound of the exetnt, keeping the lower bound constant. Synonym to c222().
Definition extent3.h:220
bool isEmpty() const
Returns true if the region is "inside out" in any of its three coordinates.
Definition extent3.h:121
const T & z2() const
Returns the upper bound of the extent in the y-direction.
Definition extent3.h:52
void c222(const Vector3< T > &v)
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant.
Definition extent3.h:216
Vector3< T > c111() const
Returns one of the eith corners that characterize the extent.
Definition extent3.h:97
const Extent3< T > & expandToInclude(const T &x, const T &y, const T &z)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition extent3.h:266
void c121(const Vector3< T > &v)
Sets one of the eight characteristic corners of the extent, keeping the other three extents constant.
Definition extent3.h:204
bool operator!=(const Extent3< T > &r) const
Comparison operator.
Definition extent3.h:129
Vector3< T > lowerBound() const
Returns the lower bounding corner of the extent, minimum value of x,y, and z.
Definition extent3.h:113
const Extent3< T > & expandToInclude(const Extent3< T > &r)
Enlarges the extent to include both its original extent and r.
Definition extent3.h:246
static constexpr Extent3< T > nothing()
Returns an Extent3 with maximum negative size. Useful for calculating bounds.
Definition extent3.h:37
Extent3< T > expandedToInclude(const Vector3< T > &v) const
Returns an extent large enough to contain this one and the point v.
Definition extent3.h:276
const Extent3< T > & expand(const T &tol)
Definition extent3.h:288
bool tolIsEmpty(const double &tol=limits< double >::epsilon() *100) const
Returns true if the region is "inside out" with a tolerance in any of its three coordinates.
Definition extent3.h:123
const T & y1() const
Returns the lower bound of the extent in the y-direction.
Definition extent3.h:46
const T & x2() const
Returns the upper bound of the extent in the x-direction.
Definition extent3.h:44
Vector3< T > bound(const Vector3< T > &v) const
Definition extent3.h:225
bool tolIsIn(const Vector3< T > &v, const T &tol) const
Returns true if Vector3 v is "inside" the extent, inclusive with an added tolerance factor.
Definition extent3.h:145
void size(const Vector3< T > &v)
Specifies the size of the extent by moving the upper bound, keeping the lower bound constant.
Definition extent3.h:222
Vector3< T > c221() const
Returns one of the eith corners that characterize the extent.
Definition extent3.h:103
3D vector utility class.
Definition vect.h:163
constexpr const T & y() const
The y-component of the vector.
Definition vect.h:186
constexpr const T & x() const
The x-component of the vector.
Definition vect.h:184
constexpr const T & z() const
The z-component of the vector.
Definition vect.h:188
debug checked shorthand for std::numeric_limits<T>::
Definition limit.h:25
const Extent3< T > & toExtent3(const Extent3< T > &t)
Returns a Extent3.
Definition extent3.h:340