Class THeightmap
Unit
a3dge.Heightmap
Declaration
type THeightmap = class(TObject)
Description
Contains and manages the heightmap.
Please refer to the unit's documentation for more information.
See also
- TWorld3D.Heightmap
- Heightmap.
- SetData
- Set heightmap data.
Hierarchy
Overview
Methods
Properties
 |
property MapScale: Single read fMapScale write SetMapScale; |
 |
property HeightScale: Single read fHeightScale write SetHeightScale; |
 |
property OwnsTextureMap: Boolean
read GetOwnsTextureMap write SetOwnstextureMap; |
 |
property Visible: Boolean read fVisible write fVisible; |
 |
property UseLight: Boolean read fLight write fLight; |
 |
property TextureMap: ALLEGRO_BITMAPptr
read GetTextureMap write SetTextureMap; |
Description
Methods
 |
constructor Create; |
Constructor.
|
 |
destructor Destroy; override; |
Destructor.
|
 |
procedure SetData (aHeightmapBmp, aTextureBmp: ALLEGRO_BITMAPptr); |
Set heightmap data.
Bitmaps doesn't need to be the same size but heightmap size must be power of two and at least of 512 by 512 pixels.
Calling this method won't change the Visible property.
Parameters
- aHeightmapBmp
- A bitmap containing the heightmap data. If it's 8bpp it will use the index, else it will use the red channel.
- aTextureBmp
- A bitmap containing the texture used to map the heightmap.
See also
- THeightmap.TextureMap
- Access to the texture map.
- THeightmap.Clear
- Release all resources used by heightmap.
- THeightmap.OwnsTextureMap
- Should free the texture map when destroyed.
- THeightmap.MapScale
- Factor to scale map.
- THeightmap.HeightScale
- Factor to scale height.
|
 |
function GetHeightAt (const aPosition: TVector3D): Single; overload; |
Return height in the given point.
|
 |
function GetHeightAt (const aX, aZ: GLfloat): Single; overload; |
|
 |
procedure Render (const aX, aZ: Single); |
Render the heightmap.
Parameters
- aX
- Camera X coordinates
- aZ
- Camera Z coordinate.
See also
- THeightmap.Visible
- Is it visible?
Default if False .
- THeightmap.UseLight
- Should use lights when rendering the heightmap.
|
Properties
 |
property MapScale: Single read fMapScale write SetMapScale; |
Factor to scale map.
See also
- THeightmap.HeightScale
- Factor to scale height.
|
 |
property HeightScale: Single read fHeightScale write SetHeightScale; |
Factor to scale height.
See also
- THeightmap.MapScale
- Factor to scale map.
|
 |
property OwnsTextureMap: Boolean
read GetOwnsTextureMap write SetOwnstextureMap; |
Should free the texture map when destroyed.
See also
- THeightmap.TextureMap
- Access to the texture map.
- THeightmap.SetData
- Set heightmap data.
|
 |
property Visible: Boolean read fVisible write fVisible; |
Is it visible?
Default if False .
See also
- THeightmap.Render
- Render the heightmap.
- THeightmap.Clear
- Release all resources used by heightmap.
|
 |
property UseLight: Boolean read fLight write fLight; |
Should use lights when rendering the heightmap.
Setting it to False may improve the heightmap looking if the texture map includes shading. Also would make it render a tad faster.
Default is True
See also
- THeightmap.Render
- Render the heightmap.
- THeightmap.TextureMap
- Access to the texture map.
|
 |
property TextureMap: ALLEGRO_BITMAPptr
read GetTextureMap write SetTextureMap; |
Access to the texture map.
See also
- THeightmap.OwnsTextureMap
- Should free the texture map when destroyed.
- THeightmap.SetData
- Set heightmap data.
|
Generated by PasDoc 0.15.0. Generated on 2025-07-31 11:41:01.
|