#include <BoundedKDTree.h>
Classes | |
| class | Node |
Public Types | |
| typedef BoundIterator | Iterator |
| typedef std::iterator_traits < BoundIterator >::value_type | Bound |
| typedef BoxTraits< Bound > ::BaseType | BaseType |
| typedef std::vector< Node > | NodeVector |
| typedef NodeVector::size_type | NodeIndex |
Public Member Functions | |
| BoundedKDTree () | |
| BoundedKDTree (BoundIterator first, BoundIterator last, int maxLeafSize=4) | |
| void | init (BoundIterator first, BoundIterator last, int maxLeafSize=4) |
| template<typename S > | |
| unsigned int | intersectingBounds (const S &b, std::vector< BoundIterator > &bounds) const |
| NodeIndex | numNodes () const |
| Returns the number of nodes in the tree. | |
| const Node & | node (NodeIndex idx) const |
| Retrieve the node associated with a given index. | |
| NodeIndex | rootIndex () const |
| Returns the index for the root node. | |
Static Public Member Functions | |
| static NodeIndex | lowChildIndex (NodeIndex index) |
| Retrieve the index of the "low" child node. | |
| static NodeIndex | highChildIndex (NodeIndex index) |
| Retrieve the index of the "high" child node. | |
| typedef BoxTraits<Bound>::BaseType IECore::BoundedKDTree< BoundIterator >::BaseType |
| typedef std::iterator_traits<BoundIterator>::value_type IECore::BoundedKDTree< BoundIterator >::Bound |
| typedef BoundIterator IECore::BoundedKDTree< BoundIterator >::Iterator |
| typedef NodeVector::size_type IECore::BoundedKDTree< BoundIterator >::NodeIndex |
| typedef std::vector<Node> IECore::BoundedKDTree< BoundIterator >::NodeVector |
| IECore::BoundedKDTree< BoundIterator >::BoundedKDTree | ( | ) |
Construncts an uninitialised tree - you must call init() before using it.
| IECore::BoundedKDTree< BoundIterator >::BoundedKDTree | ( | BoundIterator | first, | |
| BoundIterator | last, | |||
| int | maxLeafSize = 4 | |||
| ) |
Creates a tree for the fast searching of bounds. Note that the tree does not own the passed bounds - it is up to you to ensure that they remain valid and unchanged as long as the BoundedKDTree is in use.
| static NodeIndex IECore::BoundedKDTree< BoundIterator >::highChildIndex | ( | NodeIndex | index | ) | [static] |
Retrieve the index of the "high" child node.
Referenced by IECore::MeshPrimitiveEvaluator::intersectionPointsWalk(), IECore::MeshPrimitiveEvaluator::intersectionPointWalk(), and IECore::MeshPrimitiveEvaluator::pointAtUVWalk().
| void IECore::BoundedKDTree< BoundIterator >::init | ( | BoundIterator | first, | |
| BoundIterator | last, | |||
| int | maxLeafSize = 4 | |||
| ) |
Builds the tree for the specified bounds - the iterator range must remain valid and unchanged as long as the tree is in use. This method can be called again to rebuild the tree at any time.
| unsigned int IECore::BoundedKDTree< BoundIterator >::intersectingBounds | ( | const S & | b, | |
| std::vector< BoundIterator > & | bounds | |||
| ) | const [inline] |
Populates the passed vector of iterators with the bounds which intersect "b". Returns the number of bounds found.
| static NodeIndex IECore::BoundedKDTree< BoundIterator >::lowChildIndex | ( | NodeIndex | index | ) | [static] |
Retrieve the index of the "low" child node.
Referenced by IECore::MeshPrimitiveEvaluator::intersectionPointsWalk(), IECore::MeshPrimitiveEvaluator::intersectionPointWalk(), and IECore::MeshPrimitiveEvaluator::pointAtUVWalk().
| const Node& IECore::BoundedKDTree< BoundIterator >::node | ( | NodeIndex | idx | ) | const |
Retrieve the node associated with a given index.
Referenced by IECore::MeshPrimitiveEvaluator::intersectionPointsWalk(), IECore::MeshPrimitiveEvaluator::intersectionPointWalk(), IECore::MeshPrimitiveEvaluator::pointAtUVWalk(), and IECore::MeshPrimitiveEvaluator::uvBound().
| NodeIndex IECore::BoundedKDTree< BoundIterator >::numNodes | ( | ) | const [inline] |
Returns the number of nodes in the tree.
| NodeIndex IECore::BoundedKDTree< BoundIterator >::rootIndex | ( | ) | const |
Returns the index for the root node.
Referenced by IECore::CurvesPrimitiveEvaluator::closestPoint(), IECore::MeshPrimitiveEvaluator::intersectionPoint(), IECore::MeshPrimitiveEvaluator::intersectionPoints(), IECore::MeshPrimitiveEvaluator::pointAtUV(), and IECore::MeshPrimitiveEvaluator::uvBound().
1.5.8