Support Forum G3D Web Page |
Wrapper for a value that includes a cache of its bounds. More...
Public Member Functions | |
Handle () | |
Handle (const T &v) | |
size_t | hashCode () const |
bool | operator== (const Handle &other) const |
Public Attributes | |
AABox | bounds |
The bounds of each object are constrained to AABox::large. More... | |
Vector3 | center |
Center of bounds. More... | |
T | value |
Wrapper for a value that includes a cache of its bounds.
Except for the test value used in a set-query operation, there is only ever one instance of the handle associated with any value and the memberTable and Nodes maintain pointers to that heap-allocated value.
|
inline |
|
inline |
|
inline |
|
inline |
AABox G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Handle::bounds |
The bounds of each object are constrained to AABox::large.
Referenced by G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Handle::Handle(), G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::insert(), G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::makeNode(), G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::BoundsComparator::operator()(), and G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Comparator::operator()().
Vector3 G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Handle::center |
Center of bounds.
We cache this value to avoid recomputing it during the median sort, and because MSVC 6 std::sort goes into an infinite loop if we compute the midpoint on the fly (possibly a floating point roundoff issue, where B<A and A<B both are true).
Referenced by G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Handle::Handle(), and G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::CenterComparator::operator()().
T G3D::KDTree< T, BoundsFunc, HashFunc, EqualsFunc >::Handle::value |