hxa7241_graphics::OctreeVisitor< TYPE > Class Template Reference

#include <Octree.h>

Inheritance diagram for hxa7241_graphics::OctreeVisitor< TYPE >:

Inheritance graph
[legend]
Collaboration diagram for hxa7241_graphics::OctreeVisitor< TYPE >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~OctreeVisitor ()
virtual void visitRootV (const OctreeCell *pRootCell, const OctreeData &octreeData)
 void-to-type forwarders
virtual void visitBranchV (const OctreeCell *subCells[8], const OctreeData &octreeData)
virtual void visitLeafV (const Array< const void * > &items, const OctreeData &octreeData)

Protected Member Functions

 OctreeVisitor ()
 standard object services ---------------------------------------------------
virtual void visitRoot (const OctreeCell *pRootCell, const OctreeData &octreeData)=0
 commands -------------------------------------------------------------------
virtual void visitBranch (const OctreeCell *subCells[8], const OctreeData &octreeData)=0
virtual void visitLeaf (const Array< const TYPE * > &items, const OctreeData &octreeData)=0

Detailed Description

template<class TYPE>
class hxa7241_graphics::OctreeVisitor< TYPE >

Visitor abstract base, for client use with Octree.

Client of Octree must define a concrete derivative of OctreeVisitor<ItemType>.

This is a reversal of the Visitor pattern: it allows an operation to be performed with the Octree, except the Octree is merely read from and it is the visitor that is modified.

The visit methods are called by the tree nodes during the visit operation. The parameters supply the cell and boundary info. The implementation can call visit on the supplied cell.

The implementation of visitBranch needs to make the OctreeData to be given in each call of visit.

Subcell numbering:

    y z       6 7
    |/   2 3  4 5
     -x  0 1
 
in binary:
    y z           110 111
    |/   010 011  100 101
     -x  000 001
 

The ___V methods simply apply a type-cast to void*s and forward to their abstract counterparts.


Constructor & Destructor Documentation

template<class TYPE>
hxa7241_graphics::OctreeVisitor< TYPE >::OctreeVisitor (  )  [inline, protected]

standard object services ---------------------------------------------------

template<class TYPE>
virtual hxa7241_graphics::OctreeVisitor< TYPE >::~OctreeVisitor (  )  [inline, virtual]


Member Function Documentation

template<class TYPE>
void hxa7241_graphics::OctreeVisitor< TYPE >::visitRootV ( const OctreeCell pRootCell,
const OctreeData octreeData 
) [inline, virtual]

void-to-type forwarders

Implements hxa7241_graphics::OctreeVisitorV.

template<class TYPE>
void hxa7241_graphics::OctreeVisitor< TYPE >::visitBranchV ( const OctreeCell subCells[8],
const OctreeData octreeData 
) [inline, virtual]

Implements hxa7241_graphics::OctreeVisitorV.

template<class TYPE>
void hxa7241_graphics::OctreeVisitor< TYPE >::visitLeafV ( const Array< const void * > &  items,
const OctreeData octreeData 
) [inline, virtual]

Implements hxa7241_graphics::OctreeVisitorV.

template<class TYPE>
virtual void hxa7241_graphics::OctreeVisitor< TYPE >::visitRoot ( const OctreeCell pRootCell,
const OctreeData octreeData 
) [protected, pure virtual]

commands -------------------------------------------------------------------

Called by Octree when visit traversal is at the root.

To continue deeper, implementation calls OctreeRoot::continueVisit( pRootCell, octreeData, *this ). pRootCell can be null.

See also:
OctreeData

Implemented in Octree_Visitor_Check_Face, Octree_Visitor_Face, Octree_Visitor_Measure, and Octree_Visitor_Update.

template<class TYPE>
virtual void hxa7241_graphics::OctreeVisitor< TYPE >::visitBranch ( const OctreeCell subCells[8],
const OctreeData octreeData 
) [protected, pure virtual]

Called by Octree when visit traversal is at a branch.

To continue deeper, implementation calls OctreeBranch::continueVisit( subCells, octreeData, subCellIndex, *this ) for any/all subCellIndex values. subCells elements can be null.

See also:
OctreeData

Implemented in Octree_Visitor_Check_Face, Octree_Visitor_Face, Octree_Visitor_Measure, and Octree_Visitor_Update.

template<class TYPE>
virtual void hxa7241_graphics::OctreeVisitor< TYPE >::visitLeaf ( const Array< const TYPE * > &  items,
const OctreeData octreeData 
) [protected, pure virtual]

Called by Octree when visit traversal is at a leaf.

See also:
OctreeData


The documentation for this class was generated from the following file:
Generated on Fri Feb 13 13:58:44 2009 for meshmorph by  doxygen 1.5.1