VR-Forces 4.1 Class Documentation
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,
39  const TerrainSettings& settings = TerrainSettings());
40 
41  //Returns myCoordinateSystem
42  virtual const Coordinate_System* coordinateSystem() const;
43 
44  //Returns topmost intersection of chord with terrain in record.
45  //irtFlag specifies what intersection
46  //data should be filled in for the record.
47  virtual bool chordIntersect(const DtChord& chord,
51  bool* dataAvailable = 0, bool overrideBlockingAssert = false) const;
52 
53  //Returns all intersections of chord with terrain. intList is the list of each intersection record.
54  //irtFlag specifies what intersection data should be filled in for the record.
55  //In this example there will only ever be at most 1 intersection.
56  virtual bool allIntersectsAlongChord(const DtChord& chord,
60  bool* dataAvailable = 0, bool overrideBlockingAssert = false) const;
61 
62  //Returns intersection of sphere with the terrain in the record irtFlag specifies what intersection
63  //data should be filled in for the record.
64  virtual bool sphereIntersect(const DtSphere& sphere, DtSphereIntersectionRecord& record,
67  bool* dataAvailable = 0, bool overrideBlockingAssert = false) const;
68 
69  //Returns the capabilities of the current terrain.
70  virtual const DtTerrainCapabilities* terrainCapabilities() const;
71 
72  //Used by B-HAVE for creating path data. func is a function to be called
73  //on the triangles in the terrain. box is an extent that determines which
74  //triangles should be considered. finalize is called once all triangles
75  //have been processed.
78  const DtTerrainProcessPolygonsBox& box, void* usr);
79 
80 protected:
81 
82  //Fill in the intersection record based on the result of the intersection
83  //test.
85  const DtChord& chord, const DtPoint& chordNormal, double intersectTime,
87 
88  //Function that actually does the chord-extent intersection test.
89  bool chordExtentIntersect(const DtChord& chord,
92 
93 protected:
96 };

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)