Simple cube class. More...
#include <cube.h>
Public Member Functions | |
Cube (const real &cx_=R_INV, const real &cy_=R_INV, const real &cz_=R_INV, Level lv_=L_INV) | |
Default constructor. | |
Cube (const Point &c_, Level lv_=L_INV) | |
Default constructor. | |
Cube (const Cube &c_) | |
Default constructor. | |
~Cube () | |
Destructor. | |
Cube & | operator= (const Cube &c) |
Assignment operator. | |
real | cx () const |
const accessor for point center: x coordinate | |
real & | cx () |
accessor for point center: x coordinate | |
real | cy () const |
const accessor for point center: y coordinate | |
real & | cy () |
accessor for point center: y coordinate | |
real | cz () const |
const accessor for point center: z coordinate | |
real & | cz () |
accessor for point center: z coordinate | |
real | coord (Axis a) const |
const accessor for a coordinate | |
real & | coord (Axis a) |
accessor for a coordinate | |
real | sz () const |
const accessor for the cube half size | |
Level | lv () const |
const accessor for cube level | |
Level & | lv () |
accessor for cube level | |
real | xmin () const |
const accessor for cube center: min x coordinate | |
real | xmax () const |
const accessor for cube center: max x coordinate | |
real | ymin () const |
const accessor for cube center: min y coordinate | |
real | ymax () const |
const accessor for cube center: max y coordinate | |
real | zmin () const |
const accessor for cube center: min z coordinate | |
real | zmax () const |
const accessor for cube center: max z coordinate | |
real | coordmin (Axis a) const |
const accessor for cube center: min coordinate | |
real | coordmax (Axis a) const |
const accessor for cube center: max coordinate | |
bool | contains (const real &x_, const real &y_, const real &z_) const |
conained | |
bool | contains (const Point &p) const |
conained | |
bool | contains (const real &x_, const real &y_, const real &z_, const real &epsilon) const |
epsilon-conained | |
bool | contains (const Point &p, const real &epsilon) const |
epsilon-conained | |
void | draw_center () const |
Draws the cube center with opengl. | |
void | draw_corners (real fact=0.9) const |
Draws the cube corners with opengl. | |
void | draw_wire (real fact=0.9) const |
Draws the cube wire with opengl. | |
void | draw_fill (real fact=0.9) const |
Draws the cube wire with opengl. | |
Protected Attributes | |
Level | _lv |
cube level (from 0 on): cube corners have coordinates c(xyz) (+/-) (1/2^(lv+1)) |
Simple cube class.