VR-Forces 4.7 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
geometry
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
// \file spatialSubdivisionIntersector.h
9
// \ingroup geometry
10
11
#include <
geometry/spatialSubdivision.h
>
12
#include <
geometry/ssFunctor.h
>
13
#include <
geometry/extent.h
>
14
15
#include <vlutil/vlConfig.h>
16
21
template
<
typename
T>
22
class
DtSpatialSubdivisionIntersector
23
{
24
public
:
26
DtSpatialSubdivisionIntersector
()
27
{
28
29
};
30
32
virtual
~DtSpatialSubdivisionIntersector
()
33
{
34
35
};
36
40
virtual
bool
intersect
(T element,
41
DtSpatialSubdivision<T>
& spatialSubdivision)
const
42
{
43
bool
retVal =
false
;
44
45
DtSsExtentIntersector<T>
extentIntersector;
46
47
if
(extentIntersector.
intersect
(
48
element->extent(), spatialSubdivision))
49
{
50
// Found an intersection
51
retVal =
true
;
52
}
53
else
54
{
55
DtVerbose(
"Warning: DtSpatialSubdivisionIntersector::intersect - "
56
"The specified node does not intersect the spatial subdivision.\n"
);
57
}
58
59
return
retVal;
60
};
61
67
virtual
bool
intersect
(T element,
68
DtSpatialSubdivision<T>
& spatialSubdivision,
69
DtSsFunctor
<T,
typename
DtSpatialSubdivision<T>::DtSpatialSubCellType
>& functor)
const
70
{
71
bool
retVal =
false
;
72
73
DtSsExtentIntersector<T>
extentIntersector;
74
if
(extentIntersector.
intersect
(element, spatialSubdivision, functor))
75
{
76
// Found an intersection
77
retVal =
true
;
78
}
79
else
80
{
81
DtVerbose(
"Warning: DtSpatialSubdivisionIntersector::intersect - "
82
"The specified node does not intersect the spatial subdivision.\n"
);
83
}
84
85
return
retVal;
86
};
87
88
protected
:
90
DtSpatialSubdivisionIntersector
(
const
DtSpatialSubdivisionIntersector
& orig);
91
DtSpatialSubdivisionIntersector
&
operator=
(
const
DtSpatialSubdivisionIntersector
& orig);
92
93
private
:
94
95
};
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)