KGLLib
Classes | Public Member Functions | Protected Member Functions | Protected Attributes
KGLLib::SimpleTerrain Class Reference
Inheritance diagram for KGLLib::SimpleTerrain:
KGLLib::Mesh KGLLib::Batch

List of all members.

Classes

class  Chunk

Public Member Functions

 SimpleTerrain (const QString &imgfilename)
virtual void render ()
void setHeightRange (float min, float max)
void setTileSize (float size)
int width () const
int height () const
float tileSize () const
bool isValid () const

Protected Member Functions

void addVertex (int x, int z, int index)
void recalcNormalmap ()
void cookMesh (bool useIndices)
float height (int x, int z) const
Eigen::Vector3f cellNormal (int x1, int z1, int x2, int z2, int x3, int z3)
void setDirty ()

Protected Attributes

float ** mHeightmap
Eigen::Vector3f ** mNormalmap
bool mDirty
Eigen::Vector3f * mVertices
Eigen::Vector3f * mNormals
unsigned int * mIndices
int mWidth
int mHeight
float mMinHeight
float mMaxHeight
float mTileSize

Member Function Documentation

void KGLLib::SimpleTerrain::render ( ) [virtual]

Renders the batch.

This is same as calling first bind(), then renderOnce() and finally unbind().

Reimplemented from KGLLib::Batch.


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