Class TTerrainImage

Unit

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

Overview

Methods

Public constructor Create;
Public destructor Destroy; override;
Public function Height(const X, Y: Single): Single; override;
Public procedure LoadImage(const AImageURL: string);
Public procedure ClearImage;

Properties

Public property ImageURL: string read FImageURL;
Public property ImageHeightScale: Single read FImageHeightScale write FImageHeightScale default 1.0;
Public property ImageRepeat: boolean read FImageRepeat write FImageRepeat default false;
Public property ImageX1: Single read FImageX1 write FImageX1 default -1;
Public property ImageY1: Single read FImageY1 write FImageY1 default -1;
Public property ImageX2: Single read FImageX2 write FImageX2 default 1;
Public property ImageY2: Single read FImageY2 write FImageY2 default 1;

Description

Methods

Public constructor Create;
 
Public destructor Destroy; override;
 
Public function Height(const X, Y: Single): Single; override;
 
Public procedure LoadImage(const AImageURL: string);
 
Public procedure ClearImage;
 

Properties

Public property ImageURL: string read FImageURL;
 
Public property ImageHeightScale: Single read FImageHeightScale write FImageHeightScale default 1.0;
 
Public property ImageRepeat: boolean read FImageRepeat write FImageRepeat default false;
 
Public property ImageX1: Single read FImageX1 write FImageX1 default -1;
 
Public property ImageY1: Single read FImageY1 write FImageY1 default -1;
 
Public property ImageX2: Single read FImageX2 write FImageX2 default 1;
 
Public property ImageY2: Single read FImageY2 write FImageY2 default 1;
 

Generated by PasDoc 0.16.0.