Castle Game Engine: CastleTerrain: Class TTerrainImage

# Class TTerrainImage
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleTerrain ## Declaration `type TTerrainImage = class(TTerrain)` ## Description Terrain (height for each X, Y) data taken from intensities in an image. The image covers (ImageX1, ImageY1) ... (ImageX2, ImageY2) area in XY plane. If you ask for Height outside of this range, it is repeated infinitely (if ImageRepeat) or clamped (if not ImageRepeat). Image color (converted to grayscale) acts as height (scaled by ImageHeightScale). When image is not loaded, this always returns height = 0. ## Hierarchy TObject TTerrain TTerrainImage ## Overview ### Methods
| `constructor Create;`
| `destructor Destroy; override;`
| `function Height(const X, Y: Single): Single; override;`
| `procedure LoadImage(const AImageURL: string);`
| `procedure ClearImage;`
### Properties
| `property ImageURL: string read FImageURL;`
| `property ImageHeightScale: Single read FImageHeightScale write FImageHeightScale default 1.0;`
| `property ImageRepeat: boolean read FImageRepeat write FImageRepeat default false;`
| `property ImageX1: Single read FImageX1 write FImageX1 default -1;`
| `property ImageY1: Single read FImageY1 write FImageY1 default -1;`
| `property ImageX2: Single read FImageX2 write FImageX2 default 1;`
| `property ImageY2: Single read FImageY2 write FImageY2 default 1;`
## Description ### Methods
| `constructor Create;`
| `destructor Destroy; override;`
| `function Height(const X, Y: Single): Single; override;`
| `procedure LoadImage(const AImageURL: string);`
| `procedure ClearImage;`
### Properties
| `property ImageURL: string read FImageURL;`
| `property ImageHeightScale: Single read FImageHeightScale write FImageHeightScale default 1.0;`
| `property ImageRepeat: boolean read FImageRepeat write FImageRepeat default false;`
| `property ImageX1: Single read FImageX1 write FImageX1 default -1;`
| `property ImageY1: Single read FImageY1 write FImageY1 default -1;`
| `property ImageX2: Single read FImageX2 write FImageX2 default 1;`
| `property ImageY2: Single read FImageY2 write FImageY2 default 1;`
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:12