VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
refGroup.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2001 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: refGroup.h,v $ $Revision: 1.8 $ $State: Exp $
7 *********************************************************************/
8 
9 #ifndef refGroup_H_
10 #define refGroup_H_
11 
12 #include "gdb/gdbDefines.h"
13 #include "gdb/group.h"
14 
15 // class DtRefGroup:
16 //
17 // Instances of DtRefGroup are just DtGroups that only own children that are
18 // DtRefGroups. Any other children are just references to nodes owned by
19 // other DtGroups.
20 //
22 {
23 public:
24 
25  // default constructor
26  DtRefGroup();
27 
28  // copy constructor
29  DtRefGroup(const DtRefGroup& orig);
30 
31  // destructor
32  virtual ~DtRefGroup();
33 
34  // assignment operator
35  DtRefGroup& operator=(const DtRefGroup& orig);
36 
37  // returns the type of gdb node
38  virtual DtGdbNodeType type() const;
39 
40  // Return the minimum terrain file version number that this Node can be
41  // saved in.
43 
44  // Finds and removes all instances of node type searchType in the tree
45  // below this node. This call does not delete the nodes unless they happen
46  // to be other DtRefGroups. It also only recurses down into other
47  // DtRefGroups.
48  virtual void purgeAllInstancesOf(const DtGdbNodeType searchType);
49 
50  // Finds and removes all instances of every DtRefGroup node type in the
51  // tree below this node; deletes them if they are not memory managed. It
52  // returns this.
53  virtual DtGdbNode* purgeAll();
54 
55  //
56  // THE FOLLOWING FUNCTIONS ARE CURRENTLY UNIMPLEMENTED AND ARE HERE JUST TO
57  // PREVENT THE BASE CLASS ONES FROMN BEING CALLED.
58  //
59 
60  // Reconstitute the group after each child is reduced, eliminating
61  // child nodes that reduce to null.
62  virtual void reduceChildren(int& numReductions);
63 
64  // reduce the group object to eliminate redundant nodes.
65  virtual DtGdbNode* reduce(int& numReductions);
66 
67  //Finds and replaces all three-sided polygons with triangles
68  //in the tree below this node.
70  unsigned int& numIndConverted,
71  unsigned int& numIndTotal);
72 
73 
74  //This method returns a balanced-tree. branching is the maximum
75  //branching factor, and bushiness is the number of leaves in the last
76  //group. This function leaves the old tree intact.
77  virtual DtGroup* balanced(unsigned int branching, unsigned int bushiness);
78 
79  //This method returns a balanced-tree. branching is the maximum
80  //branching factor, and bushiness is the number of leaves in the last
81  //group. This function purges the groups in the old tree.
82  virtual DtGroup* balancedAndPurged(unsigned int branching, unsigned int bushiness);
83 
84  virtual int sizeInBytes() const;
85 
86 protected:
87 
88 };
89 
90 #endif
virtual DtGdbNode * purgeAll()
Definition: memoryManager.h:33
Definition: group.h:28
Definition: refGroup.h:21
virtual void polygonToTriangle(DtMemoryManager *memMgr, unsigned int &numIndConverted, unsigned int &numIndTotal)
DtGroup & operator=(const DtGroup &orig)
DtGdbNodeType
Definition: gdbNode.h:48
virtual void purgeAllInstancesOf(const DtGdbNodeType searchType)
Definition: gdbNode.h:44
virtual DtGdbNodeType type() const
Definition: group.h:234
#define DT_DLL_gdb
Definition: gdbDefines.h:25
virtual void reduceChildren(int &numReductions)
virtual DtTerrainFileVersionNumber minSaveVersion() const
virtual int sizeInBytes() const
DtTerrainFileVersionNumber
Definition: terrainReader.h:17
virtual DtGroup * balanced(unsigned int branching, unsigned int bushiness)
virtual DtGroup * balancedAndPurged(unsigned int branching, unsigned int bushiness)
virtual DtGdbNode * reduce(int &numReductions)

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)