VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
gdb
ssTerrainIntersector.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 2004 MAK Technologies, Inc.
3
** All rights reserved.
4
*********************************************************************/
5
/*********************************************************************
6
** $RCSfile: ssTerrainIntersector.h,v $ $Revision: 1.1 $ $State: Exp $
7
*********************************************************************/
8
#ifndef ssTerrainIntersector_H_
9
#define ssTerrainIntersector_H_
10
11
#include "
gdb/gdbDefines.h
"
12
#include "
gdb/gdbNode.h
"
13
#include "
geometry/spatialSubdivision.h
"
14
15
class
DtChord
;
16
class
DtChordIntersectionRecord
;
17
class
DtPoint
;
18
19
// class DtSSTerrainIntersector:
20
//
21
// The DtSSTerrainIntersector class is intersects the spatial subdivision that
22
// contains DtGdbNode pointers (the terrain), with the specified primitive -
23
// chord or otherwise, and provides the appropriate intersection values as a
24
// result, if an intersection occurred.
25
//
26
class
DT_DLL_gdb
DtSSTerrainIntersector
27
{
28
public
:
29
DtSSTerrainIntersector
() {};
30
31
virtual
~DtSSTerrainIntersector
() {};
32
33
// Intersects the chord with the spatial subdivision and returns the point
34
// and time along the chord of the first intersection.
35
//
36
// @param chord The chord to intersect
37
// @param spatialSubdivision The spatialSubdivision to intersect.
38
// @param intersectionPoint The location of the intersection if any.
39
// @param intersectionTime The time along the chord of the intersection, if any
40
//
41
// @returns a boolean indicating success or failure to find any intersections.
42
//
43
// @note If no intersection occurs, the intersectionPoint and Time values are
44
// not defined.
45
//
46
bool
intersect(
const
DtChord
& chord,
47
DtSpatialSubdivision<DtGdbNode*>
& spatialSubdivision,
48
DtPoint
& intersectionPoint,
49
double
& intersectionTime)
const
;
50
51
// Intersects the chord with the spatial subdivision and returns the point
52
// and time along the chord of the first intersection.
53
//
54
// @param chord The chord to intersect
55
// @param spatialSubdivision The spatialSubdivision to intersect.
56
// @param record The intersection record contained all intersection data
57
// specified by the intersection flag.
58
// @param irtFlag Flag specifying what intersection data to record in the record.
59
//
60
// @returns a boolean indicating success or failure to find any intersections.
61
//
62
// @note If no intersection occurs, the intersectionPoint and Time values are
63
// not defined.
64
//
65
bool
intersect(
const
DtChord
& chord,
66
DtSpatialSubdivision<DtGdbNode*>
& spatialSubdivision,
67
DtChordIntersectionRecord
& record,
68
DtGdbNode::DtIntersectRecordType
irtFlag)
const
;
69
70
bool
allIntersectsAlongChord(
const
DtChord
& chord,
71
DtSpatialSubdivision<DtGdbNode*>
& spatialSubdivision,
72
DtChordIntersectRecordList
& intList,
73
DtGdbNode::DtIntersectRecordType
irtFlag)
const
;
74
75
int
intersectBundle(
const
DtChordBundle
& chordBundle,
76
DtSpatialSubdivision<DtGdbNode*>
& spatialSubdivision,
77
DtList& recordList,
78
DtGdbNode::DtIntersectRecordType
irtFlag)
const
;
79
80
int
allIntersectsAlongChordBundle(
const
DtChordBundle
& chordBundle,
81
DtSpatialSubdivision<DtGdbNode*>
& spatialSubdivision,
82
DtList& intListList,
83
DtGdbNode::DtIntersectRecordType
irtFlag)
const
;
84
85
// \return True if the specified sphere intersects the terrain.
86
bool
intersect(
const
DtSphere
& sphere,
87
DtSpatialSubdivision<DtGdbNode*>
& spatialSubdivision,
88
DtSphereIntersectionRecord
& record,
89
DtGdbNode::DtIntersectRecordType
irtFlag)
const
;
90
91
// \return True if the specified swept sphere volume intersects the terrain.
92
// bool intersect(const DtSweptSphere& sweptSphere,
93
// DtSpatialSubdivision<DtGdbNode*>& spatialSubdivision,
94
// DtIntersectionRecord& record,
95
// DtGdbNode::DtIntersectRecordType irtFlag) const;
96
97
protected
:
98
// not implemented
99
DtSSTerrainIntersector
(
const
DtSSTerrainIntersector
& original);
100
DtSSTerrainIntersector
& operator=(
const
DtSSTerrainIntersector
& original);
101
102
// Check to see if the intersection point is in the same cell as the specified
103
// spatial subdivision cell.
104
bool
intersectionInSameCell(
const
DtPoint
& intersectionPoint,
105
const
DtSpatialSubdivision<DtGdbNode*>::DtSpatialSubCellType
* spatialSubCell,
106
const
DtSpatialSubdivision<DtGdbNode*>
& spatialSubdivision)
const
;
107
108
private
:
109
};
110
111
#endif
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)