Graphite  Version 3
An experimental 3D geometry processing program
OGF::Box3d Class Reference

A 3d axis aligned box. More...

#include <OGF/basic/math/geometry.h>

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

Public Member Functions

 Box3d ()
 Constructs a new uninitialized Box3d.
 
bool initialized () const
 Tests whether the box is initialized. More...
 
void add_point (const vec3 &p)
 Adds a point to this Box3d. More...
 
void add_box (const Box3d &B)
 Adds a box to this Box3d. More...
 
vec3 center () const
 Gets the center of this Box3d. More...
 
double radius () const
 Gets the radius of this Box3d. More...
 
double x_min () const
 Gets the minimum x coordinate in this box. More...
 
double y_min () const
 Gets the minimum y coordinate in this box. More...
 
double z_min () const
 Gets the minimum z coordinate in this box. More...
 
double x_max () const
 Gets the maximum x coordinate in this box. More...
 
double y_max () const
 Gets the maximum y coordinate in this box. More...
 
double z_max () const
 Gets the maximum z coordinate in this box. More...
 
void clear ()
 Clears the box.
 
- Public Member Functions inherited from GEO::Box
bool contains (const vec3 &b) const
 Tests whether a box contains a point. More...
 

Additional Inherited Members

- Public Attributes inherited from GEO::Box
double xyz_min [3]
 
double xyz_max [3]
 

Detailed Description

A 3d axis aligned box.

Definition at line 235 of file geometry.h.

Member Function Documentation

◆ add_box()

void OGF::Box3d::add_box ( const Box3d B)
inline

Adds a box to this Box3d.

On exit, this box is replaced with the union of its previous value and B.

Parameters
[in]Ba const reference to the box to be added.

Definition at line 280 of file geometry.h.

◆ add_point()

void OGF::Box3d::add_point ( const vec3 p)
inline

Adds a point to this Box3d.

Parameters
[in]pa const reference to the point to be added.

Definition at line 259 of file geometry.h.

◆ center()

vec3 OGF::Box3d::center ( ) const
inline

Gets the center of this Box3d.

Returns
A 3d point at the center of this Box3d

Definition at line 291 of file geometry.h.

◆ initialized()

bool OGF::Box3d::initialized ( ) const
inline

Tests whether the box is initialized.

At creation, a box is uninitialized. It becomes initialized whenever a add_xxx() function is called.

Definition at line 250 of file geometry.h.

◆ radius()

double OGF::Box3d::radius ( ) const
inline

Gets the radius of this Box3d.

Returns
The distance between the center and any corner of this Box3d

Definition at line 304 of file geometry.h.

◆ x_max()

double OGF::Box3d::x_max ( ) const
inline

Gets the maximum x coordinate in this box.

Result is undetermined if the box is not initialized.

Returns
the maximum x coordinate
See also
initialized()

Definition at line 352 of file geometry.h.

◆ x_min()

double OGF::Box3d::x_min ( ) const
inline

Gets the minimum x coordinate in this box.

Result is undetermined if the box is not initialized.

Returns
the minimum x coordinate
See also
initialized()

Definition at line 319 of file geometry.h.

◆ y_max()

double OGF::Box3d::y_max ( ) const
inline

Gets the maximum y coordinate in this box.

Result is undetermined if the box is not initialized.

Returns
the maximum y coordinate
See also
initialized()

Definition at line 363 of file geometry.h.

◆ y_min()

double OGF::Box3d::y_min ( ) const
inline

Gets the minimum y coordinate in this box.

Result is undetermined if the box is not initialized.

Returns
the minimum y coordinate
See also
initialized()

Definition at line 330 of file geometry.h.

◆ z_max()

double OGF::Box3d::z_max ( ) const
inline

Gets the maximum z coordinate in this box.

Result is undetermined if the box is not initialized.

Returns
the maximum z coordinate
See also
initialized()

Definition at line 374 of file geometry.h.

◆ z_min()

double OGF::Box3d::z_min ( ) const
inline

Gets the minimum z coordinate in this box.

Result is undetermined if the box is not initialized.

Returns
the minimum z coordinate
See also
initialized()

Definition at line 341 of file geometry.h.


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