📄 ogrepaginglandscapeoptions.h
字号:
/***************************************************************************
OgrePagingLandScapeOptions.h - description
-------------------
begin : Sun Mar 02 2003
copyright : (C) 2003 by Jose A Milan
email : spoke2@supercable.es
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation; either version 2 of the *
* License, or (at your option) any later version. *
* *
***************************************************************************/
#ifndef PAGINGLANDSCAPEOPTIONS_H
#define PAGINGLANDSCAPEOPTIONS_H
#include <OgrePrerequisites.h>
#include <OgreString.h>
#include <OgreSingleton.h>
#include <OgreVector3.h>
namespace Ogre
{
/**
* A simple class for encapsulating parameters passed in when initializing a LandScapeRenderable
*/
class PagingLandScapeOptions : public Singleton<PagingLandScapeOptions>
{
public:
PagingLandScapeOptions();
~PagingLandScapeOptions();
void load( const String& filename );
bool setOption( const String& strKey, const void* pValue );
bool getOption( const String& strKey, void* pDestValue );
bool hasOption( const String& strKey );
bool getOptionValues( const String& strKey, std::list<SDDataChunk>& refValueList );
bool getOptionKeys( std::list<String>& refKeys );
String data2DFormat;
String landscape_filename;
String landscape_extension;
int PageSize; //size of the page.
int InitLOD; //Initial value for LOD
int world_height; //world page height, from 0 to height
int world_width; //world page width, from 0 to width
float change_factor; //Determines the value of the change factor for loading/unloading LandScape Pages
int max_adjacent_pages;
int max_preload_pages;
Vector3 scale;
int num_renderables; //Max number of renderables to use.
int num_tiles; //Max number of tiles to use.
float split_factor; //Factor of distance for spliting the tiles.
float threshold; //Factor of error for splitting the tiles.
float cameraThreshold; //If the last camera position is >= the the scene is trasverse again.
float Perspective; //Perspective Scale Factor for error LOD.
//Max number of tiles to process per loop.
int num_tiles_merge_process;
int num_tiles_split_process;
//Max number of renderables to process per loop.
int num_renderables_morph_process;
int num_renderables_demorph_process;
int num_renderables_morph_step;
bool lit;
bool colored;
/** Override standard Singleton retrieval.
@remarks
Why do we do this? Well, it's because the Singleton implementation is in a .h file,
which means it gets compiled into anybody who includes it. This is needed for the Singleton
template to work, but we actually only want it compiled into the implementation of the
class based on the Singleton, not all of them. If we don't change this, we get link errors
when trying to use the Singleton-based class from an outside dll.
@par
This method just delegates to the template version anyway, but the implementation stays in this
single compilation unit, preventing link errors.
*/
static PagingLandScapeOptions& getSingleton(void);
};
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -