VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
intersectRecordPassThroughLayer.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 
16 #include <tbb/spin_mutex.h>
17 #include <tbb/atomic.h>
18 
19 #include <sstream>
20 #include <fstream>
21 
22 class DtConsoleCommand;
23 class DtTerrainInterface;
24 
26 {
27 public:
29  {
34  int flags;
35 
37  unsigned int index;
39  double time;
44 
45  Record* clone() const;
46 
48  void run(DtTerrainInterface&);
49 
51  Record();
52 
53  std::string serialize() const;
54  bool deserialize(const std::string&, std::string* errorMsg = 0);
55 
56  double timeDiff(const Record&) const;
57  std::vector<double> distanceDiffs(const Record&) const;
58  };
59 };
60 
63 {
64 public:
65  static DtTerrainPassThroughLayer* create(DtCreatorParam createParam);
66 
69 
71 
72  virtual bool chordIntersect(DtTerrainIntersectStatus& status,
73  const DtChord& chord,
75  const DtTerrainIntersectOptions& options) const;
76 
78  const DtChord& chord,
80  const DtTerrainIntersectOptions& options) const;
81 
82 protected:
84 
85  mutable tbb::atomic<unsigned int> myIndex;
86 
87  mutable tbb::spin_mutex myMutex;
88  //mutable std::stringstream myOutputText;
89  mutable std::ofstream myOutputText;
90 };
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
Definition: intersectRecordPassThroughLayer.h:28
This is the abstract base class for all terrain implementations. A terrain implementation is used by ...
Definition: terrainImplementation.h:170
DtVrfChordIntersectionRecord represents a list of DtChordIntersectRecords. This is useful for followi...
Definition: vrfChordIntersectRecordList.h:31
virtual bool allIntersectsAlongChord(DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectRecordList &intList, const DtTerrainIntersectOptions &options) const
Returns all intersections of chord with terrain. intList is the list of each intersection record...
This class is the base class for creating a &quot;pass-though&quot; layer in the terrain interface. A pass-though layer contains a real terrain implementation but it wraps all the functions in pass-though functions, which may perform operations in addition to the calls being made to the real terrain implementation. This may be used for logging intersections, gathering statistics, or doing performance analysis.
Definition: terrainPassThroughLayer.h:22
bool returnValue
value returned from intersect function
Definition: intersectRecordPassThroughLayer.h:41
DtConsoleCommandOwner * myCommandOwner
Definition: intersectRecordPassThroughLayer.h:83
Definition: terrainPassThroughLayer.h:86
Record all intersections to a file.
Definition: intersectRecordPassThroughLayer.h:62
bool singleResult
terrain query data
Definition: intersectRecordPassThroughLayer.h:31
This is a class which maintains a list of string command names and the callback functions that are to...
Definition: consoleCommandManager.h:56
double time
amount of time to run intersection
Definition: intersectRecordPassThroughLayer.h:39
std::ofstream myOutputText
Definition: intersectRecordPassThroughLayer.h:89
tbb::atomic< unsigned int > myIndex
Definition: intersectRecordPassThroughLayer.h:85
tbb::spin_mutex myMutex
Definition: intersectRecordPassThroughLayer.h:87
DtTerrainIntersectOptions Passed to terrain intersect functions to modify how intersect acts...
Definition: terrainIntersectOptions.h:15
#define DT_DLL_terrainInterface
This file is used to determine how to build.
Definition: terrainInterfaceDefines.h:25
Definition: intersectRecordPassThroughLayer.h:25
DtVrfChordIntersectRecordList intersections
results of intersection
Definition: intersectRecordPassThroughLayer.h:43
A utility class for use with DtConsoleCommandManager. This class takes ownership of an arbitrary numb...
Definition: consoleCommandManager.h:166
DtTerrainInterface allows access to common terrain calls without having to know the terrain implement...
Definition: terrainInterface.h:99
system includes
Definition: consoleCommandManager.h:28
DtChord chord
Definition: intersectRecordPassThroughLayer.h:32
Definition: vrfChordIntersectionRecord.h:19
unsigned int index
count of records
Definition: intersectRecordPassThroughLayer.h:37
int flags
Definition: intersectRecordPassThroughLayer.h:34
virtual bool chordIntersect(DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectionRecord &record, const DtTerrainIntersectOptions &options) const
Returns topmost intersection of chord with terrain in record.
DtTerrainIntersectStatus Contains information about result of terrain intersection.
Definition: terrainIntersectStatus.h:16
DtIntersectionType
Definition: intersectionRecord.h:41
DtIntersectionRecord::DtIntersectionType irtFlag
Definition: intersectRecordPassThroughLayer.h:33

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)