Class TScreenObject

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TScreenObject = class(TObserver)

Description

TScreenObject is the internal representation of an object on the screen.

It has a series of 0 or more points that defines its location in two dimensions. It may also have zero, one, or two associated elevation formulas that define its position in the third dimension. It can be used to set the values of zero or more data sets. For each such data set, it has a formula that describes how it sets the formula for them. The ViewDirection of the TScreenObject determine whether the 2D location of the object is with respect to the top, front, or side view of the model.

Hierarchy

Overview

Fields

Private FBottomElevation: real;
Private FBottomElevSubscription: TObserver;
Private FBoundaryDataSetFormulas: TStringList;
Private FBoundaryDataSets: TList;
Private FBoundaryDataSetSubscriptions: TObjectList;
Private FCanvasCoordinates: TPointArray;
Private FCapacity: integer;
Private FCellSize: real;
Private FCellSizeUsed: boolean;
Private FColorLine: boolean;
Private FCount: integer;
Private FDataSetFunctions: TStringList;
Private FDataSets: TList;
Private FDataSetSubscriptions: TObjectList;
Private FDeleted: boolean;
Private FElevationCount: TElevationCount;
Private FElevationFunction: string;
Private FElevSubscription: TObserver;
Private FEvaluatedAt: TEvaluatedAt;
Private FFillColor: TColor;
Private FFillScreenObject: boolean;
Private FFrontHighPoints: T2DRealPointArray;
Private FFrontLowPoints: T2DRealPointArray;
Private FFrontPointsUpToDate: boolean;
Private FHigherElevationFunction: string;
Private FHigherElevations: T2DSparseRealArray;
Private FHigherElevationsNeedsUpdating: boolean;
Private FLineColor: TColor;
Private FLowerElevationFunction: string;
Private FLowerElevations: T2DSparseRealArray;
Private FLowerElevationsNeedsUpdating: boolean;
Private FMaxX: real;
Private FMaxY: real;
Private FMinX: real;
Private FMinY: real;
Private FNeedToResetSelectedVertexCount: boolean;
Private FNeedToUpdateLine: boolean;
Private FPoints: TRealPointArray;
Private FRecalculateArea: boolean;
Private FRecalculateBox: boolean;
Private FRecalculateCoordinates: boolean;
Private FRecalculateLength: boolean;
Private FScreenObjectArea: real;
Private FScreenObjectLength: real;
Private FSegments: TCellElementSegmentList;
Private FSelected: boolean;
Private FSelectedVertexCount: integer;
Private FSelectedVertices: array of boolean;
Private FSelectLine: TLine;
Private FSetPropertiesByInterpolation: boolean;
Private FSetPropertiesOfEnclosedCells: boolean;
Private FSetPropertiesOfIntersectedCells: boolean;
Private FSideHighPoints: T2DRealPointArray;
Private FSideLowPoints: T2DRealPointArray;
Private FSidePointsUpToDate: boolean;
Private FSubPolygon1: TSubPolygon;
Private FSubPolygon2: TSubPolygon;
Private FTopElevation: real;
Private FTopElevSubscription: TObserver;
Private FTopHighPoints: T2DRealPointArray;
Private FTopLowPoints: T2DRealPointArray;
Private FTopPointsUpToDate: boolean;
Private FViewDirection: TViewDirection;
Private FVisible: boolean;
Protected FIsUpdating: boolean;

Methods

