- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# FCDSceneNodeIteratorT< _NODE > Class Template Reference

This template is used to process a given scene node and its full sub-tree. More...

`#include <FCDSceneNodeIterator.h>`

List of all members.

## Public Types
enum | SearchType { BREADTH_FIRST, DEPTH_FIRST_PREORDER, DEPTH_FIRST_POSTORDER }
| The order in which the scene nodes should be iterated. More...
## Public Member Functions
| FCDSceneNodeIteratorT (_NODE *root, SearchType searchType=BREADTH_FIRST, bool pureChildOnly=false)
| Constructor.
| ~FCDSceneNodeIteratorT ()
| Destructor.
_NODE * | GetNode ()
| Retrieves the current node to process.
_NODE * | Next ()
| Advances the iteration pointer and retrieves the next node to process.
bool | IsDone ()
| Retrieves whether the full sub-tree has been processed.
FCDSceneNodeIteratorT & | operator++ ()
| Advances the iteration pointer.
_NODE * | operator * ()
| Retrieves the current node to process.

## Detailed Description

### template<class _NODE>
class FCDSceneNodeIteratorT< _NODE >

This template is used to process a given scene node and its full sub-tree.

We use a template here in order to easily support both const and non-const scene node data, with the same code.

Do not use this template directly, instead use the FCDSceneNodeIterator and FCDSceneNodeConstIterator definitions.

This template does not care whether multiple instances of the same node is processed.

## Member Enumeration Documentation

template<class _NODE>
enum FCDSceneNodeIteratorT::SearchType

  | The order in which the scene nodes should be iterated. Enumerator:
  BREADTH_FIRST | Iterate over the scene nodes one level at a time. Starts from the root and terminates with the leaves. Each node level is processed fully before processing the next one.
  DEPTH_FIRST_PREORDER | Standard tree traversal. Processes the root, the first child of the root, then the child's first child... until a leaf is reached. Then, the leaf's siblings are iterated over before iterating over the leaf's parent's siblings.
  DEPTH_FIRST_POSTORDER | Iterate over the scene nodes one level at a time. Starts at the leaves and terminates with the root. Each node level is processed fully before processing the next one.

## Constructor & Destructor Documentation

template<class _NODE>
FCDSceneNodeIteratorT< _NODE >::FCDSceneNodeIteratorT | ( | _NODE * | root,
|  | SearchType | searchType = `BREADTH_FIRST`,
|  | bool | pureChildOnly = `false`
| ) |

  | Constructor. Parameters:
  | root | The scene root of the sub-tree to iterate over.
  | searchType | The search type determines the ordering of the scene nodes returned by Next.
  | pureChildOnly | Only process nodes that are direct children of the root. All node instances will be discarded.

## Member Function Documentation

template<class _NODE>
_NODE* FCDSceneNodeIteratorT< _NODE >::GetNode | ( |  | ) |

| Retrieves the current node to process. Returns: The current node.

template<class _NODE>
_NODE* FCDSceneNodeIteratorT< _NODE >::Next | ( |  | ) |

| Advances the iteration pointer and retrieves the next node to process. Returns: The node to process.

template<class _NODE>
_NODE* FCDSceneNodeIteratorT< _NODE >::operator * | ( |  | ) | `[inline]`

| Retrieves the current node to process. Returns: The current node.

template<class _NODE>
FCDSceneNodeIteratorT& FCDSceneNodeIteratorT< _NODE >::operator++ | ( |  | ) | `[inline]`

| Advances the iteration pointer. Returns: The iterator.

The documentation for this class was generated from the following file:

- FCDocument/FCDSceneNodeIterator.h