![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /********************************************************************* 00002 ** Copyright (c) 2005 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: ssGdbNodeIntersector.h,v $ $Revision: 1.7 $ $State: Exp $ 00007 *********************************************************************/ 00008 #ifndef ssGdbNodeIntersector_H_ 00009 #define ssGdbNodeIntersector_H_ 00010 00011 #include "gdb/gdbDefines.h" 00012 #include <vlutil/vlConfig.h> 00013 #include "geometry/spatialSubdivision.h" 00014 #include "geometry/ssFunctor.h" 00015 00016 00017 class DtGdbNode; 00018 00019 // 00020 // The DtSsGdbNodeIntersector class is responsible for knowing how to 00021 // intersect DtGdbNodes and DtSpatialSubdivisions. 00022 // 00023 class DT_DLL_gdb DtSsGdbNodeIntersector 00024 { 00025 public: 00026 // Constructor 00027 DtSsGdbNodeIntersector(); 00028 00029 // Destructor 00030 virtual ~DtSsGdbNodeIntersector(); 00031 00032 protected: 00033 // Copy constructor & Assignment operator - not implemented 00034 DtSsGdbNodeIntersector(const DtSsGdbNodeIntersector& orig); 00035 DtSsGdbNodeIntersector& operator=(const DtSsGdbNodeIntersector& orig); 00036 00037 public: 00038 00039 // Intersects the gdbNode and spatial subdivision. If the node is of type 00040 // DtGroup, then it recursively intersects all the nodes children with the 00041 // spatial subdivision until they are either not a DtGroup node, or are 00042 // contained in a single cell. At that point, the functor is called with the 00043 // appropriate cells. 00044 // 00045 // @returns a boolean indicating whether or not any intersection occurs. 00046 virtual bool intersect(DtGdbNode* gdbNode, 00047 DtSpatialSubdivision<DtGdbNode*>& spatialSubdivision, 00048 DtSsFunctor<DtGdbNode*, DtSpatialSubdivision<DtGdbNode*>::DtSpatialSubCellType>& functor) const; 00049 00050 00051 }; 00052 00053 00054 00055 #endif