Private procedure AddPointFromColumn(const ColIndex: integer; const Grid: TPhastGrid; const PreviousPoint, APoint: TEdgePoint; var TempPoints1: TEdgePointArray; var Count: integer; const Position: TEdgePosition);
Private procedure AddPointFromLayer(const LayerIndex: integer; const Grid: TPhastGrid; const PreviousPoint, APoint: TEdgePoint; var TempPoints1: TEdgePointArray; var Count: integer; const Position: TEdgePosition);
Private procedure AddPointFromRow(const RowIndex: integer; const Grid: TPhastGrid; const PreviousPoint, APoint: TEdgePoint; var TempPoints1: TEdgePointArray; var Count: integer; const Position: TEdgePosition);
Private procedure AssignElevations(Formula: string; const SparseArray: T2DSparseRealArray);
Private procedure AssignElevationsFromFront(const Compiler: TRbwParser; const SparseArray: T2DSparseRealArray);
Private procedure AssignElevationsFromSide(const Compiler: TRbwParser; const SparseArray: T2DSparseRealArray);
Private procedure AssignElevationsFromTop(const Compiler: TRbwParser; const SparseArray: T2DSparseRealArray);
Private procedure AssignHigherElevations;
Private procedure AssignLowerElevations;
Private procedure CalculateCanvasCoordinates;
Private procedure CreateSubPolygons;
Private procedure DestroySubPolygons;
Private procedure Draw0Elev(const Canvas: TCanvas; const Direction: TViewDirection; const DrawAsSelected: Boolean = False);
Private procedure Draw1Elev(const Canvas: TCanvas; const Direction: TViewDirection; const DrawAsSelected: Boolean = False);
Private procedure Draw2Elev(const Canvas: TCanvas; const Direction: TViewDirection; const DrawAsSelected: Boolean = False);
Private procedure Draw3D_OneElevation;
Private procedure Draw3D_TwoElevations;
Private procedure EvaluateSubPolygon(const ASubPolygon: TSubPolygon; const X, Y: real; var IsInside: boolean);
Private function GetACol(const Grid: TPhastGrid; const X: double): integer;
Private function GetALayer(const Grid: TPhastGrid; const Z: double): integer;
Private function GetARow(const Grid: TPhastGrid; const Y: double): integer;
Private function GetBoundaryDataSetFormulas(const Index: integer): string;
Private function GetBoundaryDataSets(const Index: integer): TDataArray;
Private function GetCanvasCoordinates: TPointArray;
Private function GetColumn(const Grid: TPhastGrid; const X: real): integer;
Private procedure GetColumns(const Grid: TPhastGrid; TempMinX, TempMaxX: real; out FirstCol, LastCol: integer);
Private procedure GetCoordinates(const Direction: TViewDirection; var Points: T2DRealPointArray; const WhichElevation: TWhichElevation);
Private function GetCount: integer;
Private function GetDataSetCapacity: integer;
Private function GetDataSetCount: integer;
Private function GetDataSetFormulas(const Index: integer): string;
Private function GetDataSets(const Index: integer): TDataArray;
Private function GetEdgePoints(const Index: integer): TEdgePoint;
Private function GetFillColor: TColor;
Private procedure GetGridCellOrElementLimits(const Col, Row, Layer: integer; out XMin, XMax, YMin, YMax: double);
Private function GetHigherElevations: T2DSparseRealArray;
Private function GetLayer(const Grid: TPhastGrid; const Z: real): integer;
Private procedure GetLayers(const Grid: TPhastGrid; TempMinZ, TempMaxZ: real; out FirstLayer, LastLayer: integer);
Private procedure GetLimits(out Limit1, Limit2: integer);
Private function GetLineColor: TColor;
Private function GetLowerElevations: T2DSparseRealArray;
Private function GetMaxX: real;
Private function GetMaxY: real;
Private function GetMinX: real;
Private function GetMinY: real;
Private function GetPoints(const Index: integer): T2DRealPoint;
Private function GetRow(const Grid: TPhastGrid; const Y: real): integer;
Private procedure GetRows(const Grid: TPhastGrid; TempMinY, TempMaxY: real; out FirstRow, LastRow: integer);
Private function GetSelectedVertexCount: integer;
Private function GetSelectedVertices(const index: integer): boolean;
Private function GetSelectLine: TLine;
Private function GLPoint(const Index1, Index2: integer; const SparseArray: T2DSparseRealArray): T3DRealPoint;
Private procedure Grow;
Private procedure GrowBy(Amount: integer);
Private function InsideBox(const X, Y: real): boolean;
Private function MinDistPointLine(P, A, B: T2DRealPoint; out Closest: T2DRealPoint; const Anisotropy: real): real;
Private procedure OtherIndexOneElev(const LayerOrRow, RowOrColumn: integer; out First, Last: integer);
Private procedure OtherIndexTwoElev(const LayerOrRow, RowOrColumn: integer; out First, Last: integer);
Private function PointToPointDist(const A, B: T2DRealPoint; const Anisotropy: real): real;
Private procedure ResetBottomElevationFormula(const Compiler: TRbwParser; const ErrorMessage: string);
Private procedure ResetElevationFormula(const Compiler: TRbwParser; const ErrorMessage: string);
Private procedure ResetSelectedVertexCount;
Private procedure ResetTopElevationFormula(const Compiler: TRbwParser; const ErrorMessage: string);
Private procedure SetBoundaryDataSetFormulas(const Index: integer; const Value: string);
Private procedure SetBoundaryDataSets(const Index: integer; const DataSet: TDataArray);
Private procedure SetCapacity(Value: integer);
Private procedure SetCellSize(const Value: real);
Private procedure SetCellSizeUsed(const Value: boolean);
Private procedure SetColorLine(const Value: boolean);
Private procedure SetCount(const Value: integer);
Private procedure SetDataSetCapacity(const Value: integer);
Private procedure SetDataSetFormulas(const Index: integer; const Value: string);
Private procedure SetDataSets(const Index: integer; const DataSet: TDataArray);
Private procedure SetDeleted(const Value: boolean);
Private procedure SetEdgePoints(const Index: integer; const Value: TEdgePoint);
Private procedure SetElevationCount(const Value: TElevationCount);
Private procedure SetEvaluatedAt(const Value: TEvaluatedAt);
Private procedure SetFillColor(const Value: TColor);
Private procedure SetFillScreenObject(const Value: boolean);
Private procedure SetLineColor(const Value: TColor);
Private procedure SetPoints(const Index: integer; const Value: T2DRealPoint);
Private procedure SetSelected(const Value: boolean);
Private procedure SetSelectedVertices(const index: integer; const Value: boolean);
Private procedure SetSetPropertiesByInterpolation(const Value: boolean);
Private procedure SetSetPropertiesOfEnclosedCells(const Value: boolean);
Private procedure SetSetPropertiesOfIntersectedCells(const Value: boolean);
Private procedure SetVisible(const Value: boolean);
Private procedure SortPoints(const Input: TEdgePointArray; out SortedPoints: TEdgePointArray; const APoint, PreviousPoint: TEdgePoint; const MaxLength: integer);
Private procedure UpdateBox;
Private procedure UpdateFrontSegments(const Grid: TPhastGrid; const EvaluatedAt: TEvaluatedAt);
Private procedure UpdateSideSegments(const Grid: TPhastGrid; const EvaluatedAt: TEvaluatedAt);
Private procedure UpdateTopSegments(const Grid: TPhastGrid; const EvaluatedAt: TEvaluatedAt; const PointsRotated: boolean; var RotatedPoints: TEdgePointArray);
Private procedure ValidateIndex(const Index: integer);
Private function ValidCell(const Col, Row, Layer: integer): boolean;
Private function GetSetPropertiesOfEnclosedCells: boolean;
Protected procedure AssignCellValue(const UsedVariables: TStringList; const DataSet: TDataArray; const LayerIndex, RowIndex, ColIndex: integer; const Compiler: TRbwParser; const Annotation: string; const Expression: TExpression; const OtherData: TObject); virtual;
Protected procedure AssignValuesToFrontDataSet(const Grid: TPhastGrid; const DataSet: TDataArray; OtherData: TObject); virtual;
Protected procedure AssignValuesToSideDataSet(const Grid: TPhastGrid; const DataSet: TDataArray; OtherData: TObject); virtual;
Protected procedure AssignValuesToTopDataSet(const Grid: TPhastGrid; const DataSet: TDataArray; OtherData: TObject); virtual;
Protected function BoundaryType: integer; virtual;
Protected function CanAddDataSet(const DataSet: TDataArray): boolean;
Protected function DataSetUsed(const DataSet: TDataArray; var OtherData: TObject): boolean; virtual;
Protected function EncloseAnnotation(const DataSetFormula: string; const OtherData: TObject): string; virtual;
Protected function GetCompiler(const Orientation: TDataSetOrientation): TRbwParser;
Protected procedure GetRotatedPoints(out RotatedPoints: TRealPointArray);
Protected procedure InitializeExpression(out Compiler: TRbwParser; out DataSetFunction: string; out Expression: TExpression; const DataSet: TDataArray; const OtherData: TObject); virtual;
Protected procedure InitializeVariables(const UsedVariables: TStringList; const DataSet: TDataArray; const Expression: TExpression; const Compiler: TRbwParser); virtual;
Protected function IntersectAnnotation(const DataSetFormula: string; const OtherData: TObject): string; virtual;
Protected function Intersection(const Point1, Point2: T2DRealPoint; out IntersectPoint: T2DRealPoint): TIntersectResult;
Protected function IsBoundaryTimeDataSetUsed(const DataSet: TDataArray; out OtherData: TObject): boolean; virtual;
Protected procedure OtherIndex(const LayerOrRow, RowOrColumn: integer; out First, Last: integer; const DataSet: TDataArray); virtual;
Protected procedure RotatePoints(const Grid: TPhastGrid; out RotatedPoints: TEdgePointArray; out TempMinX, TempMinY, TempMaxX, TempMaxY: double);
Protected procedure SetElevationFunction(const Value: string); virtual;
Protected procedure SetGeometryUpToDate; virtual;
Protected procedure SetHigherElevationFunction(const Value: string); virtual;
Protected procedure SetLowerElevationFunction(const Value: string); virtual;
Protected procedure SetName(const Value: TComponentName); override;
Protected procedure SetUpToDate(const Value: boolean); override;
Protected procedure SetViewDirection(const Value: TViewDirection); virtual;
Protected procedure UpdateVariables(const UsedVariables: TStringList; const DataSet: TDataArray; Layer, Row, Column: integer; const Compiler: TRbwParser);
Public function AddBoundaryDataSet(const DataSet: TDataArray): integer;
Public function AddDataSet(const DataSet: TDataArray): Integer; virtual;
Public procedure AddPoint(const APoint: T2DRealPoint);
Public procedure Assign(Source: TPersistent); override;
Public procedure AssignValuesToDataSet(const Grid: TPhastGrid; const DataSet: TDataArray); virtual;
Public function BoundaryDataSetCount: integer;
Public procedure Changed(Sender: TObject);
Public procedure ClearBoundaryDataSets; virtual;
Public procedure ClearDataSets; virtual;
Public procedure ClearPoints;
Public procedure ClearSelectedVertices;
Public function Closed: boolean;
Public procedure CopyPoints(var Destination: TRealPointArray; const Position, Start: integer; var Count: integer);
Public constructor Create(AnOwner: TComponent); override;
Public constructor CreateWithViewDirection(const AViewDirection: TViewDirection; out UndoCreateScreenObject: TCustomUndo; const UndoAble: boolean = True); virtual;
Public procedure DeleteBoundaryDataSet(const Index: Integer);
Public procedure DeleteDataSet(const Index: Integer); virtual;
Public procedure DeletePoint(const Index: Integer);
Public destructor Destroy; override;
Public function DistanceToScreenObject(const Location: T2DRealPoint; out ClosestLocation: T2DRealPoint; const Anisotropy: real): real;
Public procedure Draw(const Canvas: TCanvas; const Direction: TViewDirection; const DrawAsSelected: Boolean = False); virtual;
Public procedure Draw3D;
Public procedure DrawSelected(const Canvas: TCanvas; const Direction: TViewDirection);
Public function IndexOfBoundaryDataSet(const DataSet: TDataArray): integer;
Public function IndexOfDataSet(const DataSet: TDataArray): integer;
Public function IndexOfPoint(const APoint: T2DRealPoint): integer;
Public procedure InsertBoundaryDataSet(const Index: Integer; const DataSet: TDataArray); virtual;
Public procedure InsertDataSet(const Index: Integer; const DataSet: TDataArray); virtual;
Public procedure InsertPoint(const Index: Integer; const APoint: T2DRealPoint);
Public procedure Invalidate; virtual;
Public procedure InvalidateCoordinates;
Public procedure InvalidateFront3DCoordinates;
Public procedure InvalidateSide3DCoordinates;
Public procedure InvalidateTop3DCoordinates;
Public function IsPointInside(const X, Y: real): boolean; overload;
Public function IsPointInside(const APoint: T2DRealPoint): boolean; overload;
Public function ObjectIntersectArea(const Col, Row, Layer: integer): real;
Public function ObjectIntersectLength(const Col, Row, Layer: integer): real;
Public function RemoveDataSet(const DataSet: TDataArray): Integer; virtual;
Public procedure ResetBoundaryDataSetSubscriptions;
Public procedure ResetDataSetSubscriptions;
Public procedure ResetSubscriptions; virtual;
Public function ScreenObjectArea: real;
Public function ScreenObjectLength: real;
Public function Select(const X, Y: integer): boolean;
Public function SelectEdge(const X, Y: integer): integer;
Public procedure UpdateScreenObjectWithName(const AName: string; const AViewDirection: TViewDirection; out UndoCreateScreenObject: TCustomUndo; const UndoAble: boolean = True); reintroduce; virtual;
Public class function ValidName(const OriginalName: string): string;

Properties

Protected property EdgePoints[const Index: integer]: TEdgePoint read GetEdgePoints write SetEdgePoints;
Protected property HigherElevations: T2DSparseRealArray read GetHigherElevations;
Protected property LowerElevations: T2DSparseRealArray read GetLowerElevations;
Public property BoundaryDataSets[const Index: integer]: TDataArray read GetBoundaryDataSets write SetBoundaryDataSets;
Public property BoundaryDataSetFormulas[const Index: integer]: string read GetBoundaryDataSetFormulas write SetBoundaryDataSetFormulas;
Public property CanvasCoordinates: TPointArray read GetCanvasCoordinates;
Public property Capacity: integer read FCapacity write SetCapacity;
Public property Count: integer read GetCount write SetCount;
Public property DataSetCapacity: integer read GetDataSetCapacity write SetDataSetCapacity;
Public property DataSetCount: integer read GetDataSetCount;
Public property DataSets[const Index: integer]: TDataArray read GetDataSets write SetDataSets;
Public property DataSetFormulas[const Index: integer]: string read GetDataSetFormulas write SetDataSetFormulas;
Public property Deleted: boolean read FDeleted write SetDeleted;
Public property MaxX: real read GetMaxX;
Public property MaxY: real read GetMaxY;
Public property MinX: real read GetMinX;
Public property MinY: real read GetMinY;
Public property Points[const Index: integer]: T2DRealPoint read GetPoints write SetPoints;
Public property Segments: TCellElementSegmentList read FSegments;
Public property SelectedVertexCount: integer read GetSelectedVertexCount;
Public property SelectedVertices[const Index: integer]: boolean read GetSelectedVertices write SetSelectedVertices;
Public property SelectLine: TLine read GetSelectLine;
Published property CellSize: real read FCellSize write SetCellSize;
Published property CellSizeUsed: boolean read FCellSizeUsed write SetCellSizeUsed;
Published property ColorLine: boolean read FColorLine write SetColorLine;
Published property ElevationCount: TElevationCount read FElevationCount write SetElevationCount;
Published property ElevationFunction: string read FElevationFunction write SetElevationFunction;
Published property EvaluatedAt: TEvaluatedAt read FEvaluatedAt write SetEvaluatedAt;
Published property FillColor: TColor read GetFillColor write SetFillColor;
Published property FillContour: boolean write SetFillScreenObject stored False;
Published property FillScreenObject: boolean read FFillScreenObject write SetFillScreenObject;
Published property HigherElevationFunction: string read FHigherElevationFunction write SetHigherElevationFunction;
Published property LineColor: TColor read GetLineColor write SetLineColor;
Published property LowerElevationFunction: string read FLowerElevationFunction write SetLowerElevationFunction;
Published property Selected: boolean read FSelected write SetSelected;
Published property SetPropertiesByInterpolation: boolean read FSetPropertiesByInterpolation write SetSetPropertiesByInterpolation;
Published property SetPropertiesOfEnclosedCells: boolean read GetSetPropertiesOfEnclosedCells write SetSetPropertiesOfEnclosedCells;
Published property SetPropertiesOfIntersectedCells: boolean read FSetPropertiesOfIntersectedCells write SetSetPropertiesOfIntersectedCells;
Published property ViewDirection: TViewDirection read FViewDirection write SetViewDirection;
Published property Visible: boolean read FVisible write SetVisible default True;

