VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.
14 
15 // \brief Base class for all terrain intersection records.
17 {
18 public:
19 
20  // The type of intersection record.
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.
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 
64  virtual ~DtIntersectionRecord();
65 
66  // copy constructor
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:
87 
88 };
89 
91 {
92  return myIntersectionFound;
93 }
94 
96 {
97  myIntersectionFound = arg;
98 }
99 #endif
Definition: intersectionRecord.h:16
#define DT_DLL_geometry
Definition: geometryDefines.h:23
bool intersectionFound() const
Definition: intersectionRecord.h:90
DtRecordType
Definition: intersectionRecord.h:21
void setIntersectionFound(bool arg)
Definition: intersectionRecord.h:95
bool myIntersectionFound
Definition: intersectionRecord.h:86
DtIntersectionType
Definition: intersectionRecord.h:41

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)