VR-Forces 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 <atomic>
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 
70  virtual ~DtIntersectRecordPassThroughLayer() override;
71 
72  virtual bool chordIntersect(DtTerrainIntersectStatus& status, const DtChord& chord,
73  DtVrfChordIntersectionRecord& record, const DtTerrainIntersectOptions& options) const override;
74 
75  virtual bool allIntersectsAlongChord(DtTerrainIntersectStatus& status, const DtChord& chord,
76  DtVrfChordIntersectRecordList& intList, const DtTerrainIntersectOptions& options) const override;
77 
78 
79 protected:
81 
82  mutable std::atomic<unsigned int> myIndex;
83 
84  mutable tbb::spin_mutex myMutex;
85  //mutable std::stringstream myOutputText;
86  mutable std::ofstream myOutputText;
87 };
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:244
DtVrfChordIntersectionRecord represents a list of DtChordIntersectRecords. This is useful for followi...
Definition: vrfChordIntersectRecordList.h:31
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
std::atomic< unsigned int > myIndex
Definition: intersectRecordPassThroughLayer.h:82
DtConsoleCommandOwner * myCommandOwner
Definition: intersectRecordPassThroughLayer.h:80
Definition: terrainPassThroughLayer.h:81
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:86
tbb::spin_mutex myMutex
Definition: intersectRecordPassThroughLayer.h:84
DtTerrainIntersectOptions Passed to terrain intersect functions to modify how intersect acts...
Definition: terrainIntersectOptions.h:22
#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:168
DtTerrainInterface allows access to common terrain calls without having to know the terrain implement...
Definition: terrainInterface.h:93
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
virtual bool chordIntersect(DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectionRecord &record, const DtTerrainIntersectOptions &options) const override
Returns topmost intersection of chord with terrain in record.
int flags
Definition: intersectRecordPassThroughLayer.h:34
virtual bool allIntersectsAlongChord(DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectRecordList &intList, const DtTerrainIntersectOptions &options) const override
Returns all intersections of chord with terrain. intList is the list of each intersection record...
DtTerrainIntersectStatus Contains information about status of &quot;data available&quot; when an intersection c...
Definition: terrainIntersectStatus.h:23
DtIntersectionType
Definition: intersectionRecord.h:41
DtIntersectionRecord::DtIntersectionType irtFlag
Definition: intersectRecordPassThroughLayer.h:33

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)