Description

Fields

Private FBottomElevation: real;

FBottomElevation: real; FBottomElevation is used to temporarily store the lower elevation of the TScreenObject in current cell when the TScreenObject has an upper and a lower elevation.

Private FBottomElevSubscription: TObserver;

FBottomElevSubscription: TObserver; FBottomElevSubscription is a TObserver that responds to changes in any of the data sets referenced in LowerElevationFunction by calling Changed.

Private FBoundaryDataSetFormulas: TStringList;

FBoundaryDataSetFormulas: TStringList; See BoundaryDataSetFormulas.

Private FBoundaryDataSets: TList;

FBoundaryDataSets: TList; See BoundaryDataSets.

Private FBoundaryDataSetSubscriptions: TObjectList;

FBoundaryDataSetSubscriptions: TObjectList; FBoundaryDataSetSubscriptions holds a list of TObservers related to boundary conditions set by this TScreenObject. If this TScreenObject changes, the TObservers in FBoundaryDataSetSubscriptions will ensure that those boundary conditions get updated properly when needed.

Private FCanvasCoordinates: TPointArray;

FCanvasCoordinates: TPointArray; See CanvasCoordinates.

Private FCapacity: integer;

FCapacity: integer; See Capacity.

Private FCellSize: real;

FCellSize: real; See CellSize.

Private FCellSizeUsed: boolean;

FCellSizeUsed: boolean; See CellSizeUsed.

Private FColorLine: boolean;

FColorLine: boolean; See ColorLine.

Private FCount: integer;

FCount: integer; See Count.

Private FDataSetFunctions: TStringList;

FDataSetFunctions: TStringList; See DataSetFormulas.

Private FDataSets: TList;

FDataSets: TList; See DataSets.

Private FDataSetSubscriptions: TObjectList;

FDataSetSubscriptions: TObjectList; FDataSetSubscriptions holds a list of TObservers related to TDataArrays set by this TScreenObject. If this TScreenObject changes, the TObservers in FDataSetSubscriptions will ensure that those TDataArrays get updated properly when needed.

Private FDeleted: boolean;

FDeleted: boolean; See Deleted.

Private FElevationCount: TElevationCount;

FElevationCount: TElevationCount; See ElevationCount and TElevationCount.

Private FElevationFunction: string;

FElevationFunction: string; See ElevationFunction.

Private FElevSubscription: TObserver;

FElevSubscription: TObserver; FElevSubscription is a TObserver that responds to changes in any of the data sets referenced in ElevationFunction by calling Changed.

Private FEvaluatedAt: TEvaluatedAt;

FEvaluatedAt: TEvaluatedAt; See EvaluatedAt and TEvaluatedAt.

Private FFillColor: TColor;

FFillColor: TColor; See FillColor.

Private FFillScreenObject: boolean;

FFillScreenObject: boolean; See FillScreenObject.

Private FFrontHighPoints: T2DRealPointArray;

FFrontHighPoints: T2DRealPointArray; FFrontHighPoints is used to hold points that can be used to draw the TScreenObject on the front view of the model if the ViewDirection when is not vdFront. If the TScreenObject has two elevation formulas, FFrontHighPoints is used to store the higher set of points. If the TScreenObject has one elevation formula, FFrontHighPoints is used to store the points related to that formula. See FFrontLowPoints, FFrontPointsUpToDate and T2DRealPointArray.

Private FFrontLowPoints: T2DRealPointArray;

FFrontLowPoints: T2DRealPointArray; FFrontLowPoints is used to hold points that can be used to draw the TScreenObject on the front view of the model if the ViewDirection when is not vdFront. If the TScreenObject has two elevation formulas, FFrontLowPoints is used to store the lower set of points. See FFrontHighPoints, FFrontPointsUpToDate, and T2DRealPointArray.

Private FFrontPointsUpToDate: boolean;

FFrontPointsUpToDate: boolean; FFrontPointsUpToDate is used to indicate whether FFrontHighPoints and FFrontLowPoints are up-to-date. If they aren't up-to-date, they will be recalculated the next time they are needed.

Private FHigherElevationFunction: string;

FHigherElevationFunction: string; See HigherElevationFunction.

Private FHigherElevations: T2DSparseRealArray;

FHigherElevations: T2DSparseRealArray; See HigherElevations and T2DSparseRealArray.

Private FHigherElevationsNeedsUpdating: boolean;

FHigherElevationsNeedsUpdating: boolean; FHigherElevationsNeedsUpdating indicates whether or not HigherElevations are up-to-date. If they aren't, they will be recalculated when needed.

Private FLineColor: TColor;

FLineColor: TColor; See LineColor.

Private FLowerElevationFunction: string;

FLowerElevationFunction: string; See LowerElevationFunction.

Private FLowerElevations: T2DSparseRealArray;

FLowerElevations: T2DSparseRealArray; See LowerElevations and T2DSparseRealArray.

Private FLowerElevationsNeedsUpdating: boolean;

FLowerElevationsNeedsUpdating: boolean; FLowerElevationsNeedsUpdating indicates whether or not LowerElevations are up-to-date. If they aren't, they will be recalculated when needed.

Private FMaxX: real;

FMaxX: real; See MaxX.

Private FMaxY: real;

FMaxY: real; See MaxY.

Private FMinX: real;

FMinX: real; See MinX.

Private FMinY: real;

FMinY: real; See MinY.

Private FNeedToResetSelectedVertexCount: boolean;

FNeedToResetSelectedVertexCount: boolean; FNeedToResetSelectedVertexCount indicates whether or not SelectedVertexCount is up-to-date. If it isn't, it will be recalculated when needed.

Private FNeedToUpdateLine: boolean;

FNeedToUpdateLine: boolean; FNeedToUpdateLine indicates whether or not SelectLine is up-to-date. If it isn't, it will be recalculated when needed.

Private FPoints: TRealPointArray;

FPoints: TRealPointArray; See Points and TRealPointArray.

Private FRecalculateArea: boolean;

FRecalculateArea: boolean; FRecalculateArea indicates whether or not FScreenObjectArea is up-to-date. If it isn't, it will be recalculated when needed. See ScreenObjectArea.

Private FRecalculateBox: boolean;

FRecalculateBox: boolean; FRecalculateBox indicates whether or not MinX, MaxX, MinY, and MaxY are up-to-date. If the aren't, they will be recalculated when needed.

Private FRecalculateCoordinates: boolean;

FRecalculateCoordinates: boolean; FRecalculateCoordinates indicates whether or not FCanvasCoordinates is up-to-date. If it isn't, it will be recalculated when needed. See ScreenObjectArea.

Private FRecalculateLength: boolean;

FRecalculateLength: boolean; FRecalculateLength indicates whether or not FScreenObjectLength is up-to-date. If it isn't, it will be recalculated when needed. See ScreenObjectLength.

Private FScreenObjectArea: real;

FScreenObjectArea: real; See ScreenObjectArea.

Private FScreenObjectLength: real;

FScreenObjectLength: real; See ScreenObjectLength.

Private FSegments: TCellElementSegmentList;

FSegments: TCellElementSegmentList; See Segments and TCellElementSegmentList.

Private FSelected: boolean;

FSelected: boolean; See Selected.

Private FSelectedVertexCount: integer;

FSelectedVertexCount: integer; See SelectedVertexCount.

Private FSelectedVertices: array of boolean;

FSelectedVertices: array of boolean; See SelectedVertices.

Private FSelectLine: TLine;

FSelectLine: TLine; See SelectLine and TLine.

Private FSetPropertiesByInterpolation: boolean;

FSetPropertiesByInterpolation: boolean; See SetPropertiesByInterpolation.

Private FSetPropertiesOfEnclosedCells: boolean;

FSetPropertiesOfEnclosedCells: boolean; See SetPropertiesOfEnclosedCells.

Private FSetPropertiesOfIntersectedCells: boolean;

FSetPropertiesOfIntersectedCells: boolean; See SetPropertiesOfIntersectedCells.

Private FSideHighPoints: T2DRealPointArray;

FSideHighPoints: T2DRealPointArray; FSideHighPoints is used to hold points that can be used to draw the TScreenObject on the side view of the model if the ViewDirection when is not vdSide. If the TScreenObject has two elevation formulas, FSideHighPoints is used to store the higher set of points. If the TScreenObject has one elevation formula, FSideHighPoints is used to store the points related to that formula. See FSideLowPoints, FSidePointsUpToDate, and T2DRealPointArray.

Private FSideLowPoints: T2DRealPointArray;

FSideLowPoints: T2DRealPointArray; FSideLowPoints is used to hold points that can be used to draw the TScreenObject on the side view of the model if the ViewDirection when is not vdSide. If the TScreenObject has two elevation formulas, FSideLowPoints is used to store the lower set of points. See FSideHighPoints, FSidePointsUpToDate, and T2DRealPointArray.

Private FSidePointsUpToDate: boolean;

FSidePointsUpToDate: boolean; FSidePointsUpToDate is used to indicate whether FSideHighPoints and FSideLowPoints are up-to-date. If they aren't up-to-date, they will be recalculated the next time they are needed.

Private FSubPolygon1: TSubPolygon;

FSubPolygon1: TSubPolygon; FSubPolygon1 and FSubPolygon2 are used to determine whether a point is inside a TScreenObject. See TSubPolygon.

Private FSubPolygon2: TSubPolygon;

FSubPolygon2: TSubPolygon; FSubPolygon2 and FSubPolygon1 are used to determine whether a point is inside a TScreenObject. See TSubPolygon.

Private FTopElevation: real;

FTopElevation: real; FTopElevation is used to temporarily store the upper elevation of the TScreenObject in current cell when the TScreenObject has an upper and a lower elevation.

Private FTopElevSubscription: TObserver;

FTopElevSubscription: TObserver; FTopElevSubscription is a TObserver that responds to changes in any of the data sets referenced in HigherElevationFunction by calling Changed.

Private FTopHighPoints: T2DRealPointArray;

FTopHighPoints: T2DRealPointArray; FTopHighPoints is used to hold points that can be used to draw the TScreenObject on the top view of the model if the ViewDirection when is not vdTop. If the TScreenObject has two elevation formulas, FTopHighPoints is used to store the higher set of points. If the TScreenObject has one elevation formula, FTopHighPoints is used to store the points related to that formula. See FTopLowPoints, FTopPointsUpToDate, and T2DRealPointArray.

Private FTopLowPoints: T2DRealPointArray;

FTopLowPoints: T2DRealPointArray; FTopLowPoints is used to hold points that can be used to draw the TScreenObject on the top view of the model if the ViewDirection when is not vdTop. If the TScreenObject has two elevation formulas, FTopLowPoints is used to store the lower set of points. See FTopHighPoints, FTopPointsUpToDate, and T2DRealPointArray.

Private FTopPointsUpToDate: boolean;

FTopPointsUpToDate: boolean; FTopPointsUpToDate is used to indicate whether FTopHighPoints and FTopLowPoints are up-to-date. If they aren't up-to-date, they will be recalculated the next time they are needed.

Private FViewDirection: TViewDirection;

FViewDirection: TViewDirection; See ViewDirection and TViewDirection.

Private FVisible: boolean;

FVisible: boolean; See Visible.

Protected FIsUpdating: boolean;

FIsUpdating: boolean; FIsUpdating is true during UpdateScreenObject.

Methods

Private procedure AddPointFromColumn(const ColIndex: integer; const Grid: TPhastGrid; const PreviousPoint, APoint: TEdgePoint; var TempPoints1: TEdgePointArray; var Count: integer; const Position: TEdgePosition);

AddPointFromColumn creates a TEdgePoint at the column boundary on Grid indicated by ColIndex on the line defined by PreviousPoint and APoint. If the new TEdgePoint is between PreviousPoint and APoint, it is added at TempPoints1[Count] and then Count is incremented. The Position of the new TEdgePoint is set to Position. AddPointFromColumn is called when updating Segments.

Parameters
ColIndex
indicates the column boundary on the grid. The new point will be where the line intersects this column.
Grid
is the TPhastGrid from which the point is being added.
PreviousPoint
is one of the points defining the line.
APoint
is the other point defining the line.
TempPoints1
is the array to which the point is added.
Count
is the new number of points in TempPoints1.
Position
is the TEdgePosition for the new point.
Private procedure AddPointFromLayer(const LayerIndex: integer; const Grid: TPhastGrid; const PreviousPoint, APoint: TEdgePoint; var TempPoints1: TEdgePointArray; var Count: integer; const Position: TEdgePosition);

AddPointFromLayer creates a TEdgePoint at the layer boundary on Grid indicated by LayerIndex on the line defined by PreviousPoint and APoint. If the new TEdgePoint is between PreviousPoint and APoint, it is added at TempPoints1[Count] and then Count is incremented. The Position of the new TEdgePoint is set to Position. AddPointFromLayer is called when updating Segments.

Parameters
LayerIndex
indicates the layer boundary on the grid. The new point will be where the line intersects this layer.
Grid
is the TPhastGrid from which the point is being added.
PreviousPoint
is one of the points defining the line.
APoint
is the other point defining the line.
TempPoints1
is the array to which the point is added.
Count
is the new number of points in TempPoints1.
Position
is the TEdgePosition for the new point.
Private procedure AddPointFromRow(const RowIndex: integer; const Grid: TPhastGrid; const PreviousPoint, APoint: TEdgePoint; var TempPoints1: TEdgePointArray; var Count: integer; const Position: TEdgePosition);

AddPointFromRow creates a TEdgePoint at the row boundary on Grid indicated by RowIndex on the line defined by PreviousPoint and APoint. If the new TEdgePoint is between PreviousPoint and APoint, it is added at TempPoints1[Count] and then Count is incremented. The Position of the new TEdgePoint is set to Position. AddPointFromRow is called when updating Segments.

Parameters
RowIndex
indicates the row boundary on the grid. The new point will be where the line intersects this row.
Grid
is the TPhastGrid from which the point is being added.
PreviousPoint
is one of the points defining the line.
APoint
is the other point defining the line.
TempPoints1
is the array to which the point is added.
Count
is the new number of points in TempPoints1.
Position
is the TEdgePosition for the new point.
Private procedure AssignElevations(Formula: string; const SparseArray: T2DSparseRealArray);

AssignElevations fills SparseArray with values based on Formula. Only cells whose values ought to be set by the TScreenObject will be set. AssignElevations calls AssignElevationsFromFront, AssignElevationsFromSide, or AssignElevationsFromTop after compiling Formula.

Parameters
Formula
is a formula for an elevation
SparseArray
is a T2DSparseRealArray whose values will be set.
Private procedure AssignElevationsFromFront(const Compiler: TRbwParser; const SparseArray: T2DSparseRealArray);

AssignElevationsFromFront fills SparseArray: T2DSparseRealArray with values based on Compiler.CurrentExpression. Only cells whose values ought to be set by the TScreenObject will be set. This procedure is only called if ViewDirection = vdFront. See AssignElevations.

Parameters
Compiler
is the TRbwParser whose CurrentExpression will be used to assign values.
SparseArray
is a T2DSparseRealArray whose values will be set.
Private procedure AssignElevationsFromSide(const Compiler: TRbwParser; const SparseArray: T2DSparseRealArray);

AssignElevationsFromSide fills SparseArray: T2DSparseRealArray with values based on Compiler.CurrentExpression. Only cells whose values ought to be set by the TScreenObject will be set. This procedure is only called if ViewDirection = vdSide. See AssignElevations.

Parameters
Compiler
is the TRbwParser whose CurrentExpression will be used to assign values.
SparseArray
is a T2DSparseRealArray whose values will be set.
Private procedure AssignElevationsFromTop(const Compiler: TRbwParser; const SparseArray: T2DSparseRealArray);

AssignElevationsFromTop fills SparseArray: T2DSparseRealArray with values based on Compiler.CurrentExpression. Only cells whose values ought to be set by the TScreenObject will be set. This procedure is only called if ViewDirection = vdTop. See AssignElevations.

Parameters
Compiler
is the TRbwParser whose CurrentExpression will be used to assign values.
SparseArray
is a T2DSparseRealArray whose values will be set.
Private procedure AssignHigherElevations;

AssignHigherElevations fills FHigherElevations with values based on either HigherElevationFunction or ElevationFunction depending on ElevationCount.

Private procedure AssignLowerElevations;

AssignLowerElevations fills FLowerElevations with values based on FLowerElevations.

Private procedure CalculateCanvasCoordinates;

CalculateCanvasCoordinates takes all the T2DRealPoints in Points and calculates the corresponding TPoints. These are stored in FCanvasCoordinates. The TPoints are used when drawing the ScreenObject on the screen.

Private procedure CreateSubPolygons;

FSubPolygon1 and FSubPolygon2 are first destroyed (if they exist) and then recreated. Each will have access to approximately half the T2DRealPoints in Points. Each TSubPolygon will divide itself into two additional subcountours until the number of points each has access to is small enough. The TSubPolygons are used in speeding up evaluation of whether a point is inside the TScreenObject.

Private procedure DestroySubPolygons;

DestroySubPolygons destroys FSubPolygon1 and FSubPolygon2.

Private procedure Draw0Elev(const Canvas: TCanvas; const Direction: TViewDirection; const DrawAsSelected: Boolean = False);

