VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
opcodeTerrainIntersector.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2008 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: opcodeTerrainIntersector.h,v $ $Revision: 1.2 $ $State: Exp $
7 *******************************************************************************/
8 
11 
12 #ifndef opcodeTerrainIntersector_h
13 #define opcodeTerrainIntersector_h
14 
15 #include "gdb/terrainIntersector.h"
17 
20 
21 // Terrain intersector that uses the external OPCODE library do do terrain
22 // intersection. This takes a little while to init(), and uses a decent
23 // amount of memory, but results in very fast runtime intersection checks.
25 {
26 private:
27  // Not implemented.
29  // Not implemented.
31  // Not implemented.
33 
34 public:
36  const DtTerrainIntersectorDescriptor* descriptor);
37  virtual ~DtOpcodeTerrainIntersector();
38 
39  virtual bool init();
40  virtual bool reinitialize();
41 
42  // \return The total number of bytes of memory used by this intersector
43  // and any of its internal indexing into the terrain.
44  virtual unsigned int memoryUsage() const;
45 
46  virtual bool chordIntersect(const DtChord& chord,
49 
50  virtual bool allIntersectsAlongChord(const DtChord& chord,
53 
54  virtual bool sphereIntersect(const DtSphere& sphere, DtSphereIntersectionRecord& record,
56 
57  virtual int terrainIntersectorType() const;
58 
59  // \return A descriptor for setting this intersector to the DtTerrainDatabase.
60  static DtOpcodeTerrainIntersectorDescriptor* createDescriptor();
61 
62  // \return True if the OPCODE Intersector is valid to use on this terrain
63  // database. Tests to see if each vertex in the database can be converted
64  // to floating point without loosing too much precision.
65  static bool intersectorValid(const DtTerrainDatabase* terrainDb);
66 
67 protected:
69 };
70 
71 // Descriptor for the DtOpcodeTerrainIntersector class.
73 {
74 public:
78 
80 
81  virtual int terrainIntersectorType() const;
82 
83  virtual void descriptorInformation(DtString& name, DtString& properties) const;
84 
85  virtual DtTerrainIntersectorDescriptor* clone() const;
86 };
87 
88 #endif
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
virtual void descriptorInformation(DtString &name, DtString &properties) const =0
DtTerrainIntersectorDescriptor & operator=(const DtTerrainIntersectorDescriptor &orig)
Definition: terrainIntersectorDescriptor.h:29
Definition: chordIntersectionRecord.h:23
Definition: sphere.h:22
virtual bool init()=0
Definition: chordIntersectRecordList.h:29
virtual bool chordIntersect(const DtChord &chord, DtChordIntersectionRecord &record, DtGdbNode::DtIntersectRecordType irtFlag=DtGdbNode::IRT_ALL_DATA_TERRAIN) const =0
virtual bool allIntersectsAlongChord(const DtChord &chord, DtChordIntersectRecordList &intList, DtGdbNode::DtIntersectRecordType irtFlag=DtGdbNode::IRT_ALL_DATA_TERRAIN) const =0
Definition: sphereIntersectionRecord.h:19
Definition: opcodeTerrainIntersector.h:72
Definition: opcodeTerrainIntersector.h:24
DtIntersectRecordType
Definition: gdbNode.h:74
#define DT_DLL_gdb
Definition: gdbDefines.h:25
DtTerrainIntersector & operator=(const DtTerrainIntersector &orig)
virtual int terrainIntersectorType() const =0
Definition: terrainIntersectorDescriptor.h:22
virtual int terrainIntersectorType() const =0
virtual bool sphereIntersect(const DtSphere &sphere, DtSphereIntersectionRecord &record, DtGdbNode::DtIntersectRecordType irtFlag=DtGdbNode::IRT_ALL_DATA_TERRAIN) const =0
virtual DtTerrainIntersectorDescriptor * clone() const =0
DtOpcodeTerrainIntersectorImpl * myImpl
Definition: opcodeTerrainIntersector.h:68
Definition: gdbNode.h:94
virtual bool reinitialize()=0
Definition: terrainIntersector.h:33
Definition: terrainDatabase.h:148
virtual unsigned int memoryUsage() const =0
Definition: opcodeTerrainIntersectorImpl.h:41

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)