28 #include <vlpi/appearance.h>
31 #include <boost/noncopyable.hpp>
32 #include <boost/signals2.hpp>
55 myChangeType = DtString::nullString();
56 myIsInDefaultState =
false;
57 myLastStateWasDefaultState =
true;
72 std::size_t hExtentMinX = std::hash<double>{}(val.mySpatExtent.minX());
73 std::size_t hExtentMinY = std::hash<double>{}(val.mySpatExtent.minY());
74 std::size_t hExtentMinZ = std::hash<double>{}(val.mySpatExtent.minZ());
75 std::size_t hExtentMaxX = std::hash<double>{}(val.mySpatExtent.maxX());
76 std::size_t hExtentMaxY = std::hash<double>{}(val.mySpatExtent.maxY());
77 std::size_t hExtentMaxZ = std::hash<double>{}(val.mySpatExtent.maxZ());
78 std::size_t hChangeType = std::hash<std::string>{}(std::string(val.myChangeType.c_str()));
79 std::size_t hIsInDefaultState = std::hash<bool>{}(val.myIsInDefaultState);
80 std::size_t hLastStateWasDefaultState = std::hash<bool>{}(val.myLastStateWasDefaultState);
83 boost::hash_combine(seed, hExtentMinX);
84 boost::hash_combine(seed, hExtentMinY);
85 boost::hash_combine(seed, hExtentMinZ);
86 boost::hash_combine(seed, hExtentMaxX);
87 boost::hash_combine(seed, hExtentMaxY);
88 boost::hash_combine(seed, hExtentMaxZ);
89 boost::hash_combine(seed, hChangeType);
90 boost::hash_combine(seed, hIsInDefaultState);
91 boost::hash_combine(seed, hLastStateWasDefaultState);
103 if (lhs.mySpatExtent == rhs.mySpatExtent &&
104 lhs.myChangeType == rhs.myChangeType &&
105 lhs.myIsInDefaultState == rhs.myIsInDefaultState &&
106 lhs.myLastStateWasDefaultState == rhs.myLastStateWasDefaultState)
123 namespace makArchives
125 class DtGenericTerrainRecord;
128 namespace MAKVRinTerra
131 class DtAerodromeLoader;
136 class DtDynamicTerrainGeometry;
137 class DtDynamicTerrainChange;
138 class DtDynamicTerrainFeature;
139 class DtDynamicTerrainChanges;
153 virtual void removeTerrainChange() = 0;
154 virtual void releaseOwnership() = 0;
166 void removeTerrainChange();
170 void releaseOwnership();
174 std::shared_ptr<RequestHandleImpl>
myImpl;
188 virtual void removeQuery() = 0;
189 virtual void releaseOwnership() = 0;
203 void releaseOwnership();
210 typedef boost::function<void (const makVrv::DtDynamicTerrainFeature&)>
222 virtual bool isDisabled()
const = 0;
226 virtual void disable() = 0;
229 virtual void setAppearance(DtAppearance app) = 0;
232 virtual void setPosition(
const DtPoint& location,
const DtDcm& orientation) = 0;
234 virtual DtVector position()
const = 0;
235 virtual DtDcm orientation()
const = 0;
261 virtual void cacheAerodromes();
274 virtual void clearCache();
277 virtual void shutdown(
bool block=
true);
283 virtual double modelHeightDifferencesFromAppearances(
int oldApp,
int newApp)
const;
286 virtual bool createFromExtent(
const Dt3dBoundingVolume&);
290 virtual bool loadModel(
const DtFilename&,
const DtEntityType& t = DtEntityType());
302 virtual bool chordIntersect(
356 virtual void setAssertOnBlockingTerrainCalls(
bool assertBlock);
357 virtual bool assertOnBlockingTerrainCalls()
const;
362 virtual void setWarnOnBlockingTerrainCalls(
bool warnBlock);
363 virtual bool warnOnBlockingTerrainCalls()
const;
388 std::vector<DtChord>& chords);
391 virtual bool hasFeatureContext()
const;
411 typedef boost::function<void (const makVrv::DtDynamicTerrainFeature&)>
430 bool useOriginalGeometry =
false) {
437 bool useOriginalGeometry =
false) { };
441 virtual void cacheTerrainArea(
int requestId,
442 unsigned minLOD,
unsigned maxLOD,
const DtExtent& cacheArea,
446 virtual void cancelCacheTerrainArea(
int requestId);
449 virtual void writeTerrainIndex(
const DtString& name);
460 virtual void invokeTerrainChangeNotificationCallBacks();
462 virtual void blockOnPendingOperations() {};
465 boost::signals2::signal<void(bool)> signal_terrainPaging;
void(* DtTerrainChangeNotificationCallbackFcn)(const DtTerrainChangeNotificationInfo &terrainChangeInfo, void *userData)
Callback function for terrain change notifications.
Definition: terrainImplementation.h:121
boost::function< void(const makVrv::DtDynamicTerrainFeature &)> DtDynamicTerrainQueryCallback
Definition: terrainImplementation.h:211
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
Definition: stringKeyFactory.h:80
Class DtTerrainInterfaceConfig is a readable-writable class holding terrain interface configuration o...
Definition: terrainInterfaceConfig.h:33
This is the abstract base class for all terrain implementations. A terrain implementation is used by ...
Definition: terrainImplementation.h:244
std::shared_ptr< RequestHandleImpl > myImpl
Definition: terrainImplementation.h:174
boost::function< void(const makVrv::DtDynamicTerrainFeature &)> DtDynamicTerrainQueryCallback
Definition: terrainImplementation.h:412
Definition: terrainIntersectOptions.h:104
DtVrfChordIntersectionRecord represents a list of DtChordIntersectRecords. This is useful for followi...
Definition: vrfChordIntersectRecordList.h:31
std::unique_ptr< MAKVRinTerra::DtFeatureDatabase > myFeatureDatabase
Definition: terrainImplementation.h:476
virtual DtTerrainGeometryHandle * createEntityGeometry(const DtFilename &file)
Create geometry in the terrain which represents the entity.
Definition: terrainImplementation.h:394
bool myIsInDefaultState
Definition: terrainImplementation.h:62
Define a Hash operator for the DtTerrainChangeNotificationInfo. It's required for the DtTerrainChange...
Definition: terrainImplementation.h:68
virtual void queryCurrentDynamicTerrainFeatures(const DtDynamicTerrainQueryCallback &callback, makVrv::DtDynamicTerrainGeometry *geometry=0, bool useOriginalGeometry=false)
Definition: terrainImplementation.h:434
DtGenericTerrainRecords allow the VR-Forces terrainInterface library to instantiate and configure the...
Definition: DtGenericTerrainRecord.h:34
DtTerrainImplementation *(* DtCreatorFcn)(DtConsoleCommandManager *)
Definition: stringKeyFactory.h:84
std::list< std::pair< DtPagingMetaDataPtr, DtTerrainPagingGeometryPtr > > DtTerrainPagingGeometryList
Definition: terrainPagingGeometry.h:111
static DtExtent & nullExtent()
Return an invalid or empty extent, using the default constructor.
Represents (possibly infinite) area of space.
Definition: DtDynamicTerrainGeometry.h:20
class DtScenarioExplorer:
Definition: scenarioExplorer.h:26
Allows manipulating a terrain object. Returned by functions which create terrain objects.
Definition: terrainImplementation.h:215
bool operator()(const DtTerrainChangeNotificationInfo &lhs, const DtTerrainChangeNotificationInfo &rhs) const noexcept
Definition: terrainImplementation.h:101
bool myAssertOnBlockingTerrainCalls
Determines if an exception should be thrown if a blocking terrain call is made. This can help to trac...
Definition: terrainImplementation.h:473
DtTerrainInterfaceConfig myConfig
Definition: terrainImplementation.h:468
Definition: terrainImplementation.h:149
This is a class which maintains a list of string command names and the callback functions that are to...
Definition: consoleCommandManager.h:56
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
unsigned int DtTerrainGeometryId
Unique ID numbers that reference a specific geometry (or set of triangles) in the terrain...
Definition: terrainProcessPolygonsBox.h:38
bool myWarnOnBlockingTerrainCalls
Definition: terrainImplementation.h:474
virtual void processTrianglesForGeometry(DtTriangleOutputInterface &, DtTerrainGeometryId) const
Definition: terrainImplementation.h:381
DtTerrainIntersectOptions Passed to terrain intersect functions to modify how intersect acts...
Definition: terrainIntersectOptions.h:22
virtual bool dataAvailable(const DtTerrainPagingGeometryList &geometry, DtTerrainIntersectOptions::Fidelity=DtTerrainIntersectOptions::MAX_FIDELITY)
Returns true if all of the terrain which intersects the geometry list is paged in.
Definition: terrainImplementation.h:338
Definition: aerodromeLoader.h:28
Definition: coordSystem.h:54
Represents some coordinate system. The terms "coordinate system", "projection", "spatial reference"...
Definition: proj.h:52
#define DT_DLL_terrainInterface
This file is used to determine how to build.
Definition: terrainInterfaceDefines.h:25
Factory templates DtStringKeyFactory and DtStringKeyFactoryWithParam.
virtual DtTerrainGeometryHandle * createEntityGeometry(const DtEntityType &file)
Create geometry in the terrain which represents the entity by the given type, looking up visuals...
Definition: terrainImplementation.h:397
This class holds parameters which define the capabilities of the current terrain. The terrain impleme...
Definition: terrainCapabilities.h:28
std::shared_ptr< QueryHandleImpl > myImpl
Definition: terrainImplementation.h:207
DtExtent mySpatExtent
Definition: terrainImplementation.h:60
virtual void preloadTerrainAreas(const DtTerrainPagingGeometryList &preloadGeometry)
Specifies a list of terrain areas that should be preloaded by the terrain implementation, in the case of a paging or streaming terrain source. The typical use of this is to specify parts of the terrain that are expected to be needed in the near future.
Definition: terrainImplementation.h:334
std::unique_ptr< MAKVRinTerra::DtFeatureContext > myFeatureContext
Definition: terrainImplementation.h:477
RequestHandleImpl()
Definition: terrainImplementation.h:152
Definition: featureContext.h:50
DtTerrainImplementationFactory::DtCreatorFcn DtTerrainImplementationCreatorFcn
Definition: terrainImplementation.h:484
virtual DtTerrainInformation * terrainInformation()
Return the terrain information pointer of the terrain implementation (null if none exist) this is a d...
Definition: terrainImplementation.h:385
virtual DtDynamicTerrainRequestHandle addDynamicTerrainChangeRequest(double time, makVrv::DtDynamicTerrainChange *command)
Add a dynamic terrain change request to the system.
Definition: terrainImplementation.h:407
DtTerrainChangeNotificationInfo()
Definition: terrainImplementation.h:52
Definition: terrainImplementation.h:184
Definition: vrfChordIntersectionRecord.h:19
virtual void loadVisuals(const DtScenarioExplorer &)
Tells the terrain implementation (if it cares) to load visuals to support terrain/model usage...
Definition: terrainImplementation.h:400
A DtChord is a finite line segment in 3-space, represented by two points. Data derived from the two e...
Fidelity
Allows the system to use differently fidelity data for intersecting against. Currently only implement...
Definition: terrainIntersectOptions.h:102
unsigned int DtTerrainCategoryMask
This bitmask is made using DtTerrainCategory values.
Definition: rwTerrainCategoryMask.h:27
virtual void setIntersectDataLoadExpireTime(const double &expireTime)
No-op. Override to set the default expiration time for data load requests generated by intersect call...
Definition: terrainImplementation.h:371
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
Define a KeyEqual operator for the DtTerrainChangeNotificationInfo. It's required for the DtTerrainCh...
Definition: terrainImplementation.h:99
DtStringKeyFactoryWithParam< DtTerrainImplementation, DtConsoleCommandManager * > DtTerrainImplementationFactory
Definition: terrainImplementation.h:482
std::size_t operator()(const DtTerrainChangeNotificationInfo &val) const noexcept
Definition: terrainImplementation.h:70
bool myLastStateWasDefaultState
Definition: terrainImplementation.h:63
Command which can be given to the dynamic terrain system to perform some change. This class is a simp...
Definition: DtDynamicTerrainChange.h:42
void(* DtCacheProgressCallbackFunction)(int requestId, int current, bool completed, double elapsedTime, void *usr)
Callback for terrain caching.
Definition: terrainImplementation.h:117
Resource handle for a query which has been added to the system. Returned from DtTerrainImplementation...
Definition: terrainImplementation.h:180
DtString myChangeType
Definition: terrainImplementation.h:61
Interface for getting terrain triangle data out of DtTerrainInterface::trianglesInArea. This object should always be created on the stack.
Definition: terrainProcessPolygonsBox.h:134
Definition: featureContext.h:228
Resource handle for a dynamic terrain change request which has been added to the system. Returned from DtTerrainImplementation::addDynamicTerrainChangeRequest(). Allows caller to manage request.
Definition: terrainImplementation.h:145
virtual DtDynamicTerrainQueryHandle queryDynamicTerrainFeatures(const DtDynamicTerrainQueryCallback &callback, makVrv::DtDynamicTerrainGeometry *geometry=0, bool useOriginalGeometry=false)
Install a query which will call the supplied callback on matching dynamic terrain features as they ar...
Definition: terrainImplementation.h:427
virtual void expireDataLoadRequestsBeforeTime(const double ¤tTime)
No-op. Override to expire data load requests generated before the given time. See comment for #setInt...
Definition: terrainImplementation.h:377
std::shared_ptr< MAKVRinTerra::DtAerodromeLoader > myAerodromeLoader
Definition: terrainImplementation.h:478
Provides information about the terrain changes: mySpatExtent defines the terrain change type - e...
Definition: terrainImplementation.h:50
DtTerrainIntersectStatus Contains information about status of "data available" when an intersection c...
Definition: terrainIntersectStatus.h:23
QueryHandleImpl()
Definition: terrainImplementation.h:187
Represents an area query which can be used to extract triangles from DtTerrainInterface. The box points are in local but the box is always projected against the local topo at the center point of the box.
Definition: terrainProcessPolygonsBox.h:60