VR-Forces 4.6.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
gdb
pointQuadtreeNode.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 2001 MAK Technologies, Inc.
3
** All rights reserved.
4
*********************************************************************/
5
/*********************************************************************
6
** $RCSfile: pointQTree.h,v $ $Revision: 1.12 $ $State: Exp $
7
*********************************************************************/
8
// \file pointQTree.h
9
// \brief Contains the DtPointQuadTreeNode class definition.
10
11
#ifndef pointQuadtreeNode_H_
12
#define pointQuadtreeNode_H_
13
14
#include "
gdb/gdbDefines.h
"
15
#include <stdio.h>
16
#include <vlutil/vlNetTypes.h>
17
#include <vlutil/vlConfig.h>
18
#include <list>
19
20
class
DtNetworkNode
;
21
class
DtNetworkNodeMetric
;
22
23
//
24
// DtPointQuadtreeNode is a node for a point quadtree.
25
class
DT_DLL_gdb
DtPointQuadtreeNode
26
{
27
public
:
28
29
// default constructor
30
DtPointQuadtreeNode
();
31
32
// constructor with network node
33
DtPointQuadtreeNode
(
DtNetworkNode
* networkNode);
34
35
// destructor
36
virtual
~
DtPointQuadtreeNode
();
37
38
private
:
39
40
// copy constructor (not implemented)
41
DtPointQuadtreeNode
(
const
DtPointQuadtreeNode
& orig);
42
43
// assignment operator (not implemented)
44
DtPointQuadtreeNode
& operator=(
const
DtPointQuadtreeNode
& orig);
45
46
public
:
47
48
typedef
std::list<const DtNetworkNode*>
DtPtrConstNodeContainer
;
49
typedef
DtPtrConstNodeContainer::const_iterator
DtPtrConstNodeConstIter
;
50
typedef
DtPtrConstNodeContainer::iterator
DtPtrConstNodeIter
;
51
52
typedef
std::list<DtNetworkNode*>
DtPtrNodeContainer
;
53
typedef
DtPtrNodeContainer::const_iterator
DtPtrNodeConstIter
;
54
typedef
DtPtrNodeContainer::iterator
DtPtrNodeIter
;
55
56
// add a new network node (the lower and left boundaries in
57
// each quad are closed)
58
virtual
void
add(
DtNetworkNode
& newNetworkNode);
59
60
// collect all nodes that are validated by the metric
61
virtual
void
collectAllNodes(
const
DtNetworkNodeMetric
& metric,
62
DtPtrConstNodeContainer
& collectedNodes)
const
;
63
virtual
void
collectAllNodes(
const
DtNetworkNodeMetric
& metric,
64
DtPtrNodeContainer
& collectedNodes);
65
66
// find the best valid node in the tree as measured by the metric
67
virtual
const
DtNetworkNode
* findBestNode(
const
DtNetworkNodeMetric
& metric)
const
;
68
69
// resets the state of the quadtree to an empty, initial state.
70
// (same as state resulting from *default constructor*)
71
virtual
void
clear();
72
73
virtual
int
size
()
const
;
74
75
virtual
int
sizeInBytes()
const
;
76
77
protected
:
78
79
// Adds the node to the specified quadrant. If the quadrant is 0, then it is
80
// allocated with the node as the construction parameter.
81
void
addToQuadrant(
DtPointQuadtreeNode
*& quadrant,
DtNetworkNode
& element);
82
83
// find the best valid node in a subtree. pointer best must be valid. Using
84
// this prevents the metric from being re-evaluated on the same node.
85
virtual
const
DtNetworkNode
* findBestInSubtree(
const
DtNetworkNodeMetric
& metric,
86
double
& bestCost)
const
;
87
88
protected
:
89
90
DtNetworkNode
*
myElement
;
91
DtPointQuadtreeNode
*
mySW
;
92
DtPointQuadtreeNode
*
mySE
;
93
DtPointQuadtreeNode
*
myNE
;
94
DtPointQuadtreeNode
*
myNW
;
95
};
96
97
#endif
Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)