VR-Forces 4.0.4 Class Documentation
include/gdb/refGroup.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2001 MaK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: refGroup.h,v $ $Revision: 1.8 $ $State: Exp $
00007 *********************************************************************/
00008 
00009 #ifndef refGroup_H_
00010 #define refGroup_H_
00011 
00012 #include "gdb/gdbDefines.h"
00013 #include "gdb/group.h"
00014 
00015 // class DtRefGroup:
00016 //
00017 // Instances of DtRefGroup are just DtGroups that only own children that are
00018 // DtRefGroups.  Any other children are just references to nodes owned by
00019 // other DtGroups.
00020 //
00021 class DT_DLL_gdb DtRefGroup : public DtGroup
00022 {
00023 public:
00024 
00025    // default constructor
00026    DtRefGroup();
00027 
00028    // copy constructor
00029    DtRefGroup(const DtRefGroup& orig);
00030 
00031    // destructor
00032    virtual ~DtRefGroup();
00033 
00034    // assignment operator
00035    DtRefGroup& operator=(const DtRefGroup& orig);
00036 
00037    // returns the type of gdb node
00038    virtual DtGdbNodeType type() const;
00039 
00040    // Return the minimum terrain file version number that this Node can be
00041    // saved in.
00042    virtual DtTerrainFileVersionNumber minSaveVersion() const;
00043 
00044    // Finds and removes all instances of node type searchType in the tree
00045    // below this node.  This call does not delete the nodes unless they happen
00046    // to be other DtRefGroups.  It also only recurses down into other
00047    // DtRefGroups.
00048    virtual void purgeAllInstancesOf(const DtGdbNodeType searchType);
00049 
00050    // Finds and removes all instances of every DtRefGroup node type in the
00051    // tree below this node; deletes them if they are not memory managed.  It
00052    // returns this.
00053    virtual DtGdbNode* purgeAll();
00054 
00055    //
00056    // THE FOLLOWING FUNCTIONS ARE CURRENTLY UNIMPLEMENTED AND ARE HERE JUST TO
00057    // PREVENT THE BASE CLASS ONES FROMN BEING CALLED.
00058    //
00059 
00060    // Reconstitute the group after each child is reduced, eliminating 
00061    // child nodes that reduce to null.
00062    virtual void reduceChildren(int& numReductions);
00063 
00064    // reduce the group object to eliminate redundant nodes.
00065    virtual DtGdbNode* reduce(int& numReductions);
00066 
00067    //Finds and replaces all three-sided polygons with triangles
00068    //in the tree below this node.  
00069    void polygonToTriangle(DtMemoryManager* memMgr,
00070                           unsigned int& numIndConverted, 
00071                           unsigned int& numIndTotal); 
00072 
00073 
00074    //This method returns a balanced-tree.  branching is the maximum
00075    //branching factor, and bushiness is the number of leaves in the last
00076    //group.  This function leaves the old tree intact.
00077    virtual DtGroup* balanced(unsigned int branching, unsigned int bushiness);
00078 
00079    //This method returns a balanced-tree.  branching is the maximum
00080    //branching factor, and bushiness is the number of leaves in the last
00081    //group.  This function purges the groups in the old tree.
00082    virtual DtGroup* balancedAndPurged(unsigned int branching, unsigned int bushiness); 
00083 
00084    virtual int sizeInBytes() const;
00085 
00086 protected:
00087 
00088 };
00089 
00090 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)