#include <bbox.H>
Inheritance diagram for BBOX:
Public Member Functions | |
BBOX () | |
BBOX (mlib::CWpt &l, mlib::CWpt &h) | |
BBOX (CBBOX &b) | |
BBOX (CGELptr &g, int recurse=0) | |
void | reset () |
Invalidate. | |
bool | valid () const |
Is bounding box a valid one? | |
mlib::Wpt | min () const |
One of the two corners defining the box - the so-called 'minimum' corner. | |
mlib::Wpt | max () const |
One of the two corners defining the box - the so-called 'maximum' corner. | |
mlib::Wpt | center () const |
Center of the bounding box. | |
mlib::Wvec | dim () const |
Vector containing the extent of the bounding box along all axes. | |
double | volume () const |
bool | points (mlib::Wpt_list &p) const |
Return the 8 corners of the box through the reference p, function return value indicating if box is valid or not. | |
bool | overlaps (CBBOX &b) const |
Does the box (partially) overlap the given box? | |
bool | contains (mlib::CWpt &p) const |
Does the box contain the given point? | |
bool | intersects (CRAYhit &r, mlib::CWtransf &m) const |
Does box intersect the given ray? | |
bool | is_off_screen () |
if this returns true, the bbox is definitely offscreen, but if it returns false the bbox may or may not be offscreen. | |
void | ndcz_bounding_box (mlib::CWtransf &obj_to_ndc, mlib::NDCZpt &min_pt, mlib::NDCZpt &max_pt) const |
BBOX & | operator+= (CBBOX &b) |
Expands to subsume the given bounding box, if it is valid. | |
BBOX & | operator *= (mlib::CWtransf &x) |
Apply the given transform to the corner points of this box. | |
BBOX & | update (mlib::CWpt &p) |
Modify self to bound the given point. | |
BBOX & | update (mlib::CWpt_list &p) |
Modify self to bound the given point list. | |
void | set (mlib::CWpt &l, mlib::CWpt &h) |
Force self to be bounding box between the two points provided. | |
bool | operator== (CBBOX &bb) const |
Are the two boxes identical? | |
Protected Attributes | |
bool | _valid |
is bounding box valid? | |
mlib::Wpt | _max |
One of the two corners defining the box extent. | |
mlib::Wpt | _min |
One of the two corners defining the box extent. | |
Friends | |
BBOX | operator * (mlib::CWtransf &x, CBBOX &b) |
The result of transformation of bounding box b by given world-space transform x. | |
ostream & | operator<< (ostream &os, CBBOX &b) |
Output bounding box info to text stream. |
Definition at line 26 of file bbox.H.
|
Definition at line 32 of file bbox.H. Referenced by BBOX(), and OctreeNode::set_neibors(). |
|
|
|
|
|
Definition at line 9 of file bbox.C. References BBOX(). |
|
Center of the bounding box.
Definition at line 49 of file bbox.H. Referenced by GEOM::bbox(), BMESH::compute_pix_size(), is_off_screen(), VIEW::viewall(), and visit(). |
|
Does the box contain the given point?
Referenced by OctreeNode::build_octree(), and QuadtreeNode::build_quadtree(). |
|
Vector containing the extent of the bounding box along all axes.
Definition at line 51 of file bbox.H. Referenced by QuadtreeNode::build_quadtree(), BMESH::compute_pix_size(), LMESH::fit(), is_off_screen(), points(), OctreeNode::set_neibors(), sps(), VIEW::viewall(), and TestSPSapp::visit(). |
|
Does box intersect the given ray?
|
|
if this returns true, the bbox is definitely offscreen, but if it returns false the bbox may or may not be offscreen.
Definition at line 103 of file bbox.C. References CCAMdataptr, center(), dim(), mlib::Vec3< V >::length_sqrd(), VIEW::peek_cam_const(), sqr(), and valid(). Referenced by GEOM::cull(), and BaseJOTapp::load_scene(). |
|
One of the two corners defining the box - the so-called 'maximum' corner.
Definition at line 47 of file bbox.H. References _max. Referenced by generate_samples(), operator==(), overlaps(), OctreeNode::set_neibors(), and sps(). |
|
One of the two corners defining the box - the so-called 'minimum' corner.
Definition at line 45 of file bbox.H. References _min. Referenced by generate_samples(), operator==(), overlaps(), OctreeNode::set_neibors(), sps(), and TestSPSapp::visit(). |
|
|
|
Apply the given transform to the corner points of this box.
|
|
Expands to subsume the given bounding box, if it is valid.
Definition at line 72 of file bbox.H. References update(). |
|
Are the two boxes identical?
|
|
Does the box (partially) overlap the given box?
Definition at line 314 of file bbox.C. References _valid, max(), and min(). Referenced by OctreeNode::build_octree(), QuadtreeNode::build_quadtree(), Collide::buildCollisionList(), and OctreeNode::set_neibors(). |
|
Return the 8 corners of the box through the reference p, function return value indicating if box is valid or not.
Definition at line 22 of file bbox.C. References _max, _min, _valid, mlib::Pointlist< L, P, V, S >::clear(), dim(), and ARRAY< T >::realloc(). Referenced by OctreeNode::build_octree(). |
|
Invalidate.
Definition at line 41 of file bbox.H. References _valid. Referenced by BMESH::_merge(), GEOM::bbox(), and BMESH::changed(). |
|
Force self to be bounding box between the two points provided.
Definition at line 89 of file bbox.H. References _max, _min, and _valid. Referenced by GESTURE::init(). |
|
Modify self to bound the given point list.
|
|
Modify self to bound the given point.
Referenced by GESTURE::add(), bface_bbox(), LMESH::fit(), BMESH::get_bb(), and operator+=(). |
|
Is bounding box a valid one?
Definition at line 43 of file bbox.H. References _valid. Referenced by BODY::bb_valid(), BMESH::get_bb(), GEOM::is_3D(), is_off_screen(), and operator==(). |
|
|
|
The result of transformation of bounding box b by given world-space transform x.
|
|
Output bounding box info to text stream.
|
|
One of the two corners defining the box extent.
Definition at line 29 of file bbox.H. Referenced by center(), dim(), max(), OctreeNode::OctreeNode(), points(), set(), and volume(). |
|
One of the two corners defining the box extent.
Definition at line 30 of file bbox.H. Referenced by center(), dim(), min(), OctreeNode::OctreeNode(), points(), set(), and volume(). |
|
is bounding box valid?
Definition at line 28 of file bbox.H. Referenced by OctreeNode::OctreeNode(), overlaps(), points(), reset(), set(), and valid(). |