VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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"
14 
15 class DtChord;
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 //
27 {
28 public:
30 
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,
68  DtGdbNode::DtIntersectRecordType irtFlag) const;
69 
70  bool allIntersectsAlongChord(const DtChord& chord,
71  DtSpatialSubdivision<DtGdbNode*>& spatialSubdivision,
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,
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
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,
106  const DtSpatialSubdivision<DtGdbNode*>& spatialSubdivision) const;
107 
108 private:
109 };
110 
111 #endif
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
Definition: chordIntersectionRecord.h:23
Definition: sphere.h:22
Definition: chordIntersectRecordList.h:29
Definition: sphereIntersectionRecord.h:19
DtIntersectRecordType
Definition: gdbNode.h:74
#define DT_DLL_gdb
Definition: gdbDefines.h:25
virtual ~DtSsTerrainIntersector()
Definition: ssTerrainIntersector.h:31
Definition: ssTerrainIntersector.h:26
Definition: chordBundle.h:29
DtSsTerrainIntersector()
Definition: ssTerrainIntersector.h:29
Definition: point.h:34

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)