Public Member Functions | Protected Attributes
vsol_box_3d Class Reference

A bounding box for 3d spatial objects. More...

#include <vsol_box_3d.h>

Inheritance diagram for vsol_box_3d:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 vsol_box_3d ()
 create an empty box.
 vsol_box_3d (vsol_box_3d const &b)
 vsol_box_3d (vbl_bounding_box< double, 3 > const &b)
 ~vsol_box_3d ()
double get_min_x () const
double get_max_x () const
double get_min_y () const
double get_max_y () const
double get_min_z () const
double get_max_z () const
double width () const
double height () const
double depth () const
double volume () const
void add_point (double x, double y, double z)
 enlarge the bounding box by adding the point (x,y,z) & taking convex hull.
void grow_minmax_bounds (vsol_box_3d_sptr const &comp_box)
 Compare this' bounds to comp_box and grow to the maximum bounding box.
bool operator< (vsol_box_3d &box) const
 a<b means a is inside b.
bool near_equal (vsol_box_3d const &box, float tolerance) const
 is box about the same as this?.
void reset_bounds ()
 reset the bounds of the box, i.e., make the box empty.
void b_write (vsl_b_ostream &os) const
 Binary save self to stream.
void b_read (vsl_b_istream &is)
 Binary load self from stream.
short version () const
 Return IO version number;.
void print_summary (vcl_ostream &os) const
 Print an ascii summary to the stream.
virtual vcl_string is_a () const
 Return a platform independent string identifying the class.
virtual bool is_class (const vcl_string &cls) const
 Return true if the argument matches the string identifying the class or any parent class.
void ref ()
void unref ()
int get_references () const
bool is_referenced () const
void touch ()
unsigned long get_time_stamp () const
bool older (vul_timestamp const &t) const
bool older (vul_timestamp const *t) const

Protected Attributes

vbl_bounding_box< double, 3 > box_
unsigned long timestamp_

Detailed Description

A bounding box for 3d spatial objects.

Definition at line 47 of file vsol_box_3d.h.


Constructor & Destructor Documentation

vsol_box_3d::vsol_box_3d ( ) [inline]

create an empty box.

Definition at line 54 of file vsol_box_3d.h.

vsol_box_3d::vsol_box_3d ( vsol_box_3d const &  b) [inline]

Definition at line 56 of file vsol_box_3d.h.

vsol_box_3d::vsol_box_3d ( vbl_bounding_box< double, 3 > const &  b) [inline]

Definition at line 59 of file vsol_box_3d.h.

vsol_box_3d::~vsol_box_3d ( ) [inline]

Definition at line 61 of file vsol_box_3d.h.


Member Function Documentation

void vsol_box_3d::add_point ( double  x,
double  y,
double  z 
)

enlarge the bounding box by adding the point (x,y,z) & taking convex hull.

Definition at line 45 of file vsol_box_3d.cxx.

void vsol_box_3d::b_read ( vsl_b_istream is)

Binary load self from stream.

Binary load self from stream (not typically used).

Definition at line 110 of file vsol_box_3d.cxx.

void vsol_box_3d::b_write ( vsl_b_ostream os) const

Binary save self to stream.

Definition at line 103 of file vsol_box_3d.cxx.

double vsol_box_3d::depth ( ) const [inline]

Definition at line 76 of file vsol_box_3d.h.

double vsol_box_3d::get_max_x ( ) const

Definition at line 15 of file vsol_box_3d.cxx.

double vsol_box_3d::get_max_y ( ) const

Definition at line 27 of file vsol_box_3d.cxx.

double vsol_box_3d::get_max_z ( ) const

Definition at line 39 of file vsol_box_3d.cxx.

double vsol_box_3d::get_min_x ( ) const

Definition at line 9 of file vsol_box_3d.cxx.

double vsol_box_3d::get_min_y ( ) const

Definition at line 21 of file vsol_box_3d.cxx.

double vsol_box_3d::get_min_z ( ) const

Definition at line 33 of file vsol_box_3d.cxx.

void vsol_box_3d::grow_minmax_bounds ( vsol_box_3d_sptr const &  comp_box)

Compare this' bounds to comp_box and grow to the maximum bounding box.

compare mins and maxs between this and the comp_box, grow to the bounding box.

I.e., take the convex union of this and comp_box

Definition at line 51 of file vsol_box_3d.cxx.

double vsol_box_3d::height ( ) const [inline]

Definition at line 75 of file vsol_box_3d.h.

virtual vcl_string vsol_box_3d::is_a ( ) const [inline, virtual]

Return a platform independent string identifying the class.

Definition at line 110 of file vsol_box_3d.h.

virtual bool vsol_box_3d::is_class ( const vcl_string &  cls) const [inline, virtual]

Return true if the argument matches the string identifying the class or any parent class.

Definition at line 113 of file vsol_box_3d.h.

bool vsol_box_3d::near_equal ( vsol_box_3d const &  box,
float  tolerance 
) const

is box about the same as this?.

Definition at line 80 of file vsol_box_3d.cxx.

bool vsol_box_3d::operator< ( vsol_box_3d b) const

a<b means a is inside b.

Determines if this box is inside the right hand side box.

That is, all boundaries of *this must be on or inside the boundaries of b.

Definition at line 62 of file vsol_box_3d.cxx.

void vsol_box_3d::print_summary ( vcl_ostream &  os) const

Print an ascii summary to the stream.

Definition at line 133 of file vsol_box_3d.cxx.

void vsol_box_3d::reset_bounds ( )

reset the bounds of the box, i.e., make the box empty.

Definition at line 93 of file vsol_box_3d.cxx.

short vsol_box_3d::version ( ) const

Return IO version number;.

Definition at line 127 of file vsol_box_3d.cxx.

double vsol_box_3d::volume ( ) const [inline]

Definition at line 77 of file vsol_box_3d.h.

double vsol_box_3d::width ( ) const [inline]

Definition at line 74 of file vsol_box_3d.h.


Member Data Documentation

vbl_bounding_box<double,3> vsol_box_3d::box_ [protected]

Definition at line 50 of file vsol_box_3d.h.


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