My Project
Public Member Functions | List of all members
ParaTerrain::CRegionLayer Class Reference

a single region layer More...

#include <TerrainRegions.h>

Public Member Functions

void LoadFromFile (const char *filename, int nBytesPerPixel=0)
 load from an image file. More...
 
DWORD GetPixelValue (int x, int y)
 get the value in image. More...
 
int GetHeight ()
 pixels columns
 
int GetWidth ()
 pixels rows
 
const string & GetFileName ()
 get texture file path. More...
 
void SetFileName (const string &filename)
 set the file name. More...
 

Detailed Description

a single region layer

Member Function Documentation

§ GetFileName()

const string& ParaTerrain::CRegionLayer::GetFileName ( )
inline

get texture file path.

§ GetPixelValue()

DWORD CRegionLayer::GetPixelValue ( int  x,
int  y 
)

get the value in image.

§ LoadFromFile()

void CRegionLayer::LoadFromFile ( const char *  filename,
int  nBytesPerPixel = 0 
)

load from an image file.

Parameters
filenamefile name.
nBytesPerPixelif 0, the value is read from the filename. for example, if file name ends with "_8bits.png", it is treated as a 1 byte per pixel.

§ SetFileName()

void CRegionLayer::SetFileName ( const string &  filename)

set the file name.


The documentation for this class was generated from the following files: