Class TPhastGrid

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TPhastGrid = class(TCustomModelGrid)

Description

TPhastGrid defines the grid used with PHAST.

Hierarchy

Overview

Fields

Private FLayerElevations: TOneDRealArray;

Methods

Private procedure ReadLayerElevations(Reader: TReader);
Private procedure WriteLayerElevations(Writer: TWriter);
Private procedure DrawOrdinaryFrontLayers(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2);
Private procedure DrawOrdinaryFrontColumns(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2);
Private procedure DrawOrdinarySideLayers(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2);
Private procedure DrawOrdinarySideRows(const ZoomBox: TQRbwZoomBox2; const BitMap: TBitmap32);
Protected procedure DefineProperties(Filer: TFiler); override;
Protected procedure DrawFront(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2); override;
Protected procedure DrawSide(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2); override;
Protected procedure GetCellCornerElevations(const EvalAt: TEvaluatedAt; out Elevations: TThreeDRealArray); override;
Protected function GetCellElevation(const Column, Row, Layer: integer): real; override;
Protected function GetCellThickness(const Column, Row, Layer: integer): real; override;
Protected function GetLayerElevation(const Layer: integer): real;
Protected procedure SetCellElevation(const Column, Row, Layer: integer; const Value: real); override;
Protected function GetLayerThickness(const Layer: integer): real;
Protected procedure SetCellThickness(const Column, Row, Layer: integer; const Value: real); override;
Protected procedure SetLayerCount(const Value: integer); override;
Protected procedure SetLayerDirection(const Value: TLayerDirection); override;
Protected procedure SetLayerElevation(const Layer: integer; const Value: real);
Protected procedure SetLayerElevations(const Value: TOneDRealArray);
Protected procedure SetLayerThickness(const Layer: integer; const Value: real);
Protected function GetTwoDCellElevations(const Col, Row: integer): TOneDRealArray; override;
Public procedure AddLayer(const Value: real);
Public procedure Assign(Source: TPersistent); override;
Public constructor Create(Model: TBaseModel);
Public procedure DeleteLayer(const ALayer: integer);
Public function FrontContainingCell(APoint: TPoint2D; const EvaluatedAt: TEvaluatedAt; const BelowCol: integer = -1; const AboveCol: integer = -1; const BelowLayer: integer = -1; const AboveLayer: integer = -1): T2DFrontCell;
Public function GetCell(const Location: TPoint2D; const ViewDirection: TViewDirection; const EvaluatedAt: TEvaluatedAt): T3DCell;
Public function GetContainingLayer(ACol, ARow: integer; const AZPosition: real): integer; override;
Public function LayerCenter(const Layer: integer): real;
Public function NearestLayerCenter(const APosition: real; First: integer = -1; Last: integer = -1): integer;
Public function NearestLayerPosition(const APosition: real; const First: integer = -1; const Last: integer = -1): integer;
Public function SideContainingCell(APoint: TPoint2D; const EvaluatedAt: TEvaluatedAt; const BelowRow: integer = -1; const AboveRow: integer = -1; const BelowLayer: integer = -1; const AboveLayer: integer = -1): T2DSideCell;
Public procedure UpdateLayerElevations;
Public function HighestElevation: real; override;
Public function LowestElevation: real; override;
Public procedure BlockExtents(ViewDirection: TViewDirection; EvaluatedAt: TEvaluatedAt; Index: integer; out LowerBound, UpperBound: double);
Public procedure DrawBlockExtents(ViewDirection: TViewDirection; EvaluatedAt: TEvaluatedAt; Index: integer; out LowerBound, UpperBound: double);

Properties

Public property LayerElevation[constLayer:integer]: real read GetLayerElevation write SetLayerElevation;
Public property LayerElevations: TOneDRealArray read FLayerElevations write SetLayerElevations;
Public property LayerThickness[constLayer:integer]: real read GetLayerThickness write SetLayerThickness;

Description

Fields

Private FLayerElevations: TOneDRealArray;

FLayerElevations: TOneDRealArray; See LayerElevations.

Methods

Private procedure ReadLayerElevations(Reader: TReader);

ReadLayerElevations defines how to read layer elevations from a stream. See LayerElevations and DefineProperties.

Private procedure WriteLayerElevations(Writer: TWriter);

WriteLayerElevations defines how to write layer elevations to a stream. See LayerElevations and DefineProperties.

Private procedure DrawOrdinaryFrontLayers(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2);
 
Private procedure DrawOrdinaryFrontColumns(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2);
 
Private procedure DrawOrdinarySideLayers(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2);
 
Private procedure DrawOrdinarySideRows(const ZoomBox: TQRbwZoomBox2; const BitMap: TBitmap32);
 
Protected procedure DefineProperties(Filer: TFiler); override;

DefineProperties is used to define how layer elevations should be saved and read from a file. See ReadLayerElevations and WriteLayerElevations.

Protected procedure DrawFront(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2); override;

DrawFront defines how to draw the front view of the grid.

Protected procedure DrawSide(const BitMap: TBitmap32; const ZoomBox: TQRbwZoomBox2); override;

DrawSide defines how to draw the side view of the grid.

Protected procedure GetCellCornerElevations(const EvalAt: TEvaluatedAt; out Elevations: TThreeDRealArray); override;

