VR-Forces 4.2 Class Documentation
attachedTerrain.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2005 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 
17 #include "vrfutil/rwInt.h"
18 #include "vrfutil/rwString.h"
19 #include "vrfutil/rdrWritr.h"
20 #include "vrfutil/rwObjType.h"
21 #include <matrix/vlDcm.h>
22 #include <geometry/intersectionRecord.h>
23 #include <geometry/point.h>
24 #include <geometry/chord.h>
26 
27 class Coordinate_System;
29 class DtPhysicalWorld;
30 class DtGdbNode;
31 class DtTerrainDatabase;
32 class DtVrfObject;
33 class DtChordIntersectionRecord;
34 class DtSurface;
35 
37 {
38 public:
39 
42 
44  DtAttachedTerrain(const DtString& name,
45  DtReaderWriterRegistry* const parentRegistry = 0);
46 
47  DtAttachedTerrain(const DtSymbolString& name,
48  DtReaderWriterRegistry* const parentRegistry = 0);
49 
51  DtAttachedTerrain(const DtString& name, const DtAttachedTerrain& orig,
52  DtReaderWriterRegistry* const parentRegistry = 0);
53 
54  DtAttachedTerrain(const DtSymbolString& name, const DtAttachedTerrain&
55  from, DtReaderWriterRegistry* const parentRegistry = 0);
56 
58  virtual ~DtAttachedTerrain();
59 
63 
67  virtual const char* readerWriterType() const;
68 
69  DtAttachedTerrain& operator=(const DtObjectType& type);
70 
71 public:
72  virtual const Coordinate_System* coordinateSystem() const;
73  virtual Coordinate_System* coordinateSystem();
74  virtual const Coordinate_System* objectModelCoordinateSystem() const;
75 
76 
77  virtual double terrainHeight(const DtVector& localLocation,
78  bool* dataAvailable = 0, bool overrideBlockingAssert = false) const;
79  virtual bool terrainHeight(const DtVector& localLocation,
80  double& terrainHeight, bool* dataAvailable = 0,
81  bool overrideBlockingAssert = false) const;
82 
83  virtual bool terrainHeightAndSurface(const DtVector& localLocation,
84  double& terrainHeight, DtSurface& surface, bool* dataAvailable = 0,
85  bool overrideBlockingAssert = false) const;
86 
87 
88  virtual bool closestIntersection(const DtVector& localLocation,
89  DtPoint& intersectionPoint,
90  bool* dataAvailable = 0, bool overrideBlockingAssert = false) const;
91 
92  virtual bool closestIntersection(const DtVector& localLocation,
93  DtVector& intersectionPoint,
94  bool* dataAvailable = 0, bool overrideBlockingAssert = false) const;
95 
96  virtual bool closestIntersection(const DtVector& localLocation,
97  DtChordIntersectionRecord& record,
98  DtIntersectionRecord::DtIntersectionType irtFlag =
99  DtIntersectionRecord::INT_ALL_DATA,
100  bool* dataAvailable = 0, bool overrideBlockingAssert = false) const;
101 
102  virtual bool intersect(const DtChord& chord, DtPoint& intersectionPoint,
103  double& intersectionTime,
104  bool* dataAvailable = 0, bool overrideBlockingAssert = false) const;
105 
106  virtual bool intersect(const DtChord& chord,
107  DtChordIntersectionRecord& record,
108  DtIntersectionRecord::DtIntersectionType irtFlag =
109  DtIntersectionRecord::INT_ALL_DATA,
110  bool* dataAvailable = 0, bool overrideBlockingAssert = false) const;
111 
118  virtual bool closestIntersection(const DtVector& curPosition,
119  DtVector& intersection, bool ignoreWater, bool* dataAvailable = 0,
120  bool overrideBlockingAssert = false) const;
121 
122 protected:
123  bool testInvariant() const;
124 
127  virtual double setOriginToDatabase();
128 
130  virtual const DtDcm& rotateToDcm() const;
131  virtual const DtDcm& rotateBackDcm() const;
132 
134  virtual DtVector rotateTerrainLocation(const DtVector& source) const;
135 
138  virtual DtChord convertAndRotateChordToLocal(const DtChord& source) const;
139 
141  virtual DtPoint convertLocalToSimTerrain(const DtPoint&, double addHeight = 0.) const;
142 
145  virtual void convertLocalToSimTerrain(DtChordIntersectionRecord&, double addHeight = 0.) const;
146 
147 public:
148  void setObjectName(const DtString&);
149  const DtString objectName() const;
150 
151  void setObjectType(const DtObjectType&);
152  const DtObjectType& objectType() const;
153 
154  void addRef();
155  void removeRef();
156  int referenceCount() const;
157 
158  void setObjectGeometricModel(const DtObjectGeometricModel* newObjGeomModel);
159  const DtObjectGeometricModel* objectGeometricModel() const;
160 
161  void setEntity(const DtVrfObject*);
162  const DtVrfObject* entity() const;
163 
164  void setPhysicalWorld(DtPhysicalWorld* newPhysicalWorld);
165  DtPhysicalWorld* physicalWorld();
166  const DtPhysicalWorld* physicalWorld() const;
167 
168  void clear();
169 
170  virtual DtAttachedTerrain* clone(const DtString& name, DtReaderWriterRegistry* const parentRegistry = 0) const;
171 
172 protected:
176 
179 
183 
187 
190  mutable DtTaitBryan myLastEntityOrientation;
191  mutable DtDcm myRotateToDcm;
192  mutable DtDcm myRotateBackDcm;
193 };
194 

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)