Class TGeometryCreator

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TGeometryCreator = class(TReferenceCounted)

Description

Helper class for creating geometry on the fly.
You can get an instance of this class through TSceneManager.GetGeometryCreator().

Hierarchy

Overview

Methods

Public function CreateArrowMesh(TesselationCylinder: LongWord=4; TesselationCone: LongWord=8; Height: Single=1; CylinderHeight: Single=0.6; CylinderWidth: Single = 0.05; ConeWidth: Single= 0.3; CylinderColor: TARGBColor = $ffffffff; ConeColor: TARGBColor = $ffffffff): TMesh; inline;
Public function CreateConeMesh(Radius, Length: Single; Tesselation: LongWord; TopColor: TARGBColor = $ffffffff; BottomColor: TARGBColor = $ffffffff; Oblique: Single=0): TMesh; inline;
Public function CreateCubeMesh: TMesh; overload; inline;
Public function CreateCubeMesh(const Size: TVector3D): TMesh; overload; inline;
Public function CreateCylinderMesh(Radius, Length: Single; Tesselation: LongWord; Color: TARGBColor = $ffffffff; CloseTop: Boolean = True; Oblique: Single=0): TMesh; inline;
Public function CreateHillPlaneMesh(const TileSize: TDimension; const TileCount: TSize; Material: PMaterial; HillHeight: Single; const HillCount, TextureRepeatCount: TDimension): TMesh; inline;
Public function CreatePlaneMesh(const TileSize: TDimension; const TileCount: TSize; Material: PMaterial; const TextureRepeatCount: TDimension): TMesh; inline;
Public function CreateSphereMesh(Radius: Single = 0.5; PolyCountX: LongWord = 16; PolyCountY: LongWord = 16): TMesh; inline;
Public function CreateTerrainMesh(Texture, HeightMap: TImage; const StretchSize: TDimension; MaxHeight: Single; Driver: TVideoDriver; const DefaultVertexBlockSize: TSize; DebugBorders: Boolean = False): TMesh; inline;
Public function CreateVolumeLightMesh(SubdivideU: LongWord=32; SubdivideV: LongWord=32; FootColor: TARGBColor = $ffffffff; TailColor: TARGBColor = $ffffffff; LPDistance: Single=0.8): TMesh; overload; inline;
Public function CreateVolumeLightMesh(SubdivideU, SubdivideV: LongWord; FootColor, TailColor: TARGBColor; LPDistance: Single; LightDim: TVector3D): TMesh; overload; inline;

Description

Methods

Public function CreateArrowMesh(TesselationCylinder: LongWord=4; TesselationCone: LongWord=8; Height: Single=1; CylinderHeight: Single=0.6; CylinderWidth: Single = 0.05; ConeWidth: Single= 0.3; CylinderColor: TARGBColor = $ffffffff; ConeColor: TARGBColor = $ffffffff): TMesh; inline;

Creates an arrow mesh, composed of a cylinder and a cone.

Parameters
TesselationCylinder
Number of quads composing the cylinder.
TesselationCone
Number of triangles composing the cone's roof.
Height
Total height of the arrow.
CylinderHeight
Total height of the cylinder, should be lesser than total height.
CylinderWidth
Diameter of the cylinder.
ConeWidth
Diameter of the cone's base, should be not smaller than the cylinder's diameter.
CylinderColor
Color of the cylinder.
ConeColor
Color of the cone.
Returns

The generated Mesh.

Public function CreateConeMesh(Radius, Length: Single; Tesselation: LongWord; TopColor: TARGBColor = $ffffffff; BottomColor: TARGBColor = $ffffffff; Oblique: Single=0): TMesh; inline;

Creates a cone mesh.

Parameters
Radius
Radius of the cone.
Length
Length of the cone.
Tesselation
Number of quads around the circumference of the cone.
TopColor
The color of the top of the cone.
BottomColor
The color of the bottom of the cone.
Oblique
(to be documented).
Returns

The Generated mesh.

Public function CreateCubeMesh: TMesh; overload; inline;

