# I3DShTerrainFilter Struct Reference
[Shell Interfaces]

Inheritance diagram for I3DShTerrainFilter:

List of all members.

## Public Member Functions
virtual void MCCOMAPI | Shuffle ()=0
virtual void MCCOMAPI | Filter (TMCArray< real > &heightField, TVector2 &heightBound, const TIndex2 &size, const TVector2 &cellSize)=0
virtual boolean MCCOMAPI | CanBuildPreview ()=0
virtual void MCCOMAPI | SetTerrain (I3DShPrimitiveComponent *terrainPrimitive)=0
virtual I3DShPrimitiveComponent *MCCOMAPI | GetTerrain ()=0

## Detailed Description

A terrain filter takes a height field as input and output another height field.

There are two interfaces to access a terrain filter: The shell interface (I3DShTerrainFilter) and the external interface (I3DExTerrainFilter) . You can get one from the other using QueryInterface.

Whenever it is possible you should use the Shell interface (I3DShTerrainFilter) to access the component because the Shell will make sure that the parameter map of the external component is valid. This is especially important if the component is animated. For more information on components see the Overview of the SDK.

See also:
  I3DExTerrainFilter

## Member Function Documentation

virtual boolean MCCOMAPI I3DShTerrainFilter::CanBuildPreview | ( |  | ) | `[pure virtual]`

Returns true if the filter is able to make a preview of the final map working on a smaller map

virtual void MCCOMAPI I3DShTerrainFilter::Filter | ( | TMCArray< real > & | heightField,
|  | TVector2 & | heightBound,
|  | const TIndex2 & | size,
|  | const TVector2 & | cellSize |
| ) |  |  | `[pure virtual]`

Filter the height field. This is where the real work is done.

Parameters:

  | heightField | Array of real that defines the height field.
  | heightBound | Height min and max of the terrain (must be updated by this function if the height bounds changed)
  | size | size of the array
  | cellSize | size of a cell of the grid

virtual I3DShPrimitiveComponent* MCCOMAPI I3DShTerrainFilter::GetTerrain | ( |  | ) | `[pure virtual]`

Returns the terrain primitive on which the filter is applied

virtual void MCCOMAPI I3DShTerrainFilter::SetTerrain | ( | I3DShPrimitiveComponent * | terrainPrimitive | ) | `[pure virtual]`

Sets the terrain on which the filter is applied

Parameters:

  | terrainPrimitive | A pointer to the terrain primitive.

virtual void MCCOMAPI I3DShTerrainFilter::Shuffle | ( |  | ) | `[pure virtual]`

Should change the seed of the random generator used by this filter (if the filter has a random component).

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

- I3DShTerrainFilter.h