CAST II Game Engine |
||||||||
![]() |
MAIN | FEATURES | SCREENSHOTS | FORUMS | MANUAL | DOWNLOADS | CONTACTS | |
(C) 2006 George "Mirage" Bakhtadze. www.casteng.com
The source code may be used under either MPL 1.1 or LGPL 2.1 license. See included license.txt file
Unit contains basic classes of visual items
| Name | Description |
|---|---|
Class THeighTMapEditOp | |
Class THeighTMapEditOpAdjust | |
Class THeighTMapEditOpSmooth | |
Class TLight | Light source |
Class TLookAtCamera | Camera which looks at a specified target point |
Class TMappedItem | |
Class TMappedTesselator | |
Class TSharedTesselator | |
Class TSharedTesselators | |
Class TTemporaryVisible | |
Class TTessBBoxUpdateMsg | |
Class TTesselator | Performs triangulation of visible items |
Class TVisible |
procedure ConvertVertices(SrcFormat, DestFormat: Longword; TotalVertices: Integer; Src: Pointer; Dest: Pointer); |
function GetVertexElementOffset(VertexFormat, ElementIndex: Longword): Integer; |
function GetVertexFormat(Transformed, Normals, Diffuse, Specular, PointSize: Boolean; VertexWeights: Word; TextureSets: array of Integer): Longword; |
function GetVertexIndexedBlending(VertexFormat: Longword): Boolean; |
function GetVertexSize(VertexFormat: Longword): Cardinal; |
function GetVertexTextureCoordsCount(VertexFormat, TextureSetIndex: Longword): Integer; |
function GetVertexTextureSetsCount(VertexFormat: Longword): Integer; |
function GetVertexWeightsCount(VertexFormat: Longword): Integer; |
function VertexContains(VertexFormat, ElementIndex: Longword): Boolean; |
procedure ConvertVertices(SrcFormat, DestFormat: Longword; TotalVertices: Integer; Src: Pointer; Dest: Pointer); |
function GetVertexElementOffset(VertexFormat, ElementIndex: Longword): Integer; |
function GetVertexFormat(Transformed, Normals, Diffuse, Specular, PointSize: Boolean; VertexWeights: Word; TextureSets: array of Integer): Longword; |
/ Determines a vertex format which can include variuos components. VertexWeight can be OR'ed with vwIndexedBlending to indicate that last weight is actually a dword with indices
function GetVertexIndexedBlending(VertexFormat: Longword): Boolean; |
function GetVertexSize(VertexFormat: Longword): Cardinal; |
function GetVertexTextureCoordsCount(VertexFormat, TextureSetIndex: Longword): Integer; |
function GetVertexTextureSetsCount(VertexFormat: Longword): Integer; |
function GetVertexWeightsCount(VertexFormat: Longword): Integer; |
function VertexContains(VertexFormat, ElementIndex: Longword): Boolean; |
CTesselator = of TTesselator; |
TClassRec = record TessClass: CTesselator; TessMap: BaseCont.TPointerPointerMap; end; |
TTesselationParameters = record Camera: TCamera; ModelMatrix: TMatrix4s; end; |
TTesselationStatus = record TesselatorType: TTesselatorType; BufferIndex, Offset: Integer; Status: TTesselationState; LastResetCounter, LastBufferResetCounter: Integer; end; |
TTextureMatrixDelegate = procedure(TextureStage: Integer; out Matrix: TMatrix4s) of object; |
CTesselator = of TTesselator; |
TClassRec = record TessClass: CTesselator; TessMap: BaseCont.TPointerPointerMap; end; |
TTesselationParameters = record Camera: TCamera; ModelMatrix: TMatrix4s; end; |
Data structure passed to tesselator buffer filling methods
Camera - currently applied camera
ModelMatrix - model transform of visible items being rendered
TTesselationStatus = record TesselatorType: TTesselatorType; BufferIndex, Offset: Integer; Status: TTesselationState; LastResetCounter, LastBufferResetCounter: Integer; end; |
Current tesselation status data structure BufferIndex - index of buffer in API-independent buffers Offset - offset within the buffer in elements (vertices, indices, etc) Status - current tesselation state LastResetCounter - reset counter should not be modified manually
TTextureMatrixDelegate = procedure(TextureStage: Integer; out Matrix: TMatrix4s) of object; |
The delegate used to retrieve a custom texture matrix. See tmCustom. TextureSet is an index of texture set to which the retrieved matrix will applied
TTesselationState | ||
| Tesselation status | ||
tsMaxSizeChanged | Tesselator was cardinally changed, including maximum number of vertices and/or indices | |
tsChanged | Tesselator data was changed | |
tsTesselated | Tesselator data was not changed so no reason to tesselate it again | |
TTesselatorKind | ||
| Kind of tesselator | ||
tkNone | Null tesselator. Used when the item is tesselated by other shared tesselator (GUI, impostors, etc) | |
tkOwn | The item is tesselated by its own tesselator (default) | |
tkShared | a shared tesselator used for items of several classes (2D primitives, particles, etc) | |
TTesselatorType | ||
| Type of tesselator used to render an item | ||
ttStatic | Triangulated data of the tesselator rarely or never changes | |
ttDynamic | Triangulated data changes nearly every frame (particle system, etc) | |
DefaultTechToItemMapCapacity = 8; |
hmemAdjust = 0; |
hmemSmooth = 1; |
IndexSize = 2; |
LightKindsEnum = 'Directional\&Point\&Spot'; |
ltDirectional = 0; |
ltPoint = 1; |
ltSpot = 2; |
MapEditModesEnum = 'Adjust' + StringDelimiter + 'Smooth'; |
MaxCursorSize = 64; |
vwIndexedBlending = $8; |
DefaultTechToItemMapCapacity = 8; |
Default capacity of technique => item hash map
hmemAdjust = 0; |
Map edit mode: adjust heights
hmemSmooth = 1; |
Map edit mode: smooth heights
IndexSize = 2; |
Size of data in index buffers
LightKindsEnum = 'Directional\&Point\&Spot'; |
Light source types enumeration string
ltDirectional = 0; |
Light source types
ltPoint = 1; |
ltSpot = 2; |
MapEditModesEnum = 'Adjust' + StringDelimiter + 'Smooth'; |
Map edit modes string enumeration
MaxCursorSize = 64; |
Max size of mapped item edit cursor size
vwIndexedBlending = $8; |
Vertex format
RGBA: Boolean; |
RGBA: Boolean; |
|
Last modified: Jan 6, 2010 |