VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrvCore
DtIntersectionCache.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2010 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: $ $Revision: $ $State: $
7
******************************************************************************/
8
12
13
#pragma once
14
#include <
vrvCore/vrvCore.h
>
15
#include <matrix/vlVector.h>
16
17
namespace
makVrv
18
{
19
class
DtIntersectorResult;
20
25
class
DT_DLL_VRVCORE
DtIntersectionCache
26
{
27
public
:
29
virtual
~
DtIntersectionCache
();;
30
32
virtual
void
setCacheFromIntersectionResult(
const
DtIntersectorResult
& result ) = 0;
33
36
virtual
bool
intersectWithCache(
const
DtVector
&
point
,
const
DtVector
& dir,
37
DtVector
& hitPoint,
DtVector
& hitNormal ) = 0;
38
39
protected
:
40
42
DtIntersectionCache
();;
43
};
44
48
class
DT_DLL_VRVCORE
DtTriangleIntersectionCache
:
public
DtIntersectionCache
49
{
50
public
:
52
DtTriangleIntersectionCache
();
53
55
virtual
~
DtTriangleIntersectionCache
();
56
58
virtual
void
setCacheFromIntersectionResult(
const
DtIntersectorResult
& result );
59
63
virtual
bool
intersectWithCache(
const
DtVector
&
point
,
const
DtVector
& dir,
64
DtVector
& hitPoint,
DtVector
& hitNormal );
65
66
protected
:
68
bool
intersectRayTriangle(
const
DtVector
& point,
const
DtVector
& dir,
69
DtVector
& hitPoint );
70
71
protected
:
72
bool
myCacheSet
;
73
DtVector
myVert0
;
74
DtVector
myVert1
;
75
DtVector
myVert2
;
76
DtVector
myNormal
;
77
};
78
79
}
80
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
)