Gorilla.Terrain.Utils
Unit Gorilla.Terrain.Utils.pasClasses
- TGorillaTerrainHelper = class ( TObject )
TGorillaTerrainHelper
Ancestors
Members
Methods
- protected procedure RebuildPlane
(
const
AMeshData :
TMeshData; const
ASubDivWidth :
Integer; const
ASubDivHeight :
Integer; const
ATwoFace :
Boolean
)
;
class;
Rebuilds the internal raw grid plane. This method ignores any heightmap manipulations and only returns a plane with the given rows and columns.
- protected procedure RebuildSphere ( const AMeshData : TMeshData; const ASubDivAxes : Integer; const ASubDivHeight : Integer; const ATwoFace : Boolean ) ; class;
- public procedure BuildTerrainFromHeightMap
(
const
AMeshData :
TMeshData; const
ASubDivWidth :
Integer; const
ASubDivHeight :
Integer; const
ATwoFace :
Boolean; const
AHeightMap :
TBitmap; const
AHeightScale :
Single; const
ASmoothing :
Integer
)
;
class;
Clears the previous terrain and rebuilds it from given heightmap. Procedural algorithms will also use this method, after building their heightmap.
Parameters
- const AMeshData : TMeshData - The vertex/index buffer where to write generated vertices to. Subdivisions in X direction. Subdivisions in Z direction. Should vertices be created on both sides of the grid. A heightmap bitmap to generate a terrain from. A scaling value for Y-position of each vertex. A smoothing value. The higher the value the more the terrain getting smoothed. A zero value means no smoothing.
- const ASubDivWidth : Integer - The vertex/index buffer where to write generated vertices to. Subdivisions in X direction. Subdivisions in Z direction. Should vertices be created on both sides of the grid. A heightmap bitmap to generate a terrain from. A scaling value for Y-position of each vertex. A smoothing value. The higher the value the more the terrain getting smoothed. A zero value means no smoothing.
- const ASubDivHeight : Integer - The vertex/index buffer where to write generated vertices to. Subdivisions in X direction. Subdivisions in Z direction. Should vertices be created on both sides of the grid. A heightmap bitmap to generate a terrain from. A scaling value for Y-position of each vertex. A smoothing value. The higher the value the more the terrain getting smoothed. A zero value means no smoothing.
- const ATwoFace : Boolean - The vertex/index buffer where to write generated vertices to. Subdivisions in X direction. Subdivisions in Z direction. Should vertices be created on both sides of the grid. A heightmap bitmap to generate a terrain from. A scaling value for Y-position of each vertex. A smoothing value. The higher the value the more the terrain getting smoothed. A zero value means no smoothing.
- const AHeightMap : TBitmap - The vertex/index buffer where to write generated vertices to. Subdivisions in X direction. Subdivisions in Z direction. Should vertices be created on both sides of the grid. A heightmap bitmap to generate a terrain from. A scaling value for Y-position of each vertex. A smoothing value. The higher the value the more the terrain getting smoothed. A zero value means no smoothing.
- const AHeightScale : Single - The vertex/index buffer where to write generated vertices to. Subdivisions in X direction. Subdivisions in Z direction. Should vertices be created on both sides of the grid. A heightmap bitmap to generate a terrain from. A scaling value for Y-position of each vertex. A smoothing value. The higher the value the more the terrain getting smoothed. A zero value means no smoothing.
- const ASmoothing : Integer - The vertex/index buffer where to write generated vertices to. Subdivisions in X direction. Subdivisions in Z direction. Should vertices be created on both sides of the grid. A heightmap bitmap to generate a terrain from. A scaling value for Y-position of each vertex. A smoothing value. The higher the value the more the terrain getting smoothed. A zero value means no smoothing.
- public procedure BuildSphereTerrainFromHeightMap ( const AMeshData : TMeshData; const ASubDivAxes : Integer; const ASubDivHeight : Integer; const ATwoFace : Boolean; const AHeightMap : TBitmap; const AHeightScale : Single; const ASmoothing : Integer ) ; class;