vsol_box_3d Class Reference

#include <vsol_box_3d.h>

Inheritance diagram for vsol_box_3d:

vsol_box vbl_ref_count vul_timestamp List of all members.

Detailed Description

A bounding box for 3d spatial objects.

Definition at line 46 of file vsol_box_3d.h.


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_

Constructor & Destructor Documentation

vsol_box_3d::vsol_box_3d (  )  [inline]

create an empty box.

Definition at line 53 of file vsol_box_3d.h.

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

Definition at line 55 of file vsol_box_3d.h.

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

Definition at line 58 of file vsol_box_3d.h.

vsol_box_3d::~vsol_box_3d (  )  [inline]

Definition at line 60 of file vsol_box_3d.h.


Member Function Documentation

double vsol_box_3d::get_min_x (  )  const

Definition at line 9 of file vsol_box_3d.cxx.

double vsol_box_3d::get_max_x (  )  const

Definition at line 15 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_max_y (  )  const

Definition at line 27 of file vsol_box_3d.cxx.

double vsol_box_3d::get_min_z (  )  const

Definition at line 33 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::width (  )  const [inline]

Definition at line 73 of file vsol_box_3d.h.

double vsol_box_3d::height (  )  const [inline]

Definition at line 74 of file vsol_box_3d.h.

double vsol_box_3d::depth (  )  const [inline]

Definition at line 75 of file vsol_box_3d.h.

double vsol_box_3d::volume (  )  const [inline]

Definition at line 76 of file vsol_box_3d.h.

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::grow_minmax_bounds ( vsol_box_3d_sptr const &  comp_box  ) 

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

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

Definition at line 51 of file vsol_box_3d.cxx.

bool vsol_box_3d::operator< ( vsol_box_3d b  )  const

a<b means a is inside b.

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.

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.

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.

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.

void vsol_box_3d::b_read ( vsl_b_istream is  ) 

Binary load self from stream.

Definition at line 110 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.

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.

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

Return a platform independent string identifying the class.

Definition at line 109 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 112 of file vsol_box_3d.h.


Member Data Documentation

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

Definition at line 49 of file vsol_box_3d.h.


The documentation for this class was generated from the following files:
Generated on Mon Mar 8 05:20:51 2010 for contrib/gel/vsol by  doxygen 1.5.1