Graphite Version 3
An experimental 3D geometry processing program
Loading...
Searching...
No Matches
GEO::Box Class Reference

Axis-aligned bounding box. More...

#include <geogram/basic/geometry.h>

Inheritance diagram for GEO::Box:
OGF::Box3d

Public Member Functions

 Box ()
 Constructs an uninitialized box.
 
 Box (double x1, double y1, double z1, double x2, double y2, double z2)
 Constructs a box from lower and upper bounds.
 
 Box (const vec3 &lo, const vec3 &hi)
 Constructs a box from lower and upper bounds.
 
vec3 lo () const
 Gets the lower bounds.
 
vec3 hi () const
 Gets the higher bounds.
 
bool contains (const vec3 &b) const
 Tests whether a box contains a point.
 
void enlarge (double d)
 Enlarges the box.
 

Public Attributes

double xyz_min [3]
 
double xyz_max [3]
 

Detailed Description

Axis-aligned bounding box.

Definition at line 689 of file geometry.h.

Constructor & Destructor Documentation

◆ Box() [1/3]

GEO::Box::Box ( )
inline

Constructs an uninitialized box.

Definition at line 697 of file geometry.h.

◆ Box() [2/3]

GEO::Box::Box ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2 
)
inline

Constructs a box from lower and upper bounds.

Parameters
[in]x1,y1,z1the lower bounds
[in]x2,y2,z2the upper bounds

Definition at line 705 of file geometry.h.

◆ Box() [3/3]

GEO::Box::Box ( const vec3 lo,
const vec3 hi 
)
inline

Constructs a box from lower and upper bounds.

Parameters
[in]lothe lower bound as a vec3
[in]hithe upper bound as a vec3

Definition at line 719 of file geometry.h.

Member Function Documentation

◆ contains()

bool GEO::Box::contains ( const vec3 b) const
inline

Tests whether a box contains a point.

Parameters
[in]bthe point
Returns
true if this box contains b, false otherwise

Definition at line 749 of file geometry.h.

◆ enlarge()

void GEO::Box::enlarge ( double  d)
inline

Enlarges the box.

Parameters
[in]dthe amount that should be subtracted from the lower bounds and added to the upper bounds

Definition at line 766 of file geometry.h.

◆ hi()

vec3 GEO::Box::hi ( ) const
inline

Gets the higher bounds.

Returns
the higher bounds as a vec3

Definition at line 740 of file geometry.h.

◆ lo()

vec3 GEO::Box::lo ( ) const
inline

Gets the lower bounds.

Returns
the lower bounds as a vec3

Definition at line 732 of file geometry.h.

Member Data Documentation

◆ xyz_max

double GEO::Box::xyz_max[3]

Definition at line 692 of file geometry.h.

◆ xyz_min

double GEO::Box::xyz_min[3]

Definition at line 691 of file geometry.h.


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