CAST II Game Engine

   DESCRIPTION       FEATURES       SCREENSHOTS       FORUMS       DOCUMENTATION       DOWNLOADS       CONTACTS   
Units
Class Hierarchy
Classes, Interfaces and Objects
Types
Enumerations
Variables
Constants
Functions and Procedures
Identifiers

Unit Cast2

Description

CAST II Engine main unit

(C) 2006-2007 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
Started Jan 15, 2006
Unit contains basic engine classes

Classes, Interfaces and Objects

NameDescription
Class TBaseCore 
Class TBaseSharedTesselators 
Class TCamera 
Class TCASTRootItem 
Class TColliding 
Class TItemMoveOp 
Class TItemRotateOp 
Class TMirrorCameraCamera class for mirror surfaces
Class TPerfProfile 
Class TProcessing 

Functions and Procedures

Overview

procedure AddErrorProperty(Properties: Props.TProperties; const Msg: string);
procedure AddQuaternionProperty(Properties: Props.TProperties; const Name: string; const Quat: TQuaternion);
procedure AddVector3sProperty(Properties: Props.TProperties; const Name: string; const Vec: TVector3s);
procedure AddVector4sProperty(Properties: Props.TProperties; const Name: string; const Vec: TVector4s);
function SetQuaternionProperty(Properties: Props.TProperties; const Name: string; var Res: TQuaternion): Boolean;
function SetVector3sProperty(Properties: Props.TProperties; const Name: string; var Res: TVector3s): Boolean;
function SetVector4sProperty(Properties: Props.TProperties; const Name: string; var Res: TVector4s): Boolean;

Description

procedure AddErrorProperty(Properties: Props.TProperties; const Msg: string);

Adds a string property named "Error" with the value contained in Msg

procedure AddQuaternionProperty(Properties: Props.TProperties; const Name: string; const Quat: TQuaternion);

Adds a quaternion and each its component as properties

procedure AddVector3sProperty(Properties: Props.TProperties; const Name: string; const Vec: TVector3s);

Adds a 3-component vector and each its component as properties

procedure AddVector4sProperty(Properties: Props.TProperties; const Name: string; const Vec: TVector4s);

Adds a 4-component vector and each its component as properties

function SetQuaternionProperty(Properties: Props.TProperties; const Name: string; var Res: TQuaternion): Boolean;

Reads a quaternion from properties. If its no equivalent to the one contained in Res assigns it to Res and returns True.

function SetVector3sProperty(Properties: Props.TProperties; const Name: string; var Res: TVector3s): Boolean;

Reads a 3-component vector from properties. If its no equivalent to the one contained in Res assigns it to Res and returns True.

function SetVector4sProperty(Properties: Props.TProperties; const Name: string; var Res: TVector4s): Boolean;

Reads a 4-component vector from properties. If its no equivalent to the one contained in Res assigns it to Res and returns True.

Types

Overview

TBuffersPerfProfile = record TesselationsPerformed, BytesWritten, BufferResetsCount, BufferSize: array[Boolean] of Integer; TesselationsBypassed, BytesBypassed: Integer; end;
TClearSettings = record ClearFlags: TClearFlagsSet; ClearColor: BaseTypes.TColor; ClearStencil: Longword; ClearZ: Single; end;
TClipPlanes = array[0..MaxClipPlanes-1] of PPlane;
TItemCollection = record TraverseMask: TTraverseMask; TotalItems: Integer; Items: array of BaseClasses.TItem; end;
TPassGroup = 0..PassGroupsCount-1;
TPassGroupSet = set of TPassGroup;
TTesselationBufferSet = set of TTesselationBuffer;
TTraverseCallback = function(Item: BaseClasses.TItem): TTraverseResult;
TTraverseMask = BaseTypes.TSet32;

Description

TBuffersPerfProfile = record TesselationsPerformed, BytesWritten, BufferResetsCount, BufferSize: array[Boolean] of Integer; TesselationsBypassed, BytesBypassed: Integer; end;

Vertex/index buffers performace profile

TClearSettings = record ClearFlags: TClearFlagsSet; ClearColor: BaseTypes.TColor; ClearStencil: Longword; ClearZ: Single; end;

