## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# csGenerateImage Class Reference

This class will compute a texture for a terrain. More...

`#include <cstool/gentrtex.h>`

List of all members.

## Public Member Functions

| csGenerateImage ()
| create empty
iImage * | Generate (int totalw, int totalh, int startx, int starty, int partw, int parth)
| Generate part of a terrain image.
void | SetTexture (csGenerateImageTexture *t)
| Set the texture to show, You can easily construct one yourself, using the classes below.
| ~csGenerateImage ()
| destroy

## Detailed Description

This class will compute a texture for a terrain.

The texture is based on the heightmap for the terrain. It is like the povray MaterialMap, but then indexed with the height of the terrain. This means, that given some base textures that should display at certain heights, the whole texture is computed. At each pixel the base textures are blended together, based on the height.

Definition at line 73 of file gentrtex.h.

## Constructor & Destructor Documentation

csGenerateImage::csGenerateImage | ( |  | ) |

| create empty

csGenerateImage::~csGenerateImage | ( |  | ) |

| destroy

## Member Function Documentation

iImage* csGenerateImage::Generate | ( | int | totalw,
|  | int | totalh,
|  | int | startx,
|  | int | starty,
|  | int | partw,
|  | int | parth
| ) |

| Generate part of a terrain image. Give total terrain image size, give the startx,y texel in the total image, and the size of the part you want generated creates a new iImage.

void csGenerateImage::SetTexture | ( | csGenerateImageTexture * | t | ) | `[inline]`

| Set the texture to show, You can easily construct one yourself, using the classes below. Definition at line 89 of file gentrtex.h.

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

- cstool/gentrtex.h