Overloaded for default parameters.

Public function CreateCubeMesh(const Size: TVector3D): TMesh; overload; inline;

Creates a simple cube mesh.
size Dimensions of the cube.

Returns

Generated mesh.

Public function CreateCylinderMesh(Radius, Length: Single; Tesselation: LongWord; Color: TARGBColor = $ffffffff; CloseTop: Boolean = True; Oblique: Single=0): TMesh; inline;

Creates a cylinder mesh.

Parameters
Radius
Radius of the cylinder.
Length
Length of the cylinder.
Tesselation
Number of quads around the circumference of the cylinder.
Color
The color of the cylinder.
CloseTop
If true, close the ends of the cylinder, otherwise leave them open.
Oblique
(to be documented).
Returns

The Generated mesh.

Public function CreateHillPlaneMesh(const TileSize: TDimension; const TileCount: TSize; Material: PMaterial; HillHeight: Single; const HillCount, TextureRepeatCount: TDimension): TMesh; inline;

Creates a pseudo-random mesh representing a hilly terrain.

Parameters
TileSize
The size of each tile.
TileCount
The number of tiles in each dimension.
Material
The material to apply to the mesh.
HillHeight
The maximum height of the hills.
CountHills
The number of hills along each dimension.
TextureRepeatCount
The number of times to repeat the material texture along each dimension.
Returns

The Generated mesh.

Public function CreatePlaneMesh(const TileSize: TDimension; const TileCount: TSize; Material: PMaterial; const TextureRepeatCount: TDimension): TMesh; inline;

Creates a simple rectangular textured plane mesh.

Parameters
TileSize
The size of each tile.
TileCount
The number of tiles in each dimension.
Material
The material to apply to the mesh.
TextureRepeatCount
The number of times to repeat the material texture along each dimension.
Returns

The Generated mesh.

Public function CreateSphereMesh(Radius: Single = 0.5; PolyCountX: LongWord = 16; PolyCountY: LongWord = 16): TMesh; inline;

Creates a sphere mesh.

Parameters
Radius
Radius of the sphere
PolyCountX
Number of quads used for the horizontal tiling.
PolyCountY
Number of quads used for the vertical tiling.
Returns

The Generated mesh.

Public function CreateTerrainMesh(Texture, HeightMap: TImage; const StretchSize: TDimension; MaxHeight: Single; Driver: TVideoDriver; const DefaultVertexBlockSize: TSize; DebugBorders: Boolean = False): TMesh; inline;

Creates a terrain mesh from an image representing a heightfield.

Parameters
Texture
The texture to apply to the terrain.
HeightMap
An image that will be interpreted as a heightmap. The brightness (average color) of each pixel is interpreted as a height, with a 255 brightness pixel producing the maximum height.
StretchSize
The size that each pixel will produce, i.e. a 512x512 heightmap and a stretchSize of (10, 20) will produce a mesh of size 5120 x 10240
MaxHeight
The maximum height of the terrain.
Driver
The current video driver.
DefaultVertexBlockSize
(to be documented).
DebugBorders
(to be documented).
Returns

The Generated mesh.

Public function CreateVolumeLightMesh(SubdivideU: LongWord=32; SubdivideV: LongWord=32; FootColor: TARGBColor = $ffffffff; TailColor: TARGBColor = $ffffffff; LPDistance: Single=0.8): TMesh; overload; inline;

Overloaded for default parameters.

Public function CreateVolumeLightMesh(SubdivideU, SubdivideV: LongWord; FootColor, TailColor: TARGBColor; LPDistance: Single; LightDim: TVector3D): TMesh; overload; inline;

Creates a volume light mesh.

Parameters
SubdivideU
Horizontal patch count.
SubdivideV
Vertical patch count.
FootColor
Color at the bottom of the light.
TailColor
Color at the mid of the light.
LPDistance
Virtual distance of the light point for normals.
LightDim
Dimensions of the light.
Returns

The Generated mesh.


Generated by PasDoc 0.12.1 on 2012-09-14 17:32:22