VR-Forces 4.5 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrfutil
spatialSubdivisionIntersector.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 2014 MAK Technologies, Inc.
3
** All rights reserved.
4
*********************************************************************/
5
6
#pragma once
7
8
//Note that this class has also been added to makTerrainToolkit trunk
9
//(revision 140069) in geometry, and should be removed once we update past that
10
//version.
11
14
15
#include <
geometry/spatialSubdivision.h
>
16
#include <
geometry/ssExtentIntersector.h
>
17
#include <
geometry/ssFunctor.h
>
18
#include <
geometry/extent.h
>
19
20
#include <vlutil/vlConfig.h>
21
26
template
<
typename
T>
27
class
DtSpatialSubdivisionIntersector
28
{
29
public
:
31
DtSpatialSubdivisionIntersector
()
32
{
33
34
};
35
37
virtual
~DtSpatialSubdivisionIntersector
()
38
{
39
40
};
41
45
virtual
bool
intersect
(T element,
46
DtSpatialSubdivision<T>
& spatialSubdivision)
const
47
{
48
bool
retVal =
false
;
49
50
DtSsExtentIntersector<T>
extentIntersector;
51
52
if
(extentIntersector.
intersect
(
53
element->extent(), spatialSubdivision))
54
{
56
retVal =
true
;
57
}
58
else
59
{
60
DtVerbose(
"Warning: DtSpatialSubdivisionIntersector::intersect - "
61
"The specified node does not intersect the spatial subdivision.\n"
);
62
}
63
64
return
retVal;
65
};
66
72
virtual
bool
intersect
(T element,
73
DtSpatialSubdivision<T>
& spatialSubdivision,
74
DtSsFunctor
<T,
typename
DtSpatialSubdivision<T>::DtSpatialSubCellType
>& functor)
const
75
{
76
bool
retVal =
false
;
77
78
DtSsExtentIntersector<T>
extentIntersector;
79
if
(extentIntersector.
intersect
(element, spatialSubdivision, functor))
80
{
82
retVal =
true
;
83
}
84
else
85
{
86
DtVerbose(
"Warning: DtSpatialSubdivisionIntersector::intersect - "
87
"The specified node does not intersect the spatial subdivision.\n"
);
88
}
89
90
return
retVal;
91
};
92
93
protected
:
95
DtSpatialSubdivisionIntersector
(
const
DtSpatialSubdivisionIntersector
& orig);
96
DtSpatialSubdivisionIntersector
&
operator=
(
const
DtSpatialSubdivisionIntersector
& orig);
97
98
private
:
99
100
};
Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (
www.mak.com
)