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

Class TMap

Unit

C2Maps

Declaration

type TMap = class(TItem)

Description

Base class for height maps, tile maps, etc

Hierarchy

TItem > TBaseItem

Fields

 NameDescription
ProtectedFCellHeightScale 
ProtectedFCellWidthScale 
ProtectedFDepthScale 
ProtectedFElementSize 
ProtectedFHeight 
ProtectedFMaxHeight 
ProtectedFWidth 

Methods

Overview

Publicconstructor Create(AManager: TItemsManager); override;
Publicprocedure AddProperties(const Result: Props.TProperties); override;
Publicprocedure AddRectHeights(const ARect: TRect; ABuf: Pointer; Scale: Single); virtual;
Protectedprocedure CalcCoeffs(xo, zo: Single; out k11, k12, k21, k22: Single);
Protectedfunction GetCellHeight(XI, ZI: Integer): Single;
Publicfunction GetCellNormal(XI,ZI :Integer): TVector3s; virtual;
Protectedfunction GetData: Pointer; virtual; abstract;
Publicfunction GetHeight(X, Z: Single): Single; virtual;
Publicfunction GetNormal(X,Z: Single): TVector3s; virtual;
Protectedfunction GetRawHeight(XI, ZI: Integer): Integer; virtual; abstract;
Publicclass function IsAbstract: Boolean; override;
Publicfunction IsReady: Boolean; virtual;
Publicprocedure ObtainCell(X, Z: Single; out CellX, CellZ: Integer);
Publicprocedure ObtainRectHeights(const ARect: TRect; ABuf: Pointer); virtual;
Protectedprocedure SetCellHeightScale(const Value: Single); virtual;
Protectedprocedure SetCellWidthScale(const Value: Single); virtual;
Publicprocedure SetDimensions(AWidth, AHeight: Integer); virtual;
Protectedprocedure SetHeightScale(const Value: Single); virtual;
Publicprocedure SetProperties(Properties: Props.TProperties); override;
Protectedprocedure SetRawHeight(XI, ZI: Integer; const Value: Integer); virtual; abstract;
Publicprocedure SwapRectHeights(const ARect: TRect; ABuf: Pointer); virtual;
Publicfunction TraceRay(const Origin, Dir: TVector3s; out Point: TVector3s): Boolean; virtual;

Description

Publicconstructor Create(AManager: TItemsManager); override;

 

Publicprocedure AddProperties(const Result: Props.TProperties); override;

 

Publicprocedure AddRectHeights(const ARect: TRect; ABuf: Pointer; Scale: Single); virtual;

Adds a rectangular area of the map and the contents of the specified buffer contaning values of type Single

Protectedprocedure CalcCoeffs(xo, zo: Single; out k11, k12, k21, k22: Single);

Calculate coefficients for interpolation between values given at a rectangle corners

Protectedfunction GetCellHeight(XI, ZI: Integer): Single;

 

Publicfunction GetCellNormal(XI,ZI :Integer): TVector3s; virtual;

Returns a normal at the given cell

Protectedfunction GetData: Pointer; virtual; abstract;

 

Publicfunction GetHeight(X, Z: Single): Single; virtual;

Returns an interpolated height at the given point

Publicfunction GetNormal(X,Z: Single): TVector3s; virtual;

Returns an interpolated normal at the given point

Protectedfunction GetRawHeight(XI, ZI: Integer): Integer; virtual; abstract;

 

Publicclass function IsAbstract: Boolean; override;

 

Publicfunction IsReady: Boolean; virtual;

Returns True if the map object is ready to handle requests

Publicprocedure ObtainCell(X, Z: Single; out CellX, CellZ: Integer);

Returns indices of map cell containing the given point

Publicprocedure ObtainRectHeights(const ARect: TRect; ABuf: Pointer); virtual;

Copies a rectangular area of the map to a caller-allocated buffer

Protectedprocedure SetCellHeightScale(const Value: Single); virtual;

 

Protectedprocedure SetCellWidthScale(const Value: Single); virtual;

 

Publicprocedure SetDimensions(AWidth, AHeight: Integer); virtual;

 

Protectedprocedure SetHeightScale(const Value: Single); virtual;

 

Publicprocedure SetProperties(Properties: Props.TProperties); override;

 

Protectedprocedure SetRawHeight(XI, ZI: Integer; const Value: Integer); virtual; abstract;

 

Publicprocedure SwapRectHeights(const ARect: TRect; ABuf: Pointer); virtual;

Swaps a rectangular area of the map with the contents of the specified buffer

Publicfunction TraceRay(const Origin, Dir: TVector3s; out Point: TVector3s): Boolean; virtual;

Returns True if the specified in map (model) space ray intersects with the map. Also returns the point of intersection.

Properties

Overview

Publicproperty CellHeightScale: Single;
Publicproperty CellWidthScale: Single;
Publicproperty Data: Pointer;
Publicproperty DepthScale: Single;
Publicproperty ElementSize: Integer;
Publicproperty Height: Integer;
Publicproperty MaxHeight: Integer;
Publicproperty RawHeights[XI, ZI: Integer]: Integer;
Publicproperty Width: Integer;

Description

Publicproperty CellHeightScale: Single;

Map cell height

Publicproperty CellWidthScale: Single;

Map cell width

Publicproperty Data: Pointer;

Raw data

Publicproperty DepthScale: Single;

 

Publicproperty ElementSize: Integer;

Size of single element of raw data

Publicproperty Height: Integer;

Map height

Publicproperty MaxHeight: Integer;

 

Publicproperty RawHeights[XI, ZI: Integer]: Integer;

Raw heights

Publicproperty Width: Integer;

Map width

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