VR-Forces 4.6.1 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
intersectionRecord.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2006 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: intersectionRecord.h,v $ $Revision: 1.2 $ $State: Exp $
7
*******************************************************************************/
8
#ifndef intersectionRecord_H_
9
#define intersectionRecord_H_
10
11
// \file intersectionRecord.h
12
// \brief DtIntersectionRecord.
13
#include "
geometry/geometryDefines.h
"
14
15
// \brief Base class for all terrain intersection records.
16
class
DT_DLL_geometry
DtIntersectionRecord
17
{
18
public
:
19
20
// The type of intersection record.
21
enum
DtRecordType
22
{
23
// base class, simple true or false if there's an intersection
24
BASE_TYPE = 0,
25
// uses a chord for the intersection check, can return intersection points, normals, surfaces
26
// not terrain implementation assumed
27
CHORD_TYPE = 1,
28
// uses a chord for the intersection check, can return intersection points, normals, surfaces
29
// Gdb terrain implementation assumed and therefore can also return intersection polygons
30
GDBCHORD_TYPE = 2,
31
// uses a sphere for the intersection check, can return intersection points, normals, surfaces
32
// not terrain implementation assumed
33
SPHERE_TYPE = 3,
34
// uses a sphere for the intersection check, can return intersection points, normals, surfaces
35
// Gdb terrain implementation assumed and therefore can also return intersection polygons
36
GDBSPHERE_TYPE = 4
37
};
38
39
// The Intersection Type flag indicates the kind of data requested from
40
// a call to one of the intersect functions. Bit operators can be used on these enumerations.
41
enum
DtIntersectionType
42
{
43
// INT_EXISTS returns only a bool indication that an intersection was
44
// found.
45
INT_EXISTS = 0,
46
47
// INT_POINT is like INT_EXISTS, but also returns the closest intersection
48
// point as a DtPoint, the associated "time" value, and the
49
// surface type.
50
INT_POINT = 0x01,
51
52
// INT_NORMAL is like INT_EXISTS, but also returns the normal as a
53
// DtWorldCoordVector.
54
INT_NORMAL = 0x02,
55
56
// INT_RESERVED is currently reserved for an internal intersection call.
57
INT_RESERVED = 0x04,
58
59
// INT_ALL_DATA requests that all possible data be returned from the terrain node
60
INT_ALL_DATA = 0x07
61
};
62
63
DtIntersectionRecord
();
64
virtual
~
DtIntersectionRecord
();
65
66
// copy constructor
67
DtIntersectionRecord
(
const
DtIntersectionRecord
& orig);
68
69
// assignment operator
70
DtIntersectionRecord
& operator=(
const
DtIntersectionRecord
& orig);
71
72
// clone this object
73
virtual
DtIntersectionRecord
* clone()
const
;
74
75
// The type of record used for the intersection query. Returns
76
// BASE_TYPE
77
virtual
DtRecordType type()
const
;
78
79
// debugging aid
80
virtual
void
dump()
const
;
81
82
bool
intersectionFound()
const
;
83
void
setIntersectionFound(
bool
arg);
84
85
protected
:
86
bool
myIntersectionFound
;
87
88
};
89
90
inline
bool
DtIntersectionRecord::intersectionFound
()
const
91
{
92
return
myIntersectionFound
;
93
}
94
95
inline
void
DtIntersectionRecord::setIntersectionFound
(
bool
arg)
96
{
97
myIntersectionFound
= arg;
98
}
99
#endif
Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)