GetCellCornerElevations returns the elevations of the corners of cells in the grid. See GetCellCornerElevations.

Protected function GetCellElevation(const Column, Row, Layer: integer): real; override;

GetCellElevation gets the elevation of a cell boundary.

Protected function GetCellThickness(const Column, Row, Layer: integer): real; override;

GetCellThickness gets the vertical thickness of a cells.

Protected function GetLayerElevation(const Layer: integer): real;

GetLayerElevation gets the elevation of a layer boundary.

Protected procedure SetCellElevation(const Column, Row, Layer: integer; const Value: real); override;

SetCellElevation sets the elevation of a cell boundary.

Protected function GetLayerThickness(const Layer: integer): real;

GetLayerThickness gets the thickness of a layer.

Protected procedure SetCellThickness(const Column, Row, Layer: integer; const Value: real); override;

SetCellThickness sets the thickness of a cell.

Protected procedure SetLayerCount(const Value: integer); override;

SetLayerCount sets the number of layers in the grid. There are LayerCount + 1 layer boundaries in the grid. See LayerCount.

Protected procedure SetLayerDirection(const Value: TLayerDirection); override;

SetLayerDirection specifies whether the layers are numbered from top to bottom or from bottom to top.

Protected procedure SetLayerElevation(const Layer: integer; const Value: real);

SetLayerElevation sets the elevation of a layer.

Protected procedure SetLayerElevations(const Value: TOneDRealArray);

SetLayerElevations sets all the elevations in the grid.

Protected procedure SetLayerThickness(const Layer: integer; const Value: real);

SetLayerThickness sets the thickness of a layer.

Protected function GetTwoDCellElevations(const Col, Row: integer): TOneDRealArray; override;
 
Public procedure AddLayer(const Value: real);

Add a new layer boundary with an elevation of Value

Public procedure Assign(Source: TPersistent); override;

If Source is a TPhastGrid, Assign copies the layer elevations from Source before calling inherited.

Public constructor Create(Model: TBaseModel);

Create creates an instance of TPhastGrid.

Public procedure DeleteLayer(const ALayer: integer);

DeleteLayer deletes the layer boundary with the number ALayer.

Public function FrontContainingCell(APoint: TPoint2D; const EvaluatedAt: TEvaluatedAt; const BelowCol: integer = -1; const AboveCol: integer = -1; const BelowLayer: integer = -1; const AboveLayer: integer = -1): T2DFrontCell;

FrontContainingCell returns the cell (viewed from the front) containing APoint. Specifying BelowCol, AboveCol, BelowLayer and/or AboveLayer can speed things up.

Public function GetCell(const Location: TPoint2D; const ViewDirection: TViewDirection; const EvaluatedAt: TEvaluatedAt): T3DCell;

GetCell gets a T3DCell containing Location.

Public function GetContainingLayer(ACol, ARow: integer; const AZPosition: real): integer; override;

GetContainingLayer gets the layer (not layer boundary) that contains APosition. If APosition < LayerElevations[0] then result := -1. If APosition > LayerElevations[LayerCount] then result := LayerCount-1.

Public function LayerCenter(const Layer: integer): real;

LayerCenter returns the position of the center of a layer

Public function NearestLayerCenter(const APosition: real; First: integer = -1; Last: integer = -1): integer;

NearestLayerCenter returns the index of the layer center closest to APosition. If the index is known to be within a certain range, the function can be speeded up by specifying First and Last.

Public function NearestLayerPosition(const APosition: real; const First: integer = -1; const Last: integer = -1): integer;

Find the layer boundary closest to APosition. First and Last can be specified to increase efficiency.

Public function SideContainingCell(APoint: TPoint2D; const EvaluatedAt: TEvaluatedAt; const BelowRow: integer = -1; const AboveRow: integer = -1; const BelowLayer: integer = -1; const AboveLayer: integer = -1): T2DSideCell;

SideContainingCell returns the cell (viewed from the side) containing APoint. Specifying BelowRow, AboveRow, BelowLayer and/or AboveLayer can speed things up.

Public procedure UpdateLayerElevations;

After editing LayerElevations, call UpdateLayerElevations to update the number of layers and to make sure the layer are sorted in ascending order.

Public function HighestElevation: real; override;

update this.

Public function LowestElevation: real; override;
 
Public procedure BlockExtents(ViewDirection: TViewDirection; EvaluatedAt: TEvaluatedAt; Index: integer; out LowerBound, UpperBound: double);
 
Public procedure DrawBlockExtents(ViewDirection: TViewDirection; EvaluatedAt: TEvaluatedAt; Index: integer; out LowerBound, UpperBound: double);
 

Properties

Public property LayerElevation[constLayer:integer]: real read GetLayerElevation write SetLayerElevation;

read or write the elevation of the layer boundary with the number ALayer.

Public property LayerElevations: TOneDRealArray read FLayerElevations write SetLayerElevations;

LayerElevations is the array of boundaries between adjacent layers. After editing LayerElevations, call UpdateLayerElevations to update the number of layers and to make sure the layers are sorted in ascending order.

Public property LayerThickness[constLayer:integer]: real read GetLayerThickness write SetLayerThickness;

read or write the thickness of a layer.


Generated by PasDoc 0.12.1 on 2013-05-13 15:41:55