Specifies clear settings. ClearFlags - what to clear ClearColor - clear color ClearStencil - a stencil value to clear with ClearZ - a Z value to clear with

TClipPlanes = array[0..MaxClipPlanes-1] of PPlane;

User-defined clipping planes

TItemCollection = record TraverseMask: TTraverseMask; TotalItems: Integer; Items: array of BaseClasses.TItem; end;

Collection of items

TPassGroup = 0..PassGroupsCount-1;

Pass groups range

TPassGroupSet = set of TPassGroup;

Pass groups set. Groups used to perform some operations (lighting, render) for one set of passes and not to perform for other set of passes

TTesselationBufferSet = set of TTesselationBuffer;

Set of tesselation buffers

TTraverseCallback = function(Item: BaseClasses.TItem): TTraverseResult;

Callback function used to traverse through items hierarchy

TTraverseMask = BaseTypes.TSet32;

Traverse mask

Enumerations

TFrustumCheckResult
 fcOutsideAn item is completely outside of the frustum
 fcInsideAn item is completely inside the frustum
 fcPartiallyAn item is partially inside the frustum
TFrustumPlane
Frustum planes
 fpLeft 
 fpRight 
 fpTop 
 fpBottom 
 fpNear 
 fpFar 
TTesselationBuffer
Tesselation buffers enumeration
 tbVertexVertex buffer
 tbIndexIndex buffer
TTraverseResult
Traverse callback results
 trContinueContinue traversal
 trSkipSkip traversal for childs of the current item
 trStopStop traversal

Constants

Overview

EngineVersionMajor = '0';
EngineVersionMinor = '95';
gmAll = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
gmDefault = [0, 1, 2, 3, 4, 5, 6, 7];
MaxClipPlanes = 6;
MaxTextureCoordSets = 8;
PassGroupsCount = 16;
PassGroupsEnum = 'Group 01\&Group 02\&Group 03\&Group 04\&Group 05\&Group 06\&Group 07\&Group 08\&' + 'Group 09\&Group 10\&Group 11\&Group 12\&Group 13\&Group 14\&Group 15\&Group 16';
PassOrdersEnum = 'Preprocess\&Background\&Farest\&Normal\&Sorted\&Nearest\&Foreground\&PostProcess';
poBackground = 1;
poFarest = 2;
poForeground = 6;
poNearest = 5;
poNormal = 3;
poPostProcess = 7;
poPreprocess = 0;
poSorted = 4;
SortedPassOrder = poSorted;
VolumeKindsEnum = 'OOBB\&Sphere';

Description

EngineVersionMajor = '0';

 

EngineVersionMinor = '95';

 

gmAll = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];

Set of all pass groups

gmDefault = [0, 1, 2, 3, 4, 5, 6, 7];

Default set of pass groups

MaxClipPlanes = 6;

Maximum of user-defined clipping planes currently supported by the engine

MaxTextureCoordSets = 8;

Maximum of texture coordinates sets

PassGroupsCount = 16;

Number of pass groups currently supported by the engine

PassGroupsEnum = 'Group 01\&Group 02\&Group 03\&Group 04\&Group 05\&Group 06\&Group 07\&Group 08\&' + 'Group 09\&Group 10\&Group 11\&Group 12\&Group 13\&Group 14\&Group 15\&Group 16';

Pass groups enumeration string

PassOrdersEnum = 'Preprocess\&Background\&Farest\&Normal\&Sorted\&Nearest\&Foreground\&PostProcess';

Pass ordering enumeration string

poBackground = 1;

This order used for passes that should be at background

poFarest = 2;

This order used for passes that should be farest

poForeground = 6;

This order used for passes that should be at foreground

poNearest = 5;

This order used for passes that should be neartest

poNormal = 3;

This order used for usual passes

poPostProcess = 7;

This order used for postprocess passes

poPreprocess = 0;

This order used for preprocess passes

poSorted = 4;

This order used for passes that should render corresponding items in a particular order (usually transparent items)

SortedPassOrder = poSorted;

Order corresponding to passes with sorted items

VolumeKindsEnum = 'OOBB\&Sphere';

Bounding volume kinds enumeration string

Last modified: 4 Jul, 2008
Copyright (C) 2006-2008, casteng.com