VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOverlaySettings.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #ifndef DtOverlaySettings_H_
11 #define DtOverlaySettings_H_
12 
13 #include <vrvCore/vrvCore.h>
16 
17 #include <string>
18 #include <vector>
19 
20 namespace makVrv
21 {
22  class DtTerrainPatch;
23 
32  {
33  public:
34 
35  friend class DtTerrainPatch;
36 
37  protected:
38 
40  explicit DtOverlaySettings(DtTerrainPatch* patch = 0);
41 
46  DtOverlaySettings& operator=( const DtOverlaySettings& orig );
47 
51  void setPatch(DtTerrainPatch* patch);
52 
53  public:
54 
56  DtTerrainPatch* patch();
57 
59  virtual ~DtOverlaySettings();
60 
62  void getRecord(makArchives::DtOverlaySettingsRecord& rec) const;
63 
65  void setFromRecord(const makArchives::DtOverlaySettingsRecord& rec);
66 
68  std::vector<std::string> availableRasterLayers();
69 
71  virtual void getTextureScale(double& x, double& y) const;
72 
74  virtual void getTextureOffset(double& x, double& y) const;
75 
78  virtual std::string addRasterLayer(const std::string& name = "");
79 
81  virtual bool removeRasterLayer(const std::string& name);
82 
84  virtual bool renameRasterLayer(const std::string& oldName, const std::string& newName);
85 
87 
88 
90  bool rasterTextureEnabled(const std::string& raster) const;
91 
93  void setRasterTextureEnabled(const std::string& raster, bool enabled);
94 
96  void setRasterTextureWrapMode(const std::string& raster, int enabled);
97 
99  int rasterTextureWrapMode(const std::string& raster) const;
100 
102  void setRasterTextureBlendMode(const std::string&, int);
103 
105  int rasterTextureBlendMode(const std::string& raster) const;
106 
108  bool rasterTextureTransformIsSet(const std::string& raster) const;
109 
111  void setRasterTextureTransformIsSet(const std::string& raster, bool enabled);
112 
114  std::string rasterTextureDefinition(const std::string& raster) const;
115 
117  void setRasterTextureDefinition(const std::string& raster, const std::string& definition);
118 
120  void getRasterTextureScale(const std::string& raster, double& x, double& y) const;
121 
123  void getRasterTextureOffset(const std::string& raster, double& x, double& y) const;
124 
126  void getDatabaseOrigin(double& x, double& y, double& z) const;
127 
129  void setRasterTextureScale(const std::string& raster, double x, double y);
130 
132  void setRasterTextureOffset(const std::string& raster, double x, double y);
133 
136  void clearRasterTexture(const std::string& raster, bool applyAtEnd = true);
137 
139  void setBlockApplyRasterSettings(bool);
140  bool blockApplyRasterSettings() const;
141 
143  int rasterTexturePosition(const std::string&) const;
144 
146  int rasterOperation(const std::string&);
147 
149  bool moveRasterLayer(const std::string&, int);
150 
152 
153 
155 
156 
158  bool contourEnabled() const;
159 
161  bool contourIntermediateLinesEnabled() const;
162 
164  double contourInterval() const;
165 
167  double contourThickness() const;
168 
170  void setContourEnabled(bool enabled);
171 
173  void setContourIntermediateLinesEnabled(bool enabled);
174 
176  void setContourInterval(double interval);
177 
179  void setContourThickness(double thickness);
181 
182 
184 
185 
187  bool elevationEnabled() const;
188 
190  const makArchives::DtOverlaySettingsRecord::ControlPointList& elevationGradient() const;
191 
193  void setElevationEnabled(bool enabled);
194 
196  void setElevationGradient(const makArchives::DtOverlaySettingsRecord::ControlPointList& gradient);
198 
199  protected:
200 
201  void applyAllSettings();
202  void applyRasterTextureSettings(const std::string& raster);
203  void applyContourLinesOverlaySettings();
204  void applyElevationColorOverlaySettings();
205  void applyOriginalTextureState();
206 
207  protected:
208 
212  };
213 }
214 
215 #endif
216 
DtTerrainPatch * myPatch
Definition: DtOverlaySettings.h:209
Class for setting and maintaining state for user-modifiable overlay settings All of the overlay-chang...
Definition: DtOverlaySettings.h:31
Record of terrain raster layers, color by elevation settings, and contour line settings.
Definition: DtOverlaySettingsRecord.h:213
A container for a single piece of terrain, containing settings needed to recreate it...
Definition: DtTerrainPatch.h:42
Contains makVrv::DtOverlaySettingsRecord class.
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
std::vector< DtGradientControlPoint > ControlPointList
Definition: DtOverlaySettingsRecord.h:233
bool myBlockRasterSettings
Definition: DtOverlaySettings.h:211
makArchives::DtOverlaySettingsRecord myOverlaySettingsRecord
Definition: DtOverlaySettings.h:210
Contains DLL export macros.

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)