LandPatch Class Reference

Small patch of a landscape. More...

#include <LandPatch.h>

Inheritance diagram for LandPatch:

VertexArrayObject RawObject List of all members.

Public Member Functions

 LandPatch (float *height_field, int size_x, int size_y, int offset_x, int offset_y, int total_x, int total_y, float stride, int xy_jump)
 ~LandPatch ()

Private Attributes

float * data
GLuint * indices

Detailed Description

Small patch of a landscape.

A patch of a landscape which gets build from a height field. Uses vertex arrays to display itself.

Definition at line 17 of file LandPatch.h.


Constructor & Destructor Documentation

LandPatch::LandPatch float *  height_field,
int  size_x,
int  size_y,
int  offset_x,
int  offset_y,
int  total_x,
int  total_y,
float  stride,
int  xy_jump
 

Constructor: Builds the geometry for the patch. The parameters of this routines are not validated, which means that the construction will fail if they do not make sense.

Parameters:
height_field Pointer to the actual height data used to build the patch. There must be at least 'total_x' * 'total_y' elements.
size_x Size of the patch along the x dimension.
size_y Size of the patch along the y dimension.
offset_x X offset into the height field (used when building a patch that is smaller than the actual height field).
offset_y Y offset into the height field (used when building a patch that is smaller than the actual height field).
total_x Size of the height field along the x dimension.
total_y Size of the height field along the y dimension.
stride Size of the grid squares. The x and y coordinates of the constructed geometry range from (0,0) to ('stride'*'size_x', 'stride'*'size_y').
xy_jump Used to sample the height field at bigger intervals. Only every 'xy_jump'th value of the height field is taken.

Definition at line 4 of file LandPatch.cpp.

LandPatch::~LandPatch  ) 
 

Destructor.

Definition at line 122 of file LandPatch.cpp.


Generated on Sun Jul 2 13:20:40 2006 for Demo by  doxygen 1.4.6-NO