VR-Forces 4.10 Class Documentation
 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 
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);
38 
39  //Returns myCoordinateSystem
40  virtual const Coordinate_System* coordinateSystem() const;
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,
45  const DtChord& chord,
47  const DtTerrainIntersectOptions& options) const;
48 
49  //Returns all intersections of chord with terrain. intList is the list of each intersection record.
50  //In this example there will only ever be at most 1 intersection.
52  const DtChord& chord,
54  const DtTerrainIntersectOptions& options) const;
55 
56  //Returns the capabilities of the current terrain.
57  virtual const DtTerrainCapabilities* terrainCapabilities() const;
58 
59  //Used by B-HAVE for creating path data. output is an interface to be called
60  //on the triangles in the terrain. box is an extent that determines which
61  //triangles should be considered. finalize is called once all triangles
62  //have been processed.
63  virtual void processTrianglesInArea(
65  const DtTerrainProcessPolygonsBox& box) const;
66 
67 protected:
68 
69  //Fill in the intersection record based on the result of the intersection
70  //test.
72  const DtChord& chord, const DtPoint& chordNormal, double intersectTime,
74 
75  //Function that actually does the chord-extent intersection test.
76  bool chordExtentIntersect(const DtChord& chord,
79 
81  virtual void cacheTerrainArea(int requestId, int lowestLOD, int highestLOD, const DtExtent& cacheArea, DtCacheProgressCallbackFunction fcn = 0, void* usr = 0);
82 
84  virtual void cancelCacheTerrainArea(int requestId);
85 
86 protected:
89 };
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
This is the abstract base class for all terrain implementations.
Definition: terrainImplementation.h:164
Definition: chordIntersectionRecord.h:23
DtVrfChordIntersectionRecord represents a list of DtChordIntersectRecords.
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.
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:48
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
DtTerrainCapabilities myCapabilities
Definition: extentTerrainImplementation.h:88
virtual const DtTerrainCapabilities * terrainCapabilities() const
static DtTerrainImplementation * create(DtConsoleCommandManager *cmdMgr)
DtTerrainIntersectOptions Passed to terrain intersect functions to modify how intersect acts...
Definition: terrainIntersectOptions.h:15
virtual const Coordinate_System * coordinateSystem() const
Definition: coordSystem.h:54
This class holds parameters which define the capabilities of the current terrain. ...
Definition: terrainCapabilities.h:25
virtual void cancelCacheTerrainArea(int requestId)
Not implemented at example level.
Definition: vrfChordIntersectionRecord.h:19
void fillHitRecord(DtChordIntersectionRecord &rec, const DtChord &chord, const DtPoint &chordNormal, double intersectTime, DtIntersectionRecord::DtIntersectionType irtFlag) const
virtual bool loadTerrain(const makArchives::DtGenericTerrainRecord &record)
Loads a terrain given the terrain record.
Coordinate_System * myCoordinateSystem
Definition: extentTerrainImplementation.h:87
void(* DtCacheProgressCallbackFunction)(int requestId, int current, bool completed, double elapsedTime, void *usr)
Callback for terrain caching.
Definition: terrainImplementation.h:46
DtExtentTerrainImplementation(DtConsoleCommandManager *cmdMgr)
virtual bool allIntersectsAlongChord(DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectRecordList &intList, const DtTerrainIntersectOptions &options) const
Returns all intersections of chord with terrain.
Interface for getting terrain triangle data out of DtTerrainInterface::trianglesInArea.
Definition: terrainProcessPolygonsBox.h:113
virtual bool chordIntersect(DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectionRecord &record, const DtTerrainIntersectOptions &options) const
Returns topmost intersection of chord with terrain in record.
bool chordExtentIntersect(const DtChord &chord, DtChordIntersectionRecord &hit, DtIntersectionRecord::DtIntersectionType irtFlag) const
Definition: point.h:34
DtTerrainIntersectStatus Contains information about result of terrain intersection.
Definition: terrainIntersectStatus.h:16
virtual void processTrianglesInArea(DtTriangleOutputInterface &output, const DtTerrainProcessPolygonsBox &box) const
DtIntersectionType
Definition: intersectionRecord.h:41
Represents an area query which can be used to extract triangles from DtTerrainInterface.
Definition: terrainProcessPolygonsBox.h:39

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)