|
| void | AddElement (typename TCallTraits< ElementType >::ConstReference Element) |
| | Adds an element to the octree. 更多...
|
| |
|
void | ApplyOffset (const FVector &InOffset, bool bGlobalOctree=false) |
| | Apply an arbitrary offset to all elements in the tree InOffset - offset to apply bGlobalOctree - hint that this octree is used as a boundless global volume, so only content will be shifted but not origin of the octree
|
| |
|
void | Destroy () |
| | this function resets the octree to empty.
|
| |
|
void | DumpStats () const |
| | Writes stats for the octree to the log.
|
| |
| template<typename IterateAllElementsFunc > |
| void | FindAllElements (const IterateAllElementsFunc &Func) const |
| | this function will call the passed in function for all elements in the Octree in node by node in no specified order. 更多...
|
| |
| template<typename IterateBoundsFunc > |
| void | FindElementsWithBoundsTest (const FBoxCenterAndExtent &BoxBounds, const IterateBoundsFunc &Func) const |
| | this function will traverse the Octree using a fast box-box interssection this should be the preferred way of traversing the tree. 更多...
|
| |
| template<typename PredicateFunc , typename IterateFunc > |
| void | FindElementsWithPredicate (const PredicateFunc &Predicate, const IterateFunc &Func) const |
| | this function will traverse the Octree starting from the root in depth first order and the predicate can be used to implement custom culling for each node. 更多...
|
| |
| template<typename IterateBoundsFunc > |
| void | FindFirstElementWithBoundsTest (const FBoxCenterAndExtent &BoxBounds, const IterateBoundsFunc &Func) const |
| | this function will traverse the Octree using a fast box-box intersection and aborts traversal as soon as the Element function returns false. 更多...
|
| |
| template<typename IterateBoundsFunc > |
| void | FindNearbyElements (const FVector &Position, const IterateBoundsFunc &Func) const |
| | this function will traverse the Octree using a tryint to find nearby nodes that contain any elements. 更多...
|
| |
| template<typename PredicateFunc , typename IterateFunc > |
| void | FindNodesWithPredicate (const PredicateFunc &Predicate, const IterateFunc &Func) const |
| | this function will traverse the Octree starting from the root in depth first order and the predicate can be used to implement custom culling for each node. 更多...
|
| |
|
ElementType & | GetElementById (FOctreeElementId2 ElementId) |
| | Accesses an octree element by ID.
|
| |
|
const ElementType & | GetElementById (FOctreeElementId2 ElementId) const |
| | Accesses an octree element by ID.
|
| |
| TArrayView< const ElementType > | GetElementsForNode (FNodeIndex NodeIndex) const |
| | return all elements for a given node. 更多...
|
| |
| bool | IsValidElementId (FOctreeElementId2 ElementId) const |
| | check if a FOctreeElementId2 is valid. 更多...
|
| |
| void | RemoveElement (FOctreeElementId2 ElementId) |
| | Removes an element from the octree. 更多...
|
| |
| | TOctree2 () |
| | DO NOT USE. 更多...
|
| |
|
| TOctree2 (const FVector &InOrigin, float InExtent) |
| | Initialization constructor.
|
| |
template<typename ElementType, typename OctreeSemantics>
class TOctree2< ElementType, OctreeSemantics >
An octree.
template<typename ElementType , typename OctreeSemantics >
template<typename PredicateFunc , typename IterateFunc >
| void TOctree2< ElementType, OctreeSemantics >::FindElementsWithPredicate |
( |
const PredicateFunc & |
Predicate, |
|
|
const IterateFunc & |
Func |
|
) |
| const |
|
inline |
this function will traverse the Octree starting from the root in depth first order and the predicate can be used to implement custom culling for each node.
- 参数
-
| Predicate | - a Function when given the bounds of the currently traversed node that returns true if traversal should continue or false to skip that branch. |
| Func | - Function to call with each Element for nodes that passed the predicate. |
template<typename ElementType , typename OctreeSemantics >
template<typename PredicateFunc , typename IterateFunc >
| void TOctree2< ElementType, OctreeSemantics >::FindNodesWithPredicate |
( |
const PredicateFunc & |
Predicate, |
|
|
const IterateFunc & |
Func |
|
) |
| const |
|
inline |
this function will traverse the Octree starting from the root in depth first order and the predicate can be used to implement custom culling for each node.
- 参数
-
| Predicate | - a Function when given the bounds of the currently traversed node that returns true if traversal should continue or false to skip that branch. |
| Func | - Function that will receive the node ID which can be stored and later used to get the elements using GetElementsForNode for all nodes that passed the predicate. |