altEngine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | Private Attributes | List of all members
Terrain Class Reference

#include <terrain.h>

Collaboration diagram for Terrain:
Collaboration graph
[legend]

Public Member Functions

 Terrain ()
 
int load (Graphics &gfx, float scale, vec3 &offset, char *heightmap, char *texture_str, bool sphere, int anisotropic)
 
int CreateMesh (char *heightmap, float scale_width, float scale_height, vec3 &offset, vertex_t *&vertex, unsigned int *&index, unsigned int &num_vertex, unsigned int &num_index)
 
void render (Graphics &gfx)
 
bool collision_detect (RigidBody &body)
 
float GetHeight (const vec3 &position, vec3 &normal)
 
void Smooth (vertex_t *image, int width, int height, vec3 &avg)
 
int CreateWater (float scale_width, float scale_height, vertex_t *&vertex, unsigned int *&index, unsigned int &num_vertex, unsigned int &num_index)
 
void CreateSphere (char *heightmap, float radius, vec3 &offset, vertex_t *&vertex, unsigned int *&index, unsigned int &num_vertex, unsigned int &num_index)
 

Public Attributes

float height
 
int x_index
 
int y_index
 
int top
 

Private Attributes

float size
 
vec3 offset
 
int num_col
 
int num_row
 
float trilength
 
bool loaded
 
vec3 avg
 
vertex_twater_array
 
unsigned int * water_index
 
unsigned int water_nvertex
 
unsigned int water_nindex
 
int water_vbo
 
int water_ibo
 
int water_tex
 
vertex_tvertex_array
 
unsigned int * index_array
 
unsigned int num_vertex
 
unsigned int num_index
 
int vbo
 
int ibo
 
int terrain_tex
 

Constructor & Destructor Documentation

Terrain::Terrain ( )

Member Function Documentation

bool Terrain::collision_detect ( RigidBody body)

Here is the call graph for this function:

Here is the caller graph for this function:

int Terrain::CreateMesh ( char *  heightmap,
float  scale_width,
float  scale_height,
vec3 offset,
vertex_t *&  vertex,
unsigned int *&  index,
unsigned int &  num_vertex,
unsigned int &  num_index 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void Terrain::CreateSphere ( char *  heightmap,
float  radius,
vec3 offset,
vertex_t *&  vertex,
unsigned int *&  index,
unsigned int &  num_vertex,
unsigned int &  num_index 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int Terrain::CreateWater ( float  scale_width,
float  scale_height,
vertex_t *&  vertex,
unsigned int *&  index,
unsigned int &  num_vertex,
unsigned int &  num_index 
)

Here is the caller graph for this function:

float Terrain::GetHeight ( const vec3 position,
vec3 normal 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int Terrain::load ( Graphics gfx,
float  scale,
vec3 offset,
char *  heightmap,
char *  texture_str,
bool  sphere,
int  anisotropic 
)

Here is the call graph for this function:

void Terrain::render ( Graphics gfx)

Here is the call graph for this function:

Here is the caller graph for this function:

void Terrain::Smooth ( vertex_t image,
int  width,
int  height,
vec3 avg 
)

Here is the caller graph for this function:

Member Data Documentation

vec3 Terrain::avg
private
float Terrain::height
int Terrain::ibo
private
unsigned int* Terrain::index_array
private
bool Terrain::loaded
private
int Terrain::num_col
private
unsigned int Terrain::num_index
private
int Terrain::num_row
private
unsigned int Terrain::num_vertex
private
vec3 Terrain::offset
private
float Terrain::size
private
int Terrain::terrain_tex
private
int Terrain::top
float Terrain::trilength
private
int Terrain::vbo
private
vertex_t* Terrain::vertex_array
private
vertex_t* Terrain::water_array
private
int Terrain::water_ibo
private
unsigned int* Terrain::water_index
private
unsigned int Terrain::water_nindex
private
unsigned int Terrain::water_nvertex
private
int Terrain::water_tex
private
int Terrain::water_vbo
private
int Terrain::x_index
int Terrain::y_index

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