VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
terrainIntersector.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: terrainIntersector.h,v $ $Revision: 1.17 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef terrainIntersector_h
13 #define terrainIntersector_h
14 
15 #include "gdb/gdbDefines.h"
16 #include "gdb/gdbNode.h"
17 
18 class DtTerrainDatabase;
19 class DtPoint;
20 class DtChord;
24 
25 // Common place to keep all current intersector types
29 
30 // Abstract base class for intersectors used in a DtTerrainDatabase.
31 // Subclasses of this interface class implement the actual intersection
32 // methods for getting intersections with the polygonal terrain data.
34 {
35 private:
36  // Not implemented.
38  // Not implemented.
40  // Not implemented.
41  DtTerrainIntersector& operator=(const DtTerrainIntersector& orig);
42 
43 public:
44  // Provide the terrain database and descriptor to instantiate a terrain intersector.
45  // The descriptor is cloned and held internally by the intersector.
47  const DtTerrainIntersectorDescriptor* descriptor);
48  virtual ~DtTerrainIntersector();
49 
50  // Called for first time init
51  virtual bool init() = 0;
52 
53  // Called when something has changed about the underlying terrain database and the intersector
54  // needs to be reinitialized
55  virtual bool reinitialize() = 0;
56 
57  // \return The total number of bytes of memory used by this intersector
58  // and any of its internal indexing into the terrain.
59  virtual unsigned int memoryUsage() const = 0;
60 
61  virtual int terrainIntersectorType() const = 0;
62 
63  virtual bool chordIntersect(const DtChord& chord,
66 
67  virtual bool allIntersectsAlongChord(const DtChord& chord,
70 
71  virtual bool sphereIntersect(const DtSphere& sphere, DtSphereIntersectionRecord& record,
73 
74  virtual DtTerrainDatabase* terrainDatabase() const { return myTerrainDatabase; };
75  virtual DtTerrainDatabase* terrainDatabase() { return myTerrainDatabase; };
76 
77  // \return A pointer to the descriptor used by this intersector.
78  virtual const DtTerrainIntersectorDescriptor* descriptor() const;
79 
80  // Called to return information about this intersector. Calls down to the descriptor to return the information
81  virtual void intersectorInformation(DtString& name, DtString& properties) const;
82 
83 protected:
86 };
87 
88 #endif
virtual DtTerrainDatabase * terrainDatabase()
Definition: terrainIntersector.h:75
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
const int DtBaseTerrainIntersectorType
Definition: terrainIntersector.h:26
Definition: sphereIntersectionRecord.h:19
DtIntersectRecordType
Definition: gdbNode.h:74
const int DtOpcodeTerrainIntersectorType
Definition: terrainIntersector.h:28
#define DT_DLL_gdb
Definition: gdbDefines.h:25
Definition: terrainIntersectorDescriptor.h:22
virtual DtTerrainDatabase * terrainDatabase() const
Definition: terrainIntersector.h:74
Definition: gdbNode.h:94
const int DtSpatialSubdivisionTerrainIntersectorType
Definition: terrainIntersector.h:27
DtTerrainIntersectorDescriptor * myDescriptor
Definition: terrainIntersector.h:85
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
Definition: terrainIntersector.h:33
Definition: terrainDatabase.h:148
DtTerrainDatabase * myTerrainDatabase
Definition: terrainIntersector.h:84
Definition: point.h:34

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)