📄 ogrepaginglandscapedata2d_heightfieldtc.h
字号:
/***************************************************************************
OgrePagingLandScapeData2D_HeightFieldTC.h - description
-------------------
begin : Mon Oct 13 2003
copyright : (C) 2002 by Jose A Milan
email : spoke@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 PAGINGLANDSCAPEDATA2D_HEIGHTFIELDTC_H
#define PAGINGLANDSCAPEDATA2D_HEIGHTFIELDTC_H
#include "OgrePagingLandScapePrerequisites.h"
namespace Ogre
{
/**
* A specialized class for loading 2D Data from a compresed HeightField file.
*/
class PagingLandScapeData2D_HeightFieldTC: public PagingLandScapeData2D
{
public:
PagingLandScapeData2D_HeightFieldTC();
~PagingLandScapeData2D_HeightFieldTC();
virtual Vector3 getNormalAt (const float mX, const float mZ);
virtual ColourValue getBase (const float mX, const float mZ);
virtual ColourValue getCoverage (const float mX, const float mZ);
protected:
virtual void _load(const float x, const float z);
virtual void _load();
virtual void _load(Image *newHeightmap);
virtual void _unload();
private:
float _decodeTC(int encoded);
float input_max, input_min;
Image *mImage;
uint mBpp;// should be 4 bytes (mImage is RGBA)
};
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -