## Public API Reference

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

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

# iSimpleFormerState Struct Reference

iSimpleFormerState exposes implementation specific methods for the SimpleTerraformer plugin More...

`#include <ivaria/simpleformer.h>`

Inheritance diagram for iSimpleFormerState:

[legend]
List of all members.

## Public Member Functions

virtual bool | SetFloatMap (csStringID type, iImage *map, float scale=1.0, float offset=0.0)=0
| Set a generic additional float map to be used.
virtual void | SetHeightmap (float *data, unsigned int width, unsigned int height)=0
| Set a heightmap to be used.
virtual void | SetHeightmap (iImage *heightmap)=0
| Set a heightmap to be used.
virtual bool | SetIntegerMap (csStringID type, iImage *map, int scale=1, int offset=0)=0
| Set a generic additional integer map to be used.
virtual void | SetOffset (csVector3 scale)=0
| Set a offset to be applied to the heightmap region (X, Z) and height (Y).
virtual void | SetScale (csVector3 scale)=0
| Set a scaling factor to be applied to the heightmap region (X, Z) and height (Y).

## Detailed Description

iSimpleFormerState exposes implementation specific methods for the SimpleTerraformer plugin

Definition at line 39 of file simpleformer.h.

## Member Function Documentation

virtual bool iSimpleFormerState::SetFloatMap | ( | csStringID | type,
|  | iImage * | map,
|  | float | scale = `1.0`,
|  | float | offset = `0.0`
| ) | `[pure virtual]`

Set a generic additional float map to be used.

Parameters:

  | type | The ID for this map. To get values of this you need to fetch the stringset with tag 'crystalspace.shared.stringset' and 'Request()' an ID from that.
  | map | The image from which this map will be made. If this is an indexed image then the integer index will be casted to float, diviced by 256 and then scaled+offset. If this is a 24-bit image then the three color components are averaged resulting in a value between 0 and 1 too.
  | scale | The scale to apply to the map.
  | offset | The offset to apply to the map.

Returns:
  false on error (bad dimension or image).

virtual void iSimpleFormerState::SetHeightmap | ( | float * | data,
|  | unsigned int | width,
|  | unsigned int | height
| ) | `[pure virtual]`

Set a heightmap to be used.

The heightmap will by default be covering a region from -1..1 along X and Z, and areas outside this will return a height of 0

Remarks:
  The plugin will make a copy of the data. So you must delete it after calling this function.

virtual void iSimpleFormerState::SetHeightmap | ( | iImage * | heightmap | ) | `[pure virtual]`

| Set a heightmap to be used. The heightmap will by default be covering a region from -1..1 along X and Z, and areas outside this will return a height of 0

virtual bool iSimpleFormerState::SetIntegerMap | ( | csStringID | type,
|  | iImage * | map,
|  | int | scale = `1`,
|  | int | offset = `0`
| ) | `[pure virtual]`

Set a generic additional integer map to be used.

Parameters:

  | type | is the ID for this map. To get values of this you need to fetch the stringset with tag 'crystalspace.shared.stringset' and 'Request()' an ID from that.
  | map | is the image from which this map will be made. This must be an indexed (palette) image.
  | scale | The scale to apply to the map.
  | offset | The offset to apply to the map.

Returns:
  false on error (bad dimension or image).

virtual void iSimpleFormerState::SetOffset | ( | csVector3 | scale | ) | `[pure virtual]`

| Set a offset to be applied to the heightmap region (X, Z) and height (Y).

virtual void iSimpleFormerState::SetScale | ( | csVector3 | scale | ) | `[pure virtual]`

| Set a scaling factor to be applied to the heightmap region (X, Z) and height (Y).

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

- ivaria/simpleformer.h