#include <sps.H>
Inheritance diagram for OctreeNode:
Public Member Functions | |
OctreeNode (Wpt min, Wpt max, int height, OctreeNode *p) | |
~OctreeNode () | |
void | build_octree (int height) |
void | set_leaf (bool leaf) |
bool | get_leaf () |
void | set_disp (bool disp) |
bool | get_disp () |
int | get_height () |
double | get_area () |
OctreeNode ** | get_children () |
OctreeNode * | parent () |
ARRAY< OctreeNode * > & | neibors () |
ARRAY< OctreeNode * > & | terms () |
void | set_neibors () |
void | set_terms () |
int | get_term_index () |
Bface_list & | intersects () |
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 Member Functions | |
void | set_terms (ARRAY< OctreeNode * > &terms, int &count) |
Protected Attributes | |
int | _height |
int | _term_index |
double | _area |
bool | _leaf |
bool | _display |
OctreeNode * | _parent |
ARRAY< OctreeNode * > | _neibors |
ARRAY< OctreeNode * > | _terms |
OctreeNode * | _children [8] |
Bface_list | _intersects |
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 10 of file sps.H.
|
Definition at line 14 of file sps.H. References _area, _display, _leaf, BBOX::_max, BBOX::_min, and BBOX::_valid. Referenced by build_octree(). |
|
Definition at line 26 of file sps.H. References _children, _intersects, _leaf, _neibors, _terms, and ARRAY< T >::clear(). |
|
Definition at line 432 of file sps.C. References _children, _height, _intersects, _leaf, bface_bbox(), build_octree(), BBOX::contains(), intersects(), j, Bvert::loc(), ARRAY< T >::num(), OctreeNode(), BBOX::overlaps(), BBOX::points(), set_disp(), set_leaf(), Bface::v1(), Bface::v2(), and Bface::v3(). Referenced by build_octree(), generate_samples(), and sps(). |
|
Center of the bounding box.
Definition at line 49 of file bbox.H. References BBOX::_max, and BBOX::_min. Referenced by GEOM::bbox(), BMESH::compute_pix_size(), BBOX::is_off_screen(), VIEW::viewall(), and visit(). |
|
Does the box contain the given point?
Referenced by 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. References BBOX::_max, and BBOX::_min. Referenced by QuadtreeNode::build_quadtree(), BMESH::compute_pix_size(), LMESH::fit(), BBOX::is_off_screen(), BBOX::points(), set_neibors(), sps(), VIEW::viewall(), and TestSPSapp::visit(). |
|
Definition at line 44 of file sps.H. References _area. Referenced by QuadtreeNode::build_quadtree(). |
|
Definition at line 45 of file sps.H. References _children. Referenced by Collide::buildCollisionList(), set_neibors(), TestSPSapp::visit(), and visit(). |
|
Definition at line 42 of file sps.H. References _display. Referenced by set_neibors(), TestSPSapp::visit(), and visit(). |
|
Definition at line 43 of file sps.H. References _height. |
|
Definition at line 40 of file sps.H. References _leaf. Referenced by Collide::buildCollisionList(), set_neibors(), TestSPSapp::visit(), and visit(). |
|
Definition at line 51 of file sps.H. References _term_index. |
|
Does box intersect the given ray?
|
|
Definition at line 52 of file sps.H. References _intersects. Referenced by build_octree(), Collide::buildCollisionList(), generate_samples(), sps(), and visit(). |
|
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, BBOX::center(), BBOX::dim(), mlib::Vec3< V >::length_sqrd(), VIEW::peek_cam_const(), sqr(), and BBOX::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 BBOX::_max. Referenced by generate_samples(), BBOX::operator==(), BBOX::overlaps(), 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 BBOX::_min. Referenced by generate_samples(), BBOX::operator==(), BBOX::overlaps(), set_neibors(), sps(), and TestSPSapp::visit(). |
|
|
|
Definition at line 47 of file sps.H. References _neibors. Referenced by set_neibors(). |
|
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 BBOX::update(). |
|
Are the two boxes identical?
Definition at line 96 of file bbox.H. References BBOX::max(), BBOX::min(), and BBOX::valid(). |
|
Does the box (partially) overlap the given box?
Definition at line 314 of file bbox.C. References BBOX::_valid, BBOX::max(), and BBOX::min(). Referenced by build_octree(), QuadtreeNode::build_quadtree(), Collide::buildCollisionList(), and set_neibors(). |
|
Definition at line 46 of file sps.H. References _parent. |
|
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 BBOX::_max, BBOX::_min, BBOX::_valid, mlib::Pointlist< L, P, V, S >::clear(), BBOX::dim(), and ARRAY< T >::realloc(). Referenced by build_octree(). |
|
Invalidate.
Definition at line 41 of file bbox.H. References BBOX::_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 BBOX::_max, BBOX::_min, and BBOX::_valid. Referenced by GESTURE::init(). |
|
Definition at line 41 of file sps.H. References _display. Referenced by build_octree(), generate_samples(), and sps(). |
|
Definition at line 39 of file sps.H. References _leaf. Referenced by build_octree(), generate_samples(), and sps(). |
|
Definition at line 328 of file sps.C. References _children, _display, _height, _leaf, _neibors, _parent, BBOX::BBOX(), BBOX::dim(), get_children(), get_disp(), get_leaf(), j, BBOX::max(), BBOX::min(), neibors(), ARRAY< T >::num(), BBOX::overlaps(), and set_neibors(). Referenced by generate_samples(), set_neibors(), and sps(). |
|
Definition at line 367 of file sps.C. References _children, _display, _leaf, _term_index, and set_terms(). |
|
Definition at line 382 of file sps.C. References _terms, and ARRAY< T >::clear(). Referenced by generate_samples(), set_terms(), and sps(). |
|
Definition at line 48 of file sps.H. References _terms. Referenced by generate_samples(), and sps(). |
|
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 BBOX::operator+=(). |
|
Is bounding box a valid one?
Definition at line 43 of file bbox.H. References BBOX::_valid. Referenced by BODY::bb_valid(), BMESH::get_bb(), GEOM::is_3D(), BBOX::is_off_screen(), and BBOX::operator==(). |
|
Definition at line 53 of file bbox.H. References BBOX::_max, and BBOX::_min. |
|
The result of transformation of bounding box b by given world-space transform x.
|
|
Output bounding box info to text stream.
|
|
Definition at line 60 of file sps.H. Referenced by get_area(), and OctreeNode(). |
|
Definition at line 66 of file sps.H. Referenced by build_octree(), get_children(), set_neibors(), set_terms(), and ~OctreeNode(). |
|
Definition at line 62 of file sps.H. Referenced by get_disp(), OctreeNode(), set_disp(), set_neibors(), and set_terms(). |
|
Definition at line 59 of file sps.H. Referenced by build_octree(), get_height(), and set_neibors(). |
|
Definition at line 67 of file sps.H. Referenced by build_octree(), intersects(), and ~OctreeNode(). |
|
Definition at line 61 of file sps.H. Referenced by build_octree(), get_leaf(), OctreeNode(), set_leaf(), set_neibors(), set_terms(), and ~OctreeNode(). |
|
One of the two corners defining the box extent.
Definition at line 29 of file bbox.H. Referenced by BBOX::center(), BBOX::dim(), BBOX::max(), OctreeNode(), BBOX::points(), BBOX::set(), and BBOX::volume(). |
|
One of the two corners defining the box extent.
Definition at line 30 of file bbox.H. Referenced by BBOX::center(), BBOX::dim(), BBOX::min(), OctreeNode(), BBOX::points(), BBOX::set(), and BBOX::volume(). |
|
Definition at line 64 of file sps.H. Referenced by neibors(), set_neibors(), and ~OctreeNode(). |
|
Definition at line 63 of file sps.H. Referenced by parent(), and set_neibors(). |
|
Definition at line 59 of file sps.H. Referenced by get_term_index(), and set_terms(). |
|
Definition at line 65 of file sps.H. Referenced by set_terms(), terms(), and ~OctreeNode(). |
|
is bounding box valid?
Definition at line 28 of file bbox.H. Referenced by OctreeNode(), BBOX::overlaps(), BBOX::points(), BBOX::reset(), BBOX::set(), and BBOX::valid(). |