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
vrvCore
DtIntersectorCache.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2010 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: DtIntersectorCache.h,v $ $Revision: 1.9 $ $State: Exp $
7
******************************************************************************/
8
15
16
#pragma once
17
18
#include <
vrvCore/DtIntersector.h
>
19
#include <
vrvCore/DtIntersectorCacheKey.h
>
20
#include <boost/unordered_map.hpp>
21
22
#include <matrix/vlVector.h>
23
#include <map>
24
25
namespace
makVrv
26
{
31
class
DT_DLL_VRVCORE
DtIntersectorCache
32
{
33
public
:
35
DtIntersectorCache
();
36
38
virtual
~
DtIntersectorCache
();
39
42
void
setCacheLimit(
int
);
43
int
cacheLimit()
const
;
44
46
virtual
bool
cachedPointResult(
DtIntersector::IntersectProperties
p,
47
DtIntersector::DynamicOceanProperties
op,
double
x,
double
y,
double
z,
48
DtIntersector::DtIntersections
&);
49
51
virtual
void
addCachedPointResult(
52
DtIntersector::IntersectProperties
p,
53
DtIntersector::DynamicOceanProperties
op,
double
x,
double
y,
54
double
z,
const
DtIntersector::DtIntersections
&);
55
57
virtual
bool
cachedLineResult(
DtIntersector::IntersectProperties
p,
58
DtIntersector::DynamicOceanProperties
op,
59
double
x,
double
y,
double
z,
double
end_x,
double
end_y,
double
end_z,
60
DtIntersector::DtIntersections
&);
61
63
virtual
void
addCachedLineResult(
64
DtIntersector::IntersectProperties
p,
65
DtIntersector::DynamicOceanProperties
op,
double
x,
double
y,
66
double
z,
double
end_x,
double
end_y,
double
end_z,
67
const
DtIntersector::DtIntersections
&);
68
70
virtual
void
clear();
71
72
protected
:
75
typedef
std::pair<DtIntersector::DtIntersections, int>
PointInformation
;
76
typedef
boost::unordered_map<std::size_t, PointInformation>
PointCache
;
77
79
typedef
std::vector<std::size_t>
KeyVector
;
80
typedef
std::map<int, KeyVector>
CacheEntries
;
81
82
virtual
void
addToCache(
const
DtIntersectorCacheKey
&);
83
virtual
void
updateCache(PointCache::iterator&);
84
86
virtual
void
removeFromCache();
87
88
protected
:
89
PointCache
myPointCache
;
90
CacheEntries
myCacheEntries
;
91
92
unsigned
int
myCacheLimit
;
93
unsigned
int
myTotalCacheSize
;
94
};
95
}
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
)