VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
gdb
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
//
21
class
DT_DLL_gdb
DtRefGroup
:
public
DtGroup
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.
42
virtual
DtTerrainFileVersionNumber
minSaveVersion
()
const
;
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.
69
void
polygonToTriangle
(
DtMemoryManager
* memMgr,
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
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)