Draw0Elev is used to draw the TScreenObject when Direction = ViewDirection. The elevation functions (if any) are not used. (To facilitated fast selection of objects, the selected objects are redrawn in a PaintBox after being in the normal fashion in a bitmap.

Parameters
Canvas
is the TCanvas on which the TScreenObject will be drawn.
Direction
is the TViewDirection for Canvas.
DrawAsSelected
is used to determine whether to draw the screen object in the normal fashion or as a selected screen object.
Private procedure Draw1Elev(const Canvas: TCanvas; const Direction: TViewDirection; const DrawAsSelected: Boolean = False);

Draw1Elev is used to draw the TScreenObject when ElevationCount = ecOne. if Direction = ViewDirection, Draw0Elev is called. Otherwise ElevationFunction is used to determine either the X or Y coordinates.

Parameters
Canvas
is the TCanvas on which the TScreenObject will be drawn.
Direction
is the TViewDirection for Canvas.
DrawAsSelected
is used to determine whether to draw the screen object in the normal fashion or as a selected screen object. (To facilitate fast selection of objects, the selected objects are redrawn in a PaintBox after being in the normal fashion in a bitmap.)
Private procedure Draw2Elev(const Canvas: TCanvas; const Direction: TViewDirection; const DrawAsSelected: Boolean = False);

Draw2Elev is used to draw the TScreenObject when ElevationCount = ecTwo. if Direction = ViewDirection, Draw0Elev is called. Otherwise HigherElevationFunction and LowerElevationFunction is used to determine either the X or Y coordinates.

Parameters
Canvas
is the TCanvas on which the TScreenObject will be drawn.
Direction
is the TViewDirection for Canvas.
DrawAsSelected
is used to determine whether to draw the screen object in the normal fashion or as a selected screen object. (To facilitate fast selection of objects, the selected objects are redrawn in a PaintBox after being in the normal fashion in a bitmap.)
Private procedure Draw3D_OneElevation;

Draw3D_OneElevation is used to draw the TScreenObject on the 3D view when ElevationCount = ecOne.

Private procedure Draw3D_TwoElevations;

Draw3D_TwoElevations is used to draw the TScreenObject on the 3D view when ElevationCount = ecTwo.

Private procedure EvaluateSubPolygon(const ASubPolygon: TSubPolygon; const X, Y: real; var IsInside: boolean);

EvaluateSubPolygon is used to help determine whether the point at X, Y is inside the TScreenObject. (See IsPointInside.) IsInside is updated to reflect the effect of ASubPolygon on the final result. IsInside is not the final result. EvaluateSubPolygon calls itself recursively.

Parameters
ASubPolygon
is the TSubPolygon which will be evaluated.
X
is the X-coordinate of the location being tested.
Y
is the Y-coordinate of the location being tested.
IsInside
represents the effects of ASubPolygon on whether the point (X, Y) is inside the polygon.
Private function GetACol(const Grid: TPhastGrid; const X: double): integer;

If EvaluatedAt = eaNodes, GetACol returns the column whose center is closest to X. except that it can return Grid.ColumnCount for EvaluatedAt = eaBlocks. If EvaluatedAt = eaBlocks GetACol returns the index of the column center that is closest to X. GetACol is similar to GetColumn. (X is in a coordinates system parallel to the grid.) GetACol is called by UpdateTopSegments and UpdateFrontSegments.

Parameters
Grid
is the TPhastGrid from which the column boundary will be extracted.
X
is the X coordinate (in a coordinates system parallel to the grid) of the location of interest.
Private function GetALayer(const Grid: TPhastGrid; const Z: double): integer;

If EvaluatedAt = eaNodes, GetALayer returns the layer boundary that is closest to Z. If EvaluatedAt = eaBlocks GetALayer returns the index of the layer center that is closest to Z except that it can return Grid.LayerCount for EvaluatedAt = eaBlocks. GetALayer is called by UpdateFrontSegments and UpdateSideSegments.

Parameters
Grid
is the TPhastGrid from which the layer boundary will be extracted.
Z
is the Z coordinate (in a coordinates system parallel to the grid) of the location of interest.
Private function GetARow(const Grid: TPhastGrid; const Y: double): integer;

If EvaluatedAt = eaNodes, GetARow returns the row boundary that is closest to Y ( except that it can return Grid.RowCount for EvaluatedAt = eaBlocks. If EvaluatedAt = eaBlocks GetARow returns the index of the row center that is closest to Y. (Y is in a coordinates system parallel to the grid.) GetARow is called by UpdateTopSegments and UpdateSideSegments.

Parameters
Grid
is the TPhastGrid from which the layer boundary will be extracted.
Y
is the Y coordinate (in a coordinates system parallel to the grid) of the location of interest.
Private function GetBoundaryDataSetFormulas(const Index: integer): string;

GetBoundaryDataSetFormulas is the Read function for the BoundaryDataSetFormulas property.

Private function GetBoundaryDataSets(const Index: integer): TDataArray;

GetBoundaryDataSets is the Read function for the BoundaryDataSets property.

Private function GetCanvasCoordinates: TPointArray;

GetCanvasCoordinates is the Read function for the CanvasCoordinates property. It recalculates the coordinates when needed.

Private function GetColumn(const Grid: TPhastGrid; const X: real): integer;

GetColumn returns the column number that contains X. GetColumn is similar to GetACol.

Parameters
Grid
is the TPhastGrid from which the column boundary will be extracted.
X
is the X coordinate (in a coordinates system parallel to the grid) of the location of interest.
Private procedure GetColumns(const Grid: TPhastGrid; TempMinX, TempMaxX: real; out FirstCol, LastCol: integer);

GetColumns sets FirstCol and LastCol to the range of columns intersected by the TScreenObject.

Parameters
Grid
is the grid being tested
TempMinX
is the minimum X value in the grid coordinate system.
TempMaxX
is the maximum X value in the grid coordinate system.
FirstCol
is the first column intersected by TempMinX to TempMaxX.
LastCol
is the last column intersected by TempMinX to TempMaxX.
Private procedure GetCoordinates(const Direction: TViewDirection; var Points: T2DRealPointArray; const WhichElevation: TWhichElevation);

GetCoordinates is used to get the coordinates of points that can be used to draw a TScreenObject in a view in which Direction <> ViewDirection.

Parameters
Direction
is the direction from which the TScreenObject will be viewed.
Points
is an array that will be filled with coordinates.
WhichElevation
indicates whether HigherElevations or LowerElevations contains the points needed for the procedure.
Private function GetCount: integer;

See Count.

Private function GetDataSetCapacity: integer;

See DataSetCapacity.

Private function GetDataSetCount: integer;

See DataSetCount.

Private function GetDataSetFormulas(const Index: integer): string;

See DataSetFormulas.

Private function GetDataSets(const Index: integer): TDataArray;

See DataSets.

Private function GetEdgePoints(const Index: integer): TEdgePoint;

See EdgePoints.

Private function GetFillColor: TColor;

See FillColor.

Private procedure GetGridCellOrElementLimits(const Col, Row, Layer: integer; out XMin, XMax, YMin, YMax: double);

GetGridCellOrElementLimits sets XMin, XMax, YMin, and YMax to be the positions of the grid cell or element specified by Col, Row, and Layer. Which is used depends on EvaluatedAt.

Private function GetHigherElevations: T2DSparseRealArray;

GetHigherElevations checks FHigherElevationsNeedsUpdating and if it is True calls AssignHigherElevations. Then it returns FHigherElevations.

Private function GetLayer(const Grid: TPhastGrid; const Z: real): integer;

GetLayer returns the layer number that contains Z. GetLayer is similar to GetALayer.

Parameters
Grid
is the TPhastGrid from which the layer boundary will be extracted.
Z
is the Z coordinate (in a coordinates system parallel to the grid) of the location of interest.
Private procedure GetLayers(const Grid: TPhastGrid; TempMinZ, TempMaxZ: real; out FirstLayer, LastLayer: integer);

GetLayers sets FirstLayer and LastLayer to the range of layers intersected by the TScreenObject.

Parameters
Grid
is the grid being tested
TempMinZ
is the minimum Z value in the grid coordinate system.
TempMaxZ
is the maximum Z value in the grid coordinate system.
FirstLayer
is the first layer intersected by TempMinZ to TempMaxZ.
LastRow
is the last layer intersected by TempMinZ to TempMaxZ.
LastLayer
specifies how to interpret the columns.
Private procedure GetLimits(out Limit1, Limit2: integer);

GetLimits gets the limits of one of the sparse elevation arrays.

Private function GetLineColor: TColor;

See LineColor.

Private function GetLowerElevations: T2DSparseRealArray;

GetLowerElevations checks FLowerElevationsNeedsUpdating and if it is True calls AssignLowerElevations. Then it returns FLowerElevations.

Private function GetMaxX: real;

See MaxX.

Private function GetMaxY: real;

See MaxY.

Private function GetMinX: real;

See MinX.

Private function GetMinY: real;

See MinY.

Private function GetPoints(const Index: integer): T2DRealPoint;

See Points.

Private function GetRow(const Grid: TPhastGrid; const Y: real): integer;

GetRow returns the row number that contains Y. GetRow is similar to GetARow.

Parameters
Grid
is the TPhastGrid from which the row boundary will be extracted.
Y
is the Y coordinate (in a coordinates system parallel to the grid) of the location of interest.
Private procedure GetRows(const Grid: TPhastGrid; TempMinY, TempMaxY: real; out FirstRow, LastRow: integer);

GetRows sets FirstRow and LastRow to the range of rows intersected by the TScreenObject.

Parameters
Grid
is the grid being tested
TempMinY
is the minimum Y value in the grid coordinate system.
TempMaxY
is the maximum Y value in the grid coordinate system.
FirstRow
is the first row intersected by TempMinY to TempMaxY.
LastRow
is the last row intersected by TempMinY to TempMaxY.
EvaluatedAt
specifies how to interpret the columns.
Private function GetSelectedVertexCount: integer;

See SelectedVertexCount.

Private function GetSelectedVertices(const index: integer): boolean;

See SelectedVertices.

Private function GetSelectLine: TLine;

See SelectLine.

Private function GLPoint(const Index1, Index2: integer; const SparseArray: T2DSparseRealArray): T3DRealPoint;

GLPoint return the coordinates of a point suitable for OpenGL rendering of the point located at Index1, Index2;

Private procedure Grow;

Grow increases Capacity.

Private procedure GrowBy(Amount: integer);

GrowBy increases Capacity by Amount.

Private function InsideBox(const X, Y: real): boolean;

InsideBox returns true if the point (X,Y) is inside the bounding box for the TScreenObject.

Private function MinDistPointLine(P, A, B: T2DRealPoint; out Closest: T2DRealPoint; const Anisotropy: real): real;

MinDistPointLine calculates the distance between a point and a line segment.

Parameters
P
is the point.
A
is one of the points defining the line segment.
B
is the other point defining the line segment.
Closest
is the closest point on the line segment to P.
Anisotropy
is the Anisotropy used in calculating the distance.
Private procedure OtherIndexOneElev(const LayerOrRow, RowOrColumn: integer; out First, Last: integer);

When evaluating a TScreenObject, OtherIndexOneElev is used to get a range of layers, rows, or columns to test for being within or intersected by the TScreenObject. OtherIndexOneElev is used only when ElevationCount = ecOne.

Parameters
LayerOrRow
is the layer or row of the cells being tested.
RowOrColumnis
the row or column of the cells being tested.
First
is the first layer, row, or column to be tested.
Last
is the last layer, row, or column to be tested. (Last = First)
Private procedure OtherIndexTwoElev(const LayerOrRow, RowOrColumn: integer; out First, Last: integer);

When evaluating a TScreenObject, OtherIndexTwoElev is used to get a range of layers, rows, or columns to test for being within or intersected by the TScreenObject. OtherIndexTwoElev is used only when ElevationCount = ecTwo.

Parameters
LayerOrRow
is the layer or row of the cells being tested.
RowOrColumnis
the row or column of the cells being tested.
First
is the first layer, row, or column to be tested.
Last
is the last layer, row, or column to be tested.
Private function PointToPointDist(const A, B: T2DRealPoint; const Anisotropy: real): real;

PointToPointDist returns the distance between points A and B taking into account Anisotropy.

Private procedure ResetBottomElevationFormula(const Compiler: TRbwParser; const ErrorMessage: string);

ResetBottomElevationFormula is used if LowerElevationFunction has an error to reset it to a default valid value.

Private procedure ResetElevationFormula(const Compiler: TRbwParser; const ErrorMessage: string);

ResetElevationFormula is used if ElevationFunction has an error to reset it to a default valid value.

Private procedure ResetSelectedVertexCount;

ResetSelectedVertexCount deselects all vertices in the TScreenObject.

Private procedure ResetTopElevationFormula(const Compiler: TRbwParser; const ErrorMessage: string);

ResetTopElevationFormula is used if HigherElevationFunction has an error to reset it to a default valid value.

Private procedure SetBoundaryDataSetFormulas(const Index: integer; const Value: string);

See BoundaryDataSetFormulas.

Private procedure SetBoundaryDataSets(const Index: integer; const DataSet: TDataArray);

See BoundaryDataSets.

Private procedure SetCapacity(Value: integer);

See Capacity.

Private procedure SetCellSize(const Value: real);

See CellSize.

Private procedure SetCellSizeUsed(const Value: boolean);

See CellSizeUsed.

Private procedure SetColorLine(const Value: boolean);

See ColorLine.

Private procedure SetCount(const Value: integer);

See Count.

Private procedure SetDataSetCapacity(const Value: integer);

See DataSetCapacity.

Private procedure SetDataSetFormulas(const Index: integer; const Value: string);

See DataSetFormulas.

Private procedure SetDataSets(const Index: integer; const DataSet: TDataArray);

See DataSets.

Private procedure SetDeleted(const Value: boolean);

See Deleted.

Private procedure SetEdgePoints(const Index: integer; const Value: TEdgePoint);

See EdgePoints.

Private procedure SetElevationCount(const Value: TElevationCount);

See ElevationCount.

Private procedure SetEvaluatedAt(const Value: TEvaluatedAt);

See EvaluatedAt.

Private procedure SetFillColor(const Value: TColor);

See FillColor.

Private procedure SetFillScreenObject(const Value: boolean);

See FillScreenObject.

Private procedure SetLineColor(const Value: TColor);

See LineColor.

Private procedure SetPoints(const Index: integer; const Value: T2DRealPoint);

See Points.

Private procedure SetSelected(const Value: boolean);

See Selected.

Private procedure SetSelectedVertices(const index: integer; const Value: boolean);

See SelectedVertices.

Private procedure SetSetPropertiesByInterpolation(const Value: boolean);

See SetPropertiesByInterpolation.

Private procedure SetSetPropertiesOfEnclosedCells(const Value: boolean);

See SetPropertiesOfEnclosedCells.

Private procedure SetSetPropertiesOfIntersectedCells(const Value: boolean);

See SetPropertiesOfIntersectedCells.

Private procedure SetVisible(const Value: boolean);

See Visible.

Private procedure SortPoints(const Input: TEdgePointArray; out SortedPoints: TEdgePointArray; const APoint, PreviousPoint: TEdgePoint; const MaxLength: integer);

SortPoints sorts the points in Input and returns the sorted points in SortedPoints. The points in Input lie along the line (PreviousPoint,APoint). They are sorted so that they occur in order along that line. Duplicate points are eliminated.

Parameters
Input
is an array of TEdgePoints to be sorted.
SortedPoints
is an array of TEdgePoints obtained by sorting Input.
APoint
is the end point of a line along which are all the points in Input.
PreviousPoint
is the beginning point of a line along which are all the points in Input.
MaxLength
is the number of points in Input to be sorted.
Private procedure UpdateBox;

UpdateBox updates MinX, MaxX, MinY, and MaxY.

Private procedure UpdateFrontSegments(const Grid: TPhastGrid; const EvaluatedAt: TEvaluatedAt);

UpdateFrontSegments updates the contents of Segments when ViewDirection = vdFront.

Private procedure UpdateSideSegments(const Grid: TPhastGrid; const EvaluatedAt: TEvaluatedAt);

UpdateSideSegments updates the contents of Segments when ViewDirection = vdSide.

Private procedure UpdateTopSegments(const Grid: TPhastGrid; const EvaluatedAt: TEvaluatedAt; const PointsRotated: boolean; var RotatedPoints: TEdgePointArray);

UpdateTopSegments updates the contents of Segments when ViewDirection = vdTop.

Private procedure ValidateIndex(const Index: integer);

ValidateIndex is used when accessing vertices to raise an exception if Index is invalid.

Private function ValidCell(const Col, Row, Layer: integer): boolean;

ValidCell returns false if Col, Row, Layer refer to an invalid cell. Only two of the three are checked. The ones that are checked depend on ViewDirection

Private function GetSetPropertiesOfEnclosedCells: boolean;
 
Protected procedure AssignCellValue(const UsedVariables: TStringList; const DataSet: TDataArray; const LayerIndex, RowIndex, ColIndex: integer; const Compiler: TRbwParser; const Annotation: string; const Expression: TExpression; const OtherData: TObject); virtual;

AssignCellValue evaluates Expression using Compiler and assigns the result to DataSet at the location (LayerIndex, RowIndex, ColIndex). The variables listed in UsedVariables are updated before Expression is evaluated. OtherData can be used when overriding AssignCellValue to pass additional data to the procedure. DataSet.Annotation at location (LayerIndex, RowIndex, ColIndex) is assigned the value of Annotation

Protected procedure AssignValuesToFrontDataSet(const Grid: TPhastGrid; const DataSet: TDataArray; OtherData: TObject); virtual;

AssignValuesToFrontDataSet initializes variables needed by the formula for the data set and then assigns values to the data set based on that formula for intersected and enclosed cells or elements. AssignValuesToFrontDataSet is only used when ViewDirection = vdFront. See AssignValuesToDataSet.

Protected procedure AssignValuesToSideDataSet(const Grid: TPhastGrid; const DataSet: TDataArray; OtherData: TObject); virtual;

AssignValuesToSideDataSet initializes variables needed by the formula for the data set and then assigns values to the data set based on that formula for intersected and enclosed cells or elements. AssignValuesToSideDataSet is only used when ViewDirection = vdSide. See AssignValuesToDataSet.

Protected procedure AssignValuesToTopDataSet(const Grid: TPhastGrid; const DataSet: TDataArray; OtherData: TObject); virtual;

AssignValuesToTopDataSet initializes variables needed by the formula for the data set and then assigns values to the data set based on that formula for intersected and enclosed cells or elements. AssignValuesToTopDataSet is only used when ViewDirection = vdTop. See AssignValuesToDataSet.

Protected function BoundaryType: integer; virtual;

BoundaryType can be overridden to specify the type of boundary condition specified by the TScreenObject. This implies that only one type of boundary condition may be specified by the same TScreenObject. For models other than PHAST, this may not be true.

Protected function CanAddDataSet(const DataSet: TDataArray): boolean;

CanAddDataSet returns True if DataSet can be added to the TScreenObject.

Protected function DataSetUsed(const DataSet: TDataArray; var OtherData: TObject): boolean; virtual;

DataSetUsed returns True if the value of DataSet is set by this TScreenObject or if DataSet equals TopBoundaryType, FrontBoundaryType, SideBoundaryType, or Top2DBoundaryType.

Protected function EncloseAnnotation(const DataSetFormula: string; const OtherData: TObject): string; virtual;

EncloseAnnotation provides a string that can be used in annotations to indicate that the value of a cell or element has been set by virtue of being enclosed in a TScreenObject.

Protected function GetCompiler(const Orientation: TDataSetOrientation): TRbwParser;

GetCompiler gets a TRbwParser consistent with Orientation and EvaluatedAt.

Protected procedure GetRotatedPoints(out RotatedPoints: TRealPointArray);

GetRotatedPoints sets RotatedPoints to be an array of T2DRealPoints in the coordinate system of the grid.

Protected procedure InitializeExpression(out Compiler: TRbwParser; out DataSetFunction: string; out Expression: TExpression; const DataSet: TDataArray; const OtherData: TObject); virtual;

InitializeExpression is used to get Compiler, DataSetFunction, and Expression.

Parameters
Compiler
is the correct TRbwParser to use with DataSet.
DataSetFunction
is the formula that will be used to assign values to DataSet.
Expression
is the TExpression that will be used to assign values to DataSet.
DataSet
is the TDataArray to which values will be assigned.
OtherData
is used by descendants to pass other data to InitializeExpression.
Protected procedure InitializeVariables(const UsedVariables: TStringList; const DataSet: TDataArray; const Expression: TExpression; const Compiler: TRbwParser); virtual;

InitializeVariables fills UsedVariables with the names of the variables use by Expression. It initializes the TDataArrays associated with those variables.

Protected function IntersectAnnotation(const DataSetFormula: string; const OtherData: TObject): string; virtual;

IntersectAnnotation provides a string that can be used in annotations to indicate that the value of a cell or element has been set by virtue of being intersected by a TScreenObject.

Protected function Intersection(const Point1, Point2: T2DRealPoint; out IntersectPoint: T2DRealPoint): TIntersectResult;

Intersection is used when determining whether adding a point to a TScreenObject will cause it to intersect itself.

Protected function IsBoundaryTimeDataSetUsed(const DataSet: TDataArray; out OtherData: TObject): boolean; virtual;

IsBoundaryTimeDataSetUsed sets OtherData to nil and returns false. Descendants of TScreenObject can override name to provide different behavior. IsBoundaryTimeDataSetUsed is used in AssignValuesToDataSet.

Protected procedure OtherIndex(const LayerOrRow, RowOrColumn: integer; out First, Last: integer; const DataSet: TDataArray); virtual;

When evaluating a 3D data set, OtherIndex is used to set the limits to be tested in one of the coordinate directions. For ViewDirection = vdTop, the limits in the Z coordinate direction are provided. For ViewDirection = vdFront, the limits in the Y coordinate direction are provided. For ViewDirection = vdSide, the limits in the X coordinate direction are provided. First and Last are the limits determined by OtherIndex.

Protected procedure RotatePoints(const Grid: TPhastGrid; out RotatedPoints: TEdgePointArray; out TempMinX, TempMinY, TempMaxX, TempMaxY: double);

RotatePoints sets RotatedPoints to be Points rotated to the grid coordinate system. TempMinX, TempMinY, TempMaxX, TempMaxY are set to the minimum and maximum X and Y coordinates of any of the points in the TScreenObject in the Grid coordinate system.

Protected procedure SetElevationFunction(const Value: string); virtual;

See ElevationFunction. SetElevationFunction makes changes in the TObservers as required.

Protected procedure SetGeometryUpToDate; virtual;

SetGeometryUpToDate sets UpToDate to true as well as FElevSubscription, FTopElevSubscription, and FBottomElevSubscription.

Protected procedure SetHigherElevationFunction(const Value: string); virtual;

See HigherElevationFunction. SetHigherElevationFunction makes changes in the TObservers as required.

Protected procedure SetLowerElevationFunction(const Value: string); virtual;

See LowerElevationFunction. SetLowerElevationFunction makes changes in the TObservers as required.

Protected procedure SetName(const Value: TComponentName); override;

See Name.

Protected procedure SetUpToDate(const Value: boolean); override;

SetUpToDate calls inherited. Then if Value is True, SetUpToDate sets all the TObserver.UpToDate to True for all TObservers in FDataSetSubscriptions.

Protected procedure SetViewDirection(const Value: TViewDirection); virtual;

See ViewDirection.

Protected procedure UpdateVariables(const UsedVariables: TStringList; const DataSet: TDataArray; Layer, Row, Column: integer; const Compiler: TRbwParser);

UpdateVariables gets the variables names from UsedVariables and gets the corresponding TCustomValues from Compiler. It sets each TCustomValue to have the value of its corresponding data set at the location specified by Layer, Row, Column. However, if the corresponding TDataArray, is a 2D data set, either Layer, Row, or Column is changed to zero.

Public function AddBoundaryDataSet(const DataSet: TDataArray): integer;

BoundaryDataSets are data sets associated with a boundary condition whose values are set by the object. An example is the hydraulic conductivity of a leaky boundary. AddBoundaryDataSet adds a boundary data set to BoundaryDataSets. The position of the boundary data sets in BoundaryDataSets is the result of the function. This result may then be used to set a formula for the data set in BoundaryDataSetFormulas.

See also
AddDataSet
DataSets are data sets whose values are set by the object.
DeleteBoundaryDataSet
DeleteBoundaryDataSet removes a TDataArray from BoundaryDataSets and the corresponding formula from BoundaryDataSetFormulas.
Public function AddDataSet(const DataSet: TDataArray): Integer; virtual;

DataSets are data sets whose values are set by the object. An Example is Kx. AddDataSet adds a data set to DataSets. The position of the data sets in DataSets is the result of the function. This result may then be used to set a formula for the data set in DataSetFormulas.

See also
AddBoundaryDataSet
BoundaryDataSets are data sets associated with a boundary condition whose values are set by the object.
DeleteDataSet
DeleteDataSet removes a TDataArray from DataSets and the corresponding formula from DataSetFormulas.
Public procedure AddPoint(const APoint: T2DRealPoint);

AddPoint adds a point to Points. If CheckPoint is true, each point is checked for validity when added. A point is invalid if it causes the TScreenObject to cross itself.

Public procedure Assign(Source: TPersistent); override;

In Assign, if Source is a TScreenObject, its properties are copied into the current TScreenObject.

Public procedure AssignValuesToDataSet(const Grid: TPhastGrid; const DataSet: TDataArray); virtual;

AssignValuesToDataSet is a key method of TScreenObject. It is used to assign values to a data set based on the function for that data set. AssignValuesToDataSet first checks whether it should set the values DataSet and if so, does. It calls one of the protected virtual procedures AssignValuesToTopDataSet, AssignValuesToFrontDataSet, or AssignValuesToSideDataSet to do most of the work.

Public function BoundaryDataSetCount: integer;

BoundaryDataSetCount is the number of boundary BoundaryDataSets affected by the TScreenObject.

Public procedure Changed(Sender: TObject);

Changed is an event handler for TObserver.OnUpToDateSet for FElevSubscription, FTopElevSubscription, and FBottomElevSubscription. If Sender ( = TObserver) isn't up to date, the TScreenObject is invalidated. (See Invalidate.)

Public procedure ClearBoundaryDataSets; virtual;

ClearBoundaryDataSets removes all the members from BoundaryDataSets.

Public procedure ClearDataSets; virtual;

ClearDataSets removes all the members from DataSets. This involves unsubscribing to all the subscriptions related to all members of DataSets

Public procedure ClearPoints;

ClearPoints removes all the members from Points.

Public procedure ClearSelectedVertices;

If any individual vertices in an object are selected, ClearSelectedVertices unselects them.

Public function Closed: boolean;

Closed returns true if an object is closed.

Public procedure CopyPoints(var Destination: TRealPointArray; const Position, Start: integer; var Count: integer);

CopyPoints copies T2DRealPoints from Points into Destination. Position is the location in Destination where the first of the Points will be copied. Start is the location of the first point in Points to be copied. Count is the number of points to be copied. However, the number of points actually copied may be less than Count if there are not enough points in Count

Public constructor Create(AnOwner: TComponent); override;

Create creates a TScreenObject.

Public constructor CreateWithViewDirection(const AViewDirection: TViewDirection; out UndoCreateScreenObject: TCustomUndo; const UndoAble: boolean = True); virtual;

CreateWithViewDirection creates a TScreenObject, assigns it a name and if UndoAble is true, creates a TUndoCreateScreenObject that may be used to undo or redo creation of the TScreenObject.

Public procedure DeleteBoundaryDataSet(const Index: Integer);

DeleteBoundaryDataSet removes a TDataArray from BoundaryDataSets and the corresponding formula from BoundaryDataSetFormulas.

See also
AddBoundaryDataSet
BoundaryDataSets are data sets associated with a boundary condition whose values are set by the object.
DeleteDataSet
DeleteDataSet removes a TDataArray from DataSets and the corresponding formula from DataSetFormulas.
Public procedure DeleteDataSet(const Index: Integer); virtual;

DeleteDataSet removes a TDataArray from DataSets and the corresponding formula from DataSetFormulas.

See also
AddDataSet
DataSets are data sets whose values are set by the object.
DeleteBoundaryDataSet
DeleteBoundaryDataSet removes a TDataArray from BoundaryDataSets and the corresponding formula from BoundaryDataSetFormulas.
Public procedure DeletePoint(const Index: Integer);

DeletePoint removes the point at Index from Points. It does not check that removing that point will still keep the Points all valid. For example, it does not check that the screen object does not cross itself after deleting a point.

Public destructor Destroy; override;

Destroy destroys the TScreenObject. Destroy should not be called directly. Call Free instead.

Public function DistanceToScreenObject(const Location: T2DRealPoint; out ClosestLocation: T2DRealPoint; const Anisotropy: real): real;

DistanceToScreenObject returns the distance from Location to the closest point on the TScreenObject. ClosestLocation will be set to that location. Anisotropy is taken into account when computing the distance.

Public procedure Draw(const Canvas: TCanvas; const Direction: TViewDirection; const DrawAsSelected: Boolean = False); virtual;

Draw is the primary routine for drawing a TScreenObject. Canvas is the TCanvas on which the TScreenObject should be drawn. Direction is the direction from which the TScreenObject will be viewed. DrawAsSelected indicates whether the screen object should be drawn as a selected TScreenObject. (See DrawSelected.)

Public procedure Draw3D;
 
Public procedure DrawSelected(const Canvas: TCanvas; const Direction: TViewDirection);

If a TScreenObject is Selected, DrawSelected calls Draw with DrawAsSelected = True. DrawSelected is used for drawing just the selected TScreenObject so that the entire view of the model doesn't need to be redrawn when just the selected screen objects have changed.

Public function IndexOfBoundaryDataSet(const DataSet: TDataArray): integer;

IndexOfBoundaryDataSet returns the position of DataSet in BoundaryDataSets.

Public function IndexOfDataSet(const DataSet: TDataArray): integer;

IndexOfDataSet returns the position of DataSet in DataSets.

Public function IndexOfPoint(const APoint: T2DRealPoint): integer;

IndexOfPoint returns the first position of APoint in Points. An exact match is required.

Public procedure InsertBoundaryDataSet(const Index: Integer; const DataSet: TDataArray); virtual;

InsertBoundaryDataSet inserts DataSet in BoundaryDataSets at Index if it is not already in BoundaryDataSets.

Public procedure InsertDataSet(const Index: Integer; const DataSet: TDataArray); virtual;

InsertDataSet inserts DataSet in DataSets at Index if it is not already in DataSets.

Public procedure InsertPoint(const Index: Integer; const APoint: T2DRealPoint);

InsertPoint inserts APoint in Points at Index. It does not check that the point that is inserted will leave the TScreenObject in a valid state. For instance, the TScreenObject might cross itself after InsertPoint.

Public procedure Invalidate; virtual;

Invalidate is called when the TScreenObject has been changed. Everything that depends on the TScreenObject gets notified of the change

Public procedure InvalidateCoordinates;

InvalidateCoordinates is called when the CanvasCoordinates need to be recalculated. The recalculation does not occur until the next time the CanvasCoordinates are needed.

Public procedure InvalidateFront3DCoordinates;

InvalidateFront3DCoordinates is called when a TScreenObject whose ViewDirection is not vdFront needs to have its coordinates in the front view recalulated.

Public procedure InvalidateSide3DCoordinates;

InvalidateSide3DCoordinates is called when a TScreenObject whose ViewDirection is not vdSide needs to have its coordinates in the side view recalulated.

Public procedure InvalidateTop3DCoordinates;

InvalidateTop3DCoordinates is called when a TScreenObject whose ViewDirection is not vdTop needs to have its coordinates in the top view recalulated.

Public function IsPointInside(const X, Y: real): boolean; overload;

IsPointInside returns true if (X, Y) is inside the TScreenObject.

Public function IsPointInside(const APoint: T2DRealPoint): boolean; overload;

IsPointInside returns true if APoint is inside the TScreenObject.

Public function ObjectIntersectArea(const Col, Row, Layer: integer): real;

ObjectIntersectArea returns the 2D area of intersection between an object and an individual cell or element.

Public function ObjectIntersectLength(const Col, Row, Layer: integer): real;

ObjectIntersectLength returns the 2D length of intersection between an object and an individual cell or element.

Public function RemoveDataSet(const DataSet: TDataArray): Integer; virtual;

RemoveDataSet removes DataSet from either DataSets or BoundaryDataSets.

Public procedure ResetBoundaryDataSetSubscriptions;

ResetBoundaryDataSetSubscriptions sets the UpToDate property of all subscriptions related to members of BoundaryDataSets to True;

Public procedure ResetDataSetSubscriptions;

ResetDataSetSubscriptions sets the UpToDate property of all subscriptions related to members of DataSets to True;

Public procedure ResetSubscriptions; virtual;

ResetSubscriptions calls ResetBoundaryDataSetSubscriptions and ResetDataSetSubscriptions.

Public function ScreenObjectArea: real;

ScreenObjectArea is the area of the object. The value is stored and only recalculated when it is no longer up-to-date.

Public function ScreenObjectLength: real;

ScreenObjectLength is the 2D length of the object. Its value is stored and is only recalculated when it is no longer up-to-date.

Public function Select(const X, Y: integer): boolean;

If the mouse coordinates (X, Y) are inside the TScreenObject, Select returns True. However, the Selected property is not changed by calling Select.

Public function SelectEdge(const X, Y: integer): integer;

SelectEdge returns -1 if the mouse coordinates X,Y are not on any edge of the TScreenObject. Otherwise it returns the index of the edge on which the point X,Y lies.

Public procedure UpdateScreenObjectWithName(const AName: string; const AViewDirection: TViewDirection; out UndoCreateScreenObject: TCustomUndo; const UndoAble: boolean = True); reintroduce; virtual;

UpdateScreenObjectWithName sets the Name and ViewDirection of the TScreenObject. If UndoAble is true, it also creates a TUndoCreateScreenObject. It sets the elevation formulas to default values.

Public class function ValidName(const OriginalName: string): string;

ValidName converts OriginalName to a name that is valid as a name for a TScreenObject. It does not ensure that the resulting name is unique.

Properties

Protected property EdgePoints[const Index: integer]: TEdgePoint read GetEdgePoints write SetEdgePoints;

EdgePoints provides a way of accessing Points using TEdgePoints instead of T2DRealPoints.

Protected property HigherElevations: T2DSparseRealArray read GetHigherElevations;

HigherElevations is an array of elevations for the TScreenObject. If ElevationCount = ecTwo, HigherElevations is set using HigherElevationFunction. If ElevationCount = ecOne, HigherElevations is set using ElevationFunction. If ElevationCount = ecZero, HigherElevations is not used.

Protected property LowerElevations: T2DSparseRealArray read GetLowerElevations;

LowerElevations is an array of elevations for the TScreenObject. If ElevationCount = ecTwo, LowerElevations is set using LowerElevationFunction. If ElevationCount = ecOne or ecZero, LowerElevations is not used.

Public property BoundaryDataSets[const Index: integer]: TDataArray read GetBoundaryDataSets write SetBoundaryDataSets;

BoundaryDataSets are data sets associated with a boundary condition whose values are set by the object. An example is the hydraulic conductivity of a leaky boundary.

See also
AddBoundaryDataSet
BoundaryDataSets are data sets associated with a boundary condition whose values are set by the object.
BoundaryDataSetFormulas
BoundaryDataSetFormulas are the formulas associated with each member of BoundaryDataSets.
IndexOfBoundaryDataSet
IndexOfBoundaryDataSet returns the position of DataSet in BoundaryDataSets.
InsertBoundaryDataSet
InsertBoundaryDataSet inserts DataSet in BoundaryDataSets at Index if it is not already in BoundaryDataSets.
RemoveDataSet
RemoveDataSet removes DataSet from either DataSets or BoundaryDataSets.
Public property BoundaryDataSetFormulas[const Index: integer]: string read GetBoundaryDataSetFormulas write SetBoundaryDataSetFormulas;

BoundaryDataSetFormulas are the formulas associated with each member of BoundaryDataSets.

Public property CanvasCoordinates: TPointArray read GetCanvasCoordinates;

CanvasCoordinates is an array of TPoints that represent the object. These coordinates are recalculate as needed when the magnification or view of the model changes. For example, panning causes them to be recalculated.

Public property Capacity: integer read FCapacity write SetCapacity;

Capacity is the number of points that the TScreenObject can hold without resizing the array that holds them.

Public property Count: integer read GetCount write SetCount;

Count is the number of vertices in an object. Normally setting Count to a value larger than the current value means that new vertices will be written into the FPoints array by some mechanism other than the AddPoint method. In such cases, it is important to make sure that the added vertices are valid.

Public property DataSetCapacity: integer read GetDataSetCapacity write SetDataSetCapacity;

DataSetCapacity is the number of TDataArrays (and their associated formulas) that can be held without increasing the size of the TList that holds them. See DataSets.

Public property DataSetCount: integer read GetDataSetCount;

DataSetCount is the number of TDataArrays (and their associated formulas) whose properties will be set by the TScreenObject. See DataSets.

Public property DataSets[const Index: integer]: TDataArray read GetDataSets write SetDataSets;

DataSets accesses the TDataArrays whose values will be set by the TScreenObject. The number of members in DataSets is DataSetCount. The number of TDataArrays that can be held in DataSets is DataSetCapacity.

See also
AddDataSet
DataSets are data sets whose values are set by the object.
DataSetFormulas
DataSetFormulas contains the formulas used to set the values of the corresponding member of DataSets.
IndexOfDataSet
IndexOfDataSet returns the position of DataSet in DataSets.
RemoveDataSet
RemoveDataSet removes DataSet from either DataSets or BoundaryDataSets.
Public property DataSetFormulas[const Index: integer]: string read GetDataSetFormulas write SetDataSetFormulas;

DataSetFormulas contains the formulas used to set the values of the corresponding member of DataSets.

Public property Deleted: boolean read FDeleted write SetDeleted;

Deleted indicates whether or not the user has deleted the TScreenObject. Deleting a screen object does not cause it to be destroyed. It is merely put in a state where it is not displayed and does not affect the values of any TDataArray. This is accomplished by exiting immediately from Draw and AssignValuesToDataSet if Deleted is true.

Public property MaxX: real read GetMaxX;

MaxX is the largest X coordinate of any of the points in Points.

Public property MaxY: real read GetMaxY;

MaxY is the largest Y coordinate of any of the points in Points.

Public property MinX: real read GetMinX;

MinX is the smallest X coordinate of any of the points in Points.

Public property MinY: real read GetMinY;

MinY is the smallest Y coordinate of any of the points in Points.

Public property Points[const Index: integer]: T2DRealPoint read GetPoints write SetPoints;

Points gives the real-world coordinates of the vertices of the TScreenObject. For a TScreenObject whose ViewDirection = vdTop, Points gives the X and Y coordinates of the TScreenObject. For a TScreenObject whose ViewDirection = vdFront, Points gives the X and Z coordinates of the TScreenObject (with the Y of each T2DRealPoint representing the Z coordinate). For a TScreenObject whose ViewDirection = vdSide, Points gives the Y and Z coordinates of the TScreenObject (with the X of each T2DRealPoint representing the Z coordinate).

See also
SelectedVertices
For each member of Points, SelectedVertices tells whether or not that vertex is selected.
Public property Segments: TCellElementSegmentList read FSegments;

Segments is a list of the cell or element segments of the object. Each segment is the intersection of one segment of the object with an individual cell or element in the grid. EvaluatedAt determines whether the segments in Segments is a cell segment or an element segment.

Public property SelectedVertexCount: integer read GetSelectedVertexCount;

SelectedVertexCount tells how many points in Points are selected.

Public property SelectedVertices[const Index: integer]: boolean read GetSelectedVertices write SetSelectedVertices;

For each member of Points, SelectedVertices tells whether or not that vertex is selected.

Public property SelectLine: TLine read GetSelectLine;

SelectLine is a representation of the TScreenObject in canvas coordinates. It is used when determining whether a "lasso" drawn by the user intersects the TScreenObject.

Published property CellSize: real read FCellSize write SetCellSize;

If CellSizeUsed is true, CellSize is the size of the cells to be created in the vicinity of the object.

Published property CellSizeUsed: boolean read FCellSizeUsed write SetCellSizeUsed;

During automatic generation of a grid, any objects for which CellSizeUsed is true will be used to set the cell size of the grid.

Published property ColorLine: boolean read FColorLine write SetColorLine;

ColorLine determines whether or not the line outlining the object will be drawn in color. See LineColor.

Published property ElevationCount: TElevationCount read FElevationCount write SetElevationCount;

ElevationCount indicates the number of associated elevations of the TScreenObject. See TElevationCount.

Published property ElevationFunction: string read FElevationFunction write SetElevationFunction;

If ElevationCount = ecOne, ElevationFunction is the formula used to define the position of the object in the dimension perpendicular to the plane of the ViewDirection.

Published property EvaluatedAt: TEvaluatedAt read FEvaluatedAt write SetEvaluatedAt;

EvaluatedAt determines whether a data set is evaluated at nodes or cell centers. This also controls which data sets it can set the values of. See TEvaluatedAt.

Published property FillColor: TColor read GetFillColor write SetFillColor;

FillColor is the color used to draw the interior of objects. It only has an effect for closed objects. See FillScreenObject.

Published property FillContour: boolean write SetFillScreenObject stored False;

FillContour is used for backwards compatibility only.

Published property FillScreenObject: boolean read FFillScreenObject write SetFillScreenObject;

FillScreenObject determines whether the interior of an object is drawn in color. It only has an effect for closed objects. See FillColor.

Published property HigherElevationFunction: string read FHigherElevationFunction write SetHigherElevationFunction;

If ElevationCount = ecTwo, HigherElevationFunction is the formula used to define the higher position of the object in the dimension perpendicular to the plane of the ViewDirection.

Published property LineColor: TColor read GetLineColor write SetLineColor;

LineColor is the color used to draw the line defining the object. See ColorLine.

Published property LowerElevationFunction: string read FLowerElevationFunction write SetLowerElevationFunction;

If ElevationCount = ecTwo, LowerElevationFunction is the formula used to define the lower position of the object in the dimension perpendicular to the plane of the ViewDirection.

Published property Selected: boolean read FSelected write SetSelected;

Selected indicates whether the object is currently selected or not.

Published property SetPropertiesByInterpolation: boolean read FSetPropertiesByInterpolation write SetSetPropertiesByInterpolation;

If SetPropertiesByInterpolation is true, the formula of the object for a particular data set will set the values of elements or nodes in the data according to the algorithm defined by the interpolator for the data set.

Published property SetPropertiesOfEnclosedCells: boolean read GetSetPropertiesOfEnclosedCells write SetSetPropertiesOfEnclosedCells;

If SetPropertiesOfEnclosedCells, the formula of the object for a particular data set will set the values of all elements or nodes in the data set that are located inside the object. An object must be closed for this to have any effect.

Published property SetPropertiesOfIntersectedCells: boolean read FSetPropertiesOfIntersectedCells write SetSetPropertiesOfIntersectedCells;

If SetPropertiesOfIntersectedCells is true, the formula of the object for a particular data set will set the values of all elements or nodes in the data set that are intersected by the object.

Published property ViewDirection: TViewDirection read FViewDirection write SetViewDirection;

ViewDirection indicates the direction from which the object is to be viewed.

Published property Visible: boolean read FVisible write SetVisible default True;

Visible indicates whether the TScreenObject is visible to the user.


Generated by PasDoc 0.10.0 on 2006-10-31 09:56:46