VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
extentTerrainImplementation.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 //\file extentTerrainImplementation.h
7 //\ingroup terrainInterface
8 
9 //\brief
10 
11 #pragma once
12 
15 
16 class DtCoordinateSystem;
17 namespace makArchives
18 {
19  class DtGenericTerrainRecord;
20 }
21 
22 //This terrain implementation is an algorithmic representation of the world
23 //as a flat earth extent. All soil types are returned as
24 //the undefined soil type.
26 {
27 public:
28 
30  virtual ~DtExtentTerrainImplementation() override;
31 
32  //Static creator function
34 
35  //Called with the generic terrain record from the mtf file.
36  //Use to setup initial values on terrain load.
37  virtual bool loadTerrain(const makArchives::DtGenericTerrainRecord& record) override;
38 
39  //Returns myCoordinateSystem
40  virtual const Coordinate_System* coordinateSystem() const override;
41 
42  //Returns topmost intersection of chord with terrain in record.
43  //data should be filled in for the record.
44  virtual bool chordIntersect(DtTerrainIntersectStatus& status, const DtChord& chord,
45  DtVrfChordIntersectionRecord& record, const DtTerrainIntersectOptions& options) const override;
46 
47  //Returns all intersections of chord with terrain. intList is the list of each intersection record.
48  //In this example there will only ever be at most 1 intersection.
49  virtual bool allIntersectsAlongChord(DtTerrainIntersectStatus& status, const DtChord& chord,
50  DtVrfChordIntersectRecordList& intList, const DtTerrainIntersectOptions& options) const override;
51 
52  //Returns the capabilities of the current terrain.
53  virtual const DtTerrainCapabilities* terrainCapabilities() const override;
54 
55  //Used by B-HAVE for creating path data. output is an interface to be called
56  //on the triangles in the terrain. box is an extent that determines which
57  //triangles should be considered. finalize is called once all triangles
58  //have been processed.
59  virtual void processTrianglesInArea(
61  const DtTerrainProcessPolygonsBox& box,
62  DtTerrainCategoryMask terrainCategoryMask) const override;
63 
64 protected:
65 
66  //Fill in the intersection record based on the result of the intersection
67  //test.
69  const DtChord& chord, const DtPoint& chordNormal, double intersectTime,
71 
72  //Function that actually does the chord-extent intersection test.
73  bool chordExtentIntersect(const DtChord& chord,
76 
78  virtual void cacheTerrainArea(int requestId, int lowestLOD, int highestLOD, const DtExtent& cacheArea, DtCacheProgressCallbackFunction fcn = 0, void* usr = 0);
79 
81  virtual void cancelCacheTerrainArea(int requestId) override;
82 
83 protected:
86 };
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
This is the abstract base class for all terrain implementations. A terrain implementation is used by ...
Definition: terrainImplementation.h:244
Definition: chordIntersectionRecord.h:23
DtVrfChordIntersectionRecord represents a list of DtChordIntersectRecords. This is useful for followi...
Definition: vrfChordIntersectRecordList.h:31
DtGenericTerrainRecords allow the VR-Forces terrainInterface library to instantiate and configure the...
Definition: DtGenericTerrainRecord.h:34
virtual void cacheTerrainArea(int requestId, int lowestLOD, int highestLOD, const DtExtent &cacheArea, DtCacheProgressCallbackFunction fcn=0, void *usr=0)
Not implemented at example level.
virtual const Coordinate_System * coordinateSystem() const override
Definition: extentTerrainImplementation.h:25
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
DtTerrainCapabilities myCapabilities
Definition: extentTerrainImplementation.h:85
static DtTerrainImplementation * create(DtConsoleCommandManager *cmdMgr)
virtual bool allIntersectsAlongChord(DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectRecordList &intList, const DtTerrainIntersectOptions &options) const override
Returns all intersections of chord with terrain.
DtTerrainIntersectOptions Passed to terrain intersect functions to modify how intersect acts...
Definition: terrainIntersectOptions.h:22
virtual void cancelCacheTerrainArea(int requestId) override
Not implemented at example level.
Definition: coordSystem.h:54
virtual bool chordIntersect(DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectionRecord &record, const DtTerrainIntersectOptions &options) const override
Returns topmost intersection of chord with terrain in record.
This class holds parameters which define the capabilities of the current terrain. The terrain impleme...
Definition: terrainCapabilities.h:28
virtual const DtTerrainCapabilities * terrainCapabilities() const override
Definition: vrfChordIntersectionRecord.h:19
virtual ~DtExtentTerrainImplementation() override
void fillHitRecord(DtChordIntersectionRecord &rec, const DtChord &chord, const DtPoint &chordNormal, double intersectTime, DtIntersectionRecord::DtIntersectionType irtFlag) const
Coordinate_System * myCoordinateSystem
Definition: extentTerrainImplementation.h:84
unsigned int DtTerrainCategoryMask
This bitmask is made using DtTerrainCategory values.
Definition: rwTerrainCategoryMask.h:27
void(* DtCacheProgressCallbackFunction)(int requestId, int current, bool completed, double elapsedTime, void *usr)
Callback for terrain caching.
Definition: terrainImplementation.h:117
DtExtentTerrainImplementation(DtConsoleCommandManager *cmdMgr)
Interface for getting terrain triangle data out of DtTerrainInterface::trianglesInArea. This object should always be created on the stack.
Definition: terrainProcessPolygonsBox.h:134
virtual bool loadTerrain(const makArchives::DtGenericTerrainRecord &record) override
Loads a terrain given the terrain record.
bool chordExtentIntersect(const DtChord &chord, DtChordIntersectionRecord &hit, DtIntersectionRecord::DtIntersectionType irtFlag) const
virtual void processTrianglesInArea(DtTriangleOutputInterface &output, const DtTerrainProcessPolygonsBox &box, DtTerrainCategoryMask terrainCategoryMask) const override
Definition: point.h:34
DtTerrainIntersectStatus Contains information about status of "data available" when an intersection c...
Definition: terrainIntersectStatus.h:23
DtIntersectionType
Definition: intersectionRecord.h:41
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

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)