arsa  2.7
Public Member Functions | Public Attributes | List of all members
irr::core::aabbox3d< T > Class Template Reference

Axis aligned bounding box in 3d dimensional space. More...

#include <aabbox3d.h>

Public Member Functions

 aabbox3d ()
 Default Constructor. More...
 
 aabbox3d (const vector3d< T > &min, const vector3d< T > &max)
 Constructor with min edge and max edge. More...
 
 aabbox3d (const vector3d< T > &init)
 Constructor with only one point. More...
 
 aabbox3d (T minx, T miny, T minz, T maxx, T maxy, T maxz)
 Constructor with min edge and max edge as single values, not vectors. More...
 
bool operator== (const aabbox3d< T > &other) const
 Equality operator. More...
 
bool operator!= (const aabbox3d< T > &other) const
 Inequality operator. More...
 
void reset (T x, T y, T z)
 Resets the bounding box to a one-point box. More...
 
void reset (const aabbox3d< T > &initValue)
 Resets the bounding box. More...
 
void reset (const vector3d< T > &initValue)
 Resets the bounding box to a one-point box. More...
 
void addInternalPoint (const vector3d< T > &p)
 Adds a point to the bounding box. More...
 
void addInternalBox (const aabbox3d< T > &b)
 Adds another bounding box. More...
 
void addInternalPoint (T x, T y, T z)
 Adds a point to the bounding box. More...
 
vector3d< T > getCenter () const
 Get center of the bounding box. More...
 
vector3d< T > getExtent () const
 Get extent of the box (maximal distance of two points in the box) More...
 
getRadius () const
 Get radius of the bounding sphere. More...
 
bool isEmpty () const
 Check if the box is empty. More...
 
getVolume () const
 Get the volume enclosed by the box in cubed units. More...
 
getArea () const
 Get the surface area of the box in squared units. More...
 
void getEdges (vector3d< T > *edges) const
 Stores all 8 edges of the box into an array. More...
 
void repair ()
 Repairs the box. More...
 
bool isValid () const
 
aabbox3d< T > getInterpolated (const aabbox3d< T > &other, f32 d) const
 Calculates a new interpolated bounding box. More...
 
bool isPointInside (const vector3d< T > &p) const
 Determines if a point is within this box. More...
 
bool isPointTotalInside (const vector3d< T > &p) const
 Determines if a point is within this box and not its borders. More...
 
bool isFullInside (const aabbox3d< T > &other) const
 Check if this box is completely inside the 'other' box. More...
 
aabbox3d< T > intersect (const aabbox3d< T > &other) const
 Returns the intersection of this box with another, if possible. More...
 
bool intersectsWithBox (const aabbox3d< T > &other) const
 Determines if the axis-aligned box intersects with another axis-aligned box. More...
 
bool intersectsWithLine (const line3d< T > &line) const
 Tests if the box intersects with a line. More...
 
bool intersectsWithLine (const vector3d< T > &linemiddle, const vector3d< T > &linevect, T halflength) const
 Tests if the box intersects with a line. More...
 
EIntersectionRelation3D classifyPlaneRelation (const plane3d< T > &plane) const
 Classifies a relation with a plane. More...
 

Public Attributes

vector3d< T > MinEdge
 The near edge. More...
 
vector3d< T > MaxEdge
 The far edge. More...
 

Detailed Description

template<class T>
class irr::core::aabbox3d< T >

Axis aligned bounding box in 3d dimensional space.

Has some useful methods used with occlusion culling or clipping.

Definition at line 21 of file aabbox3d.h.

Constructor & Destructor Documentation

◆ aabbox3d() [1/4]

template<class T>
irr::core::aabbox3d< T >::aabbox3d ( )
inline

Default Constructor.

Definition at line 26 of file aabbox3d.h.

26 : MinEdge(-1,-1,-1), MaxEdge(1,1,1) {}
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ aabbox3d() [2/4]

template<class T>
irr::core::aabbox3d< T >::aabbox3d ( const vector3d< T > &  min,
const vector3d< T > &  max 
)
inline

Constructor with min edge and max edge.

Definition at line 28 of file aabbox3d.h.

28 : MinEdge(min), MaxEdge(max) {}
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ aabbox3d() [3/4]

template<class T>
irr::core::aabbox3d< T >::aabbox3d ( const vector3d< T > &  init)
inline

Constructor with only one point.

Definition at line 30 of file aabbox3d.h.

30 : MinEdge(init), MaxEdge(init) {}
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ aabbox3d() [4/4]

template<class T>
irr::core::aabbox3d< T >::aabbox3d ( minx,
miny,
minz,
maxx,
maxy,
maxz 
)
inline

Constructor with min edge and max edge as single values, not vectors.

Definition at line 32 of file aabbox3d.h.

32 : MinEdge(minx, miny, minz), MaxEdge(maxx, maxy, maxz) {}
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

Member Function Documentation

◆ addInternalBox()

template<class T>
void irr::core::aabbox3d< T >::addInternalBox ( const aabbox3d< T > &  b)
inline

Adds another bounding box.

The box grows bigger, if the new box was outside of the box.

Parameters
bOther bounding box to add into this box.

Definition at line 82 of file aabbox3d.h.

83  {
84  addInternalPoint(b.MaxEdge);
85  addInternalPoint(b.MinEdge);
86  }
void addInternalPoint(const vector3d< T > &p)
Adds a point to the bounding box.
Definition: aabbox3d.h:74
GLboolean GLboolean GLboolean b

◆ addInternalPoint() [1/2]

template<class T>
void irr::core::aabbox3d< T >::addInternalPoint ( const vector3d< T > &  p)
inline

Adds a point to the bounding box.

The box grows bigger, if point was outside of the box.

Parameters
pPoint to add into the box.

Definition at line 74 of file aabbox3d.h.

75  {
76  addInternalPoint(p.X, p.Y, p.Z);
77  }
GLfloat GLfloat p
void addInternalPoint(const vector3d< T > &p)
Adds a point to the bounding box.
Definition: aabbox3d.h:74

◆ addInternalPoint() [2/2]

template<class T>
void irr::core::aabbox3d< T >::addInternalPoint ( x,
y,
z 
)
inline

Adds a point to the bounding box.

The box grows bigger, if point is outside of the box.

Parameters
xX coordinate of the point to add to this box.
yY coordinate of the point to add to this box.
zZ coordinate of the point to add to this box.

Definition at line 93 of file aabbox3d.h.

94  {
95  if (x>MaxEdge.X) MaxEdge.X = x;
96  if (y>MaxEdge.Y) MaxEdge.Y = y;
97  if (z>MaxEdge.Z) MaxEdge.Z = z;
98 
99  if (x<MinEdge.X) MinEdge.X = x;
100  if (y<MinEdge.Y) MinEdge.Y = y;
101  if (z<MinEdge.Z) MinEdge.Z = z;
102  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1574
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1574
GLdouble GLdouble z

◆ classifyPlaneRelation()

template<class T>
EIntersectionRelation3D irr::core::aabbox3d< T >::classifyPlaneRelation ( const plane3d< T > &  plane) const
inline

Classifies a relation with a plane.

Parameters
planePlane to classify relation to.
Returns
Returns ISREL3D_FRONT if the box is in front of the plane, ISREL3D_BACK if the box is behind the plane, and ISREL3D_CLIPPED if it is on both sides of the plane.

Definition at line 321 of file aabbox3d.h.

322  {
323  vector3d<T> nearPoint(MaxEdge);
324  vector3d<T> farPoint(MinEdge);
325 
326  if (plane.Normal.X > (T)0)
327  {
328  nearPoint.X = MinEdge.X;
329  farPoint.X = MaxEdge.X;
330  }
331 
332  if (plane.Normal.Y > (T)0)
333  {
334  nearPoint.Y = MinEdge.Y;
335  farPoint.Y = MaxEdge.Y;
336  }
337 
338  if (plane.Normal.Z > (T)0)
339  {
340  nearPoint.Z = MinEdge.Z;
341  farPoint.Z = MaxEdge.Z;
342  }
343 
344  if (plane.Normal.dotProduct(nearPoint) + plane.D > (T)0)
345  return ISREL3D_FRONT;
346 
347  if (plane.Normal.dotProduct(farPoint) + plane.D > (T)0)
348  return ISREL3D_CLIPPED;
349 
350  return ISREL3D_BACK;
351  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ getArea()

template<class T>
T irr::core::aabbox3d< T >::getArea ( ) const
inline

Get the surface area of the box in squared units.

Definition at line 142 of file aabbox3d.h.

143  {
144  const vector3d<T> e = getExtent();
145  return 2*(e.X*e.Y + e.X*e.Z + e.Y*e.Z);
146  }
vector3d< T > getExtent() const
Get extent of the box (maximal distance of two points in the box)
Definition: aabbox3d.h:113

◆ getCenter()

template<class T>
vector3d<T> irr::core::aabbox3d< T >::getCenter ( ) const
inline

Get center of the bounding box.

Returns
Center of the bounding box.

Definition at line 106 of file aabbox3d.h.

107  {
108  return (MinEdge + MaxEdge) / 2;
109  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ getEdges()

template<class T>
void irr::core::aabbox3d< T >::getEdges ( vector3d< T > *  edges) const
inline

Stores all 8 edges of the box into an array.

Parameters
edgesPointer to array of 8 edges.

Definition at line 150 of file aabbox3d.h.

151  {
152  const core::vector3d<T> middle = getCenter();
153  const core::vector3d<T> diag = middle - MaxEdge;
154 
155  /*
156  Edges are stored in this way:
157  Hey, am I an ascii artist, or what? :) niko.
158  /3--------/7
159  / | / |
160  / | / |
161  1---------5 |
162  | /2- - -|- -6
163  | / | /
164  |/ | /
165  0---------4/
166  */
167 
168  edges[0].set(middle.X + diag.X, middle.Y + diag.Y, middle.Z + diag.Z);
169  edges[1].set(middle.X + diag.X, middle.Y - diag.Y, middle.Z + diag.Z);
170  edges[2].set(middle.X + diag.X, middle.Y + diag.Y, middle.Z - diag.Z);
171  edges[3].set(middle.X + diag.X, middle.Y - diag.Y, middle.Z - diag.Z);
172  edges[4].set(middle.X - diag.X, middle.Y + diag.Y, middle.Z + diag.Z);
173  edges[5].set(middle.X - diag.X, middle.Y - diag.Y, middle.Z + diag.Z);
174  edges[6].set(middle.X - diag.X, middle.Y + diag.Y, middle.Z - diag.Z);
175  edges[7].set(middle.X - diag.X, middle.Y - diag.Y, middle.Z - diag.Z);
176  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > getCenter() const
Get center of the bounding box.
Definition: aabbox3d.h:106

◆ getExtent()

template<class T>
vector3d<T> irr::core::aabbox3d< T >::getExtent ( ) const
inline

Get extent of the box (maximal distance of two points in the box)

Returns
Extent of the bounding box.

Definition at line 113 of file aabbox3d.h.

114  {
115  return MaxEdge - MinEdge;
116  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ getInterpolated()

template<class T>
aabbox3d<T> irr::core::aabbox3d< T >::getInterpolated ( const aabbox3d< T > &  other,
f32  d 
) const
inline

Calculates a new interpolated bounding box.

d=0 returns other, d=1 returns this, all other values blend between the two boxes.

Parameters
otherOther box to interpolate between
dValue between 0.0f and 1.0f.
Returns
Interpolated box.

Definition at line 208 of file aabbox3d.h.

209  {
210  f32 inv = 1.0f - d;
211  return aabbox3d<T>((other.MinEdge*inv) + (MinEdge*d),
212  (other.MaxEdge*inv) + (MaxEdge*d));
213  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
float f32
32 bit floating point variable.
Definition: irrTypes.h:108
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ getRadius()

template<class T>
T irr::core::aabbox3d< T >::getRadius ( ) const
inline

Get radius of the bounding sphere.

Returns
Radius of the bounding sphere.

Definition at line 120 of file aabbox3d.h.

121  {
122  const T radius = getExtent().getLength() / 2;
123  return radius;
124  }
vector3d< T > getExtent() const
Get extent of the box (maximal distance of two points in the box)
Definition: aabbox3d.h:113

◆ getVolume()

template<class T>
T irr::core::aabbox3d< T >::getVolume ( ) const
inline

Get the volume enclosed by the box in cubed units.

Definition at line 135 of file aabbox3d.h.

136  {
137  const vector3d<T> e = getExtent();
138  return e.X * e.Y * e.Z;
139  }
vector3d< T > getExtent() const
Get extent of the box (maximal distance of two points in the box)
Definition: aabbox3d.h:113

◆ intersect()

template<class T>
aabbox3d<T> irr::core::aabbox3d< T >::intersect ( const aabbox3d< T > &  other) const
inline

Returns the intersection of this box with another, if possible.

Definition at line 248 of file aabbox3d.h.

249  {
250  aabbox3d<T> out;
251 
252  if (!intersectsWithBox(other))
253  return out;
254 
255  out.MaxEdge.X = min_(MaxEdge.X, other.MaxEdge.X);
256  out.MaxEdge.Y = min_(MaxEdge.Y, other.MaxEdge.Y);
257  out.MaxEdge.Z = min_(MaxEdge.Z, other.MaxEdge.Z);
258 
259  out.MinEdge.X = max_(MinEdge.X, other.MinEdge.X);
260  out.MinEdge.Y = max_(MinEdge.Y, other.MinEdge.Y);
261  out.MinEdge.Z = max_(MinEdge.Z, other.MinEdge.Z);
262 
263  return out;
264  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
bool intersectsWithBox(const aabbox3d< T > &other) const
Determines if the axis-aligned box intersects with another axis-aligned box.
Definition: aabbox3d.h:270
const T & min_(const T &a, const T &b)
returns minimum of two values. Own implementation to get rid of the STL (VS6 problems)
Definition: irrMath.h:124
const T & max_(const T &a, const T &b)
returns maximum of two values. Own implementation to get rid of the STL (VS6 problems)
Definition: irrMath.h:138
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ intersectsWithBox()

template<class T>
bool irr::core::aabbox3d< T >::intersectsWithBox ( const aabbox3d< T > &  other) const
inline

Determines if the axis-aligned box intersects with another axis-aligned box.

Parameters
otherOther box to check a intersection with.
Returns
True if there is an intersection with the other box, otherwise false.

Definition at line 270 of file aabbox3d.h.

271  {
272  return (MinEdge.X <= other.MaxEdge.X && MinEdge.Y <= other.MaxEdge.Y && MinEdge.Z <= other.MaxEdge.Z &&
273  MaxEdge.X >= other.MinEdge.X && MaxEdge.Y >= other.MinEdge.Y && MaxEdge.Z >= other.MinEdge.Z);
274  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ intersectsWithLine() [1/2]

template<class T>
bool irr::core::aabbox3d< T >::intersectsWithLine ( const line3d< T > &  line) const
inline

Tests if the box intersects with a line.

Parameters
lineLine to test intersection with.
Returns
True if there is an intersection , else false.

Definition at line 279 of file aabbox3d.h.

280  {
281  return intersectsWithLine(line.getMiddle(), line.getVector().normalize(),
282  (T)(line.getLength() * 0.5));
283  }
bool intersectsWithLine(const line3d< T > &line) const
Tests if the box intersects with a line.
Definition: aabbox3d.h:279

◆ intersectsWithLine() [2/2]

template<class T>
bool irr::core::aabbox3d< T >::intersectsWithLine ( const vector3d< T > &  linemiddle,
const vector3d< T > &  linevect,
halflength 
) const
inline

Tests if the box intersects with a line.

Parameters
linemiddleCenter of the line.
linevectVector of the line.
halflengthHalf length of the line.
Returns
True if there is an intersection, else false.

Definition at line 290 of file aabbox3d.h.

292  {
293  const vector3d<T> e = getExtent() * (T)0.5;
294  const vector3d<T> t = getCenter() - linemiddle;
295 
296  if ((fabs(t.X) > e.X + halflength * fabs(linevect.X)) ||
297  (fabs(t.Y) > e.Y + halflength * fabs(linevect.Y)) ||
298  (fabs(t.Z) > e.Z + halflength * fabs(linevect.Z)) )
299  return false;
300 
301  T r = e.Y * (T)fabs(linevect.Z) + e.Z * (T)fabs(linevect.Y);
302  if (fabs(t.Y*linevect.Z - t.Z*linevect.Y) > r )
303  return false;
304 
305  r = e.X * (T)fabs(linevect.Z) + e.Z * (T)fabs(linevect.X);
306  if (fabs(t.Z*linevect.X - t.X*linevect.Z) > r )
307  return false;
308 
309  r = e.X * (T)fabs(linevect.Y) + e.Y * (T)fabs(linevect.X);
310  if (fabs(t.X*linevect.Y - t.Y*linevect.X) > r)
311  return false;
312 
313  return true;
314  }
GLdouble GLdouble t
Definition: SDL_opengl.h:2071
GLdouble GLdouble GLdouble r
Definition: SDL_opengl.h:2079
vector3d< T > getExtent() const
Get extent of the box (maximal distance of two points in the box)
Definition: aabbox3d.h:113
vector3d< T > getCenter() const
Get center of the bounding box.
Definition: aabbox3d.h:106

◆ isEmpty()

template<class T>
bool irr::core::aabbox3d< T >::isEmpty ( ) const
inline

Check if the box is empty.

This means that there is no space between the min and max edge.

Returns
True if box is empty, else false.

Definition at line 129 of file aabbox3d.h.

130  {
131  return MinEdge.equals ( MaxEdge );
132  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ isFullInside()

template<class T>
bool irr::core::aabbox3d< T >::isFullInside ( const aabbox3d< T > &  other) const
inline

Check if this box is completely inside the 'other' box.

Parameters
otherOther box to check against.
Returns
True if this box is completely inside the other box, otherwise false.

Definition at line 241 of file aabbox3d.h.

242  {
243  return (MinEdge.X >= other.MinEdge.X && MinEdge.Y >= other.MinEdge.Y && MinEdge.Z >= other.MinEdge.Z &&
244  MaxEdge.X <= other.MaxEdge.X && MaxEdge.Y <= other.MaxEdge.Y && MaxEdge.Z <= other.MaxEdge.Z);
245  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ isPointInside()

template<class T>
bool irr::core::aabbox3d< T >::isPointInside ( const vector3d< T > &  p) const
inline

Determines if a point is within this box.

Border is included (IS part of the box)!

Parameters
pPoint to check.
Returns
True if the point is within the box and false if not

Definition at line 219 of file aabbox3d.h.

220  {
221  return (p.X >= MinEdge.X && p.X <= MaxEdge.X &&
222  p.Y >= MinEdge.Y && p.Y <= MaxEdge.Y &&
223  p.Z >= MinEdge.Z && p.Z <= MaxEdge.Z);
224  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
GLfloat GLfloat p
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ isPointTotalInside()

template<class T>
bool irr::core::aabbox3d< T >::isPointTotalInside ( const vector3d< T > &  p) const
inline

Determines if a point is within this box and not its borders.

Border is excluded (NOT part of the box)!

Parameters
pPoint to check.
Returns
True if the point is within the box and false if not.

Definition at line 230 of file aabbox3d.h.

231  {
232  return (p.X > MinEdge.X && p.X < MaxEdge.X &&
233  p.Y > MinEdge.Y && p.Y < MaxEdge.Y &&
234  p.Z > MinEdge.Z && p.Z < MaxEdge.Z);
235  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
GLfloat GLfloat p
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ isValid()

template<class T>
bool irr::core::aabbox3d< T >::isValid ( ) const
inline

Definition at line 193 of file aabbox3d.h.

194  {
195  if (MinEdge.X > MaxEdge.X) return false;
196  if (MinEdge.Y > MaxEdge.Y) return false;
197  if (MinEdge.Z > MaxEdge.Z) return false;
198 
199  return true;
200  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ operator!=()

template<class T>
bool irr::core::aabbox3d< T >::operator!= ( const aabbox3d< T > &  other) const
inline

Inequality operator.

Parameters
otherbox to compare with.
Returns
True if both boxes are different, else false.

Definition at line 42 of file aabbox3d.h.

42 { return !(MinEdge == other.MinEdge && other.MaxEdge == MaxEdge);}
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ operator==()

template<class T>
bool irr::core::aabbox3d< T >::operator== ( const aabbox3d< T > &  other) const
inline

Equality operator.

Parameters
otherbox to compare with.
Returns
True if both boxes are equal, else false.

Definition at line 38 of file aabbox3d.h.

38 { return (MinEdge == other.MinEdge && other.MaxEdge == MaxEdge);}
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ repair()

template<class T>
void irr::core::aabbox3d< T >::repair ( )
inline

Repairs the box.

Necessary if for example MinEdge and MaxEdge are swapped.

Definition at line 180 of file aabbox3d.h.

181  {
182  T t;
183 
184  if (MinEdge.X > MaxEdge.X)
185  { t=MinEdge.X; MinEdge.X = MaxEdge.X; MaxEdge.X=t; }
186  if (MinEdge.Y > MaxEdge.Y)
187  { t=MinEdge.Y; MinEdge.Y = MaxEdge.Y; MaxEdge.Y=t; }
188  if (MinEdge.Z > MaxEdge.Z)
189  { t=MinEdge.Z; MinEdge.Z = MaxEdge.Z; MaxEdge.Z=t; }
190  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
GLdouble GLdouble t
Definition: SDL_opengl.h:2071
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

◆ reset() [1/3]

template<class T>
void irr::core::aabbox3d< T >::reset ( x,
y,
z 
)
inline

Resets the bounding box to a one-point box.

Parameters
xX coord of the point.
yY coord of the point.
zZ coord of the point.

Definition at line 50 of file aabbox3d.h.

51  {
52  MaxEdge.set(x,y,z);
53  MinEdge = MaxEdge;
54  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
GLint GLint GLint GLint GLint GLint y
Definition: SDL_opengl.h:1574
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354
GLint GLint GLint GLint GLint x
Definition: SDL_opengl.h:1574
GLdouble GLdouble z

◆ reset() [2/3]

template<class T>
void irr::core::aabbox3d< T >::reset ( const aabbox3d< T > &  initValue)
inline

Resets the bounding box.

Parameters
initValueNew box to set this one to.

Definition at line 58 of file aabbox3d.h.

59  {
60  *this = initValue;
61  }

◆ reset() [3/3]

template<class T>
void irr::core::aabbox3d< T >::reset ( const vector3d< T > &  initValue)
inline

Resets the bounding box to a one-point box.

Parameters
initValueNew point.

Definition at line 65 of file aabbox3d.h.

66  {
67  MaxEdge = initValue;
68  MinEdge = initValue;
69  }
vector3d< T > MaxEdge
The far edge.
Definition: aabbox3d.h:357
vector3d< T > MinEdge
The near edge.
Definition: aabbox3d.h:354

Member Data Documentation

◆ MaxEdge

template<class T>
vector3d<T> irr::core::aabbox3d< T >::MaxEdge

The far edge.

Definition at line 357 of file aabbox3d.h.

◆ MinEdge

template<class T>
vector3d<T> irr::core::aabbox3d< T >::MinEdge

The near edge.

Definition at line 354 of file aabbox3d.h.


The documentation for this class was generated from the following file: