3 #include "TerrainCommon.h" 4 #include "ImageLoader.h" 25 void PrependMediaPath(
const char *szFilename,
char *szFullFilename,
int bufferLength);
41 bool SetProperty(
const char *szProperty,
const char *szValue);
43 bool GetProperty(
const char *szProperty,
char *szValue);
122 int GetTextureMaskWidth();
123 void SetTextureMaskHeight(
int height);
124 int GetTextureMaskHeight();
125 void SetMaskReloadQueueActive(
bool isQueueActive);
126 bool IsMaskReloadQueueActive();
127 void SetBaseTextureEnabled(
bool enabled);
128 bool IsBaseTextureEnabled();
150 static const int32 TextureMaskBitsPerPixel;
156 bool m_bIsCompilerOnly;
157 bool m_bCompressTextures;
158 int m_ScreenWidth, m_ScreenHeight;
160 bool m_UseDynamicTextures;
162 int m_TessellateMethod;
163 float m_TessellateZWeight;
164 float m_PickThreshold;
165 bool m_bPreloadTextures;
169 bool m_bUseVertexLocking;
170 int m_TextureMaskWidth, m_TextureMaskHeight;
171 bool m_bIsMaskReloadQueueActive;
172 bool m_IsBaseTextureEnabled;
174 float m_fHighResTextureRadius;
176 bool m_bBackupFilesOnSave;
bool UseBorders()
Indicates whether or not texture borders are on as set by calling SetUseBorders().
Definition: Settings.cpp:111
bool UseDynamicTextures()
Forces Texture objects to use persisten buffers by default. See Texture::SetBufferPersistent() for de...
Definition: Settings.cpp:191
Definition: SceneObject.h:15
int GetTessellateMethod()
Gets the current tessellation heuristic method.
Definition: Settings.cpp:343
void SetUseDynamicTextures(bool useDynamic)
Specifies whether or not textures should be unloaded when they are not visible. This allows larger am...
Definition: Settings.cpp:186
Not as general as TM_NEW; handles camera rolling by also looking at 2D screen size of Z axis of bound...
Definition: Settings.h:145
bool UseVertexLocking()
Indicates whether or not compiled vertex array support is on as set by calling SetUseVertexLocking()...
Definition: Settings.cpp:101
void SetPickThreshold(float threshold)
Specifies the maximum distance between the surface of the terrain and a picked point that can be cons...
Definition: Settings.cpp:167
bool IsMediaPathSet()
Indicates whether or not a call to SetMediaPath() has been made.
Definition: Settings.cpp:245
void SetUseNormals(bool bUseNormals)
Specifies whether or not vertex normals should be calculated and used.
Definition: Settings.cpp:76
void PrependMediaPath(const char *szFilename, char *szFullFilename)
Prepends the current media path to the specified filename. It is the caller's responsibility to alloc...
Definition: Settings.cpp:253
bool IsBackupFilesOnSave()
whether to backup critical files on save
Definition: Settings.cpp:61
void SetUseBorders(bool bUseBorders)
If set to true, instructs Demeter to use texture border extensions to eliminate texture seams when bi...
Definition: Settings.cpp:106
bool IsVerbose()
Indicates whether or not Demeter is outputting diagnostic information at runtime. ...
Definition: Settings.cpp:283
void SetTessellateZWeight(float method)
ZWeight to make screen Z coordinate more significant in level of detail decisions.
Definition: Settings.cpp:348
const char * GetMediaPath()
get the media path pointer
Definition: Settings.cpp:241
bool IsHeadless()
Indicates whether or not headless mode is on, as set by calling SetHeadless().
Definition: Settings.cpp:273
float GetTessellateZWeight()
Gets the ZWeight.
Definition: Settings.cpp:353
bool IsDiagnostic()
Indicates whether or not diagnostic mode as been activated as set by calling SetDiagnostic().
Definition: Settings.cpp:121
void SetBackupFilesOnSave(bool bBackupOnSave)
whether to backup critical files on save
Definition: Settings.cpp:56
void SetDiagnostic(bool bDiagnostic)
This option makes Demeter run slowly, so only use it for debuggin purposes.
Definition: Settings.cpp:116
int GetScreenHeight()
Retrieves the current height of the rendering surface assumed by Demeter.
Definition: Settings.cpp:308
void SetScreenWidth(int width)
Tells Demeter what the current width of the rendering surface is.
Definition: Settings.cpp:303
TESSELLATEMETHOD
Enumerates the simplification heuristic methods for tessellation.
Definition: Settings.h:136
Fast heuristic but overall worse performance; doesn't handle camera rolling at all.
Definition: Settings.h:143
void SetCompilerOnly(bool bIsCompilerOnly)
Determins whether or not the application that is using Demeter is a terrain compiler-like tool or a r...
Definition: Settings.cpp:323
void SetUseVertexLocking(bool bUseVertexLocking)
If set to true, instructs Demeter to use compiled vertex array extensions - this can cause significan...
Definition: Settings.cpp:96
void SetTextureMaskWidth(int width)
Puts Demeter in a diagnostic mode that checks for such things as memory leaks and unbound textures...
Definition: Settings.cpp:358
float GetPickThreshold()
Gets the pick threshold as set in a call to SetPickThreshold().
Definition: Settings.cpp:172
bool IsCompilerOnly()
Indicates whether or not the application that is using Demeter is a terrain compiler-like tool or a r...
Definition: Settings.cpp:318
The Settings class is simply a manager of global variables. It provides a single place to set and ret...
Definition: Settings.h:10
Fast but doesn't always approximate well - goes purely by 2D screen-size of terrain block...
Definition: Settings.h:141
int GetScreenWidth()
Retrieves the current width of the rendering surface assumed by Demeter.
Definition: Settings.cpp:298
void SetHighResTextureRadius(float radius)
set the radius in world coordinates, within eye position of which high-res textures will be used if p...
Definition: Settings.cpp:177
void SetPreloadTextures(bool bPreload)
Specifies whether or not all of a terrain's textures should be preloaded when the terrain is loaded...
Definition: Settings.cpp:157
void SetTextureCompression(bool bCompress)
Specifies whether or not textures should be compressed.
Definition: Settings.cpp:328
void SetScreenHeight(int height)
Tells Demeter what the current height of the rendering surface is.
Definition: Settings.cpp:313
void SetEditor(bool isEditor)
Puts Demeter in editor mode.
Definition: Settings.cpp:288
bool GetPreloadTextures()
Gets the preload setting as set in a call to SetPreLoadTextures().
Definition: Settings.cpp:162
void SetTessellateMethod(int method)
Set the tessellation heuristic method to use when tessellating.
Definition: Settings.cpp:338
Definition: ImageLoader.h:4
bool IsEditor()
Indicates whether or not SetEditor(true) has been called.
Definition: Settings.cpp:293
bool IsTextureCompression()
Indicates whether or not texture compression is used by Texture objects by default.
Definition: Settings.cpp:333
static Settings * GetInstance()
Returns the global instance of this class. The Settings class acts a singleton, so there is only one ...
Definition: Settings.cpp:49
void SetHeadless(bool isHeadless)
Puts Demeter in a non-graphics mode.
Definition: Settings.cpp:268
bool UseNormals()
Indicates whether or not normals are on as set by calling SetUseNormals().
Definition: Settings.cpp:81
bool GetProperty(const char *szProperty, char *szValue)
Retrieves a named global property.
Definition: Settings.cpp:139
void SetMediaPath(const char *szPath)
Sets the filesystem path that Demeter will look in when reading textures, elevation files...
Definition: Settings.cpp:196
float GetHighResTextureRadius()
Gets the radius setting as set in a call to SetHighResTextureRadius().
Definition: Settings.cpp:182
bool SetProperty(const char *szProperty, const char *szValue)
Sets a named global property to the specified value.
Definition: Settings.cpp:126
void SetVerbose(bool bVerbose)
Specifies whether or not Demeter should output diagnostic information at runtime. ...
Definition: Settings.cpp:278
Goes by "screen-space" 3D length of Z axis of bounding box.
Definition: Settings.h:147
Good general algorithm (handles camera roll and pitch) - uses skewed bounding boxes that closely fit ...
Definition: Settings.h:139