Class TNearest2DInterpolator

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TNearest2DInterpolator = class(TCustomAnisotropicInterpolator)

Description

TNearest2DInterpolator implements an interpolator that returns the value of the TScreenObject nearest to the point of interest.

Hierarchy

Overview

Fields

Private FExpression: TExpression;

Methods

Private procedure InitializeVariablesAndExpression(const Location: T2DRealPoint; const NearestScreenObject: TScreenObject);
Private function GetExpression(const Location: T2DRealPoint): TExpression;
Protected function GetNearestScreenObject(const Location: T2DRealPoint; out ClosestLocation: T2DRealPoint): TScreenObject; virtual;
Public class function InterpolatorName: string; override;
Public class function ValidReturnTypes: TRbwDataTypes; override;
Public function BooleanResult(const Location: T2DRealPoint): boolean; override;
Public function IntegerResult(const Location: T2DRealPoint): integer; override;
Public function RealResult(const Location: T2DRealPoint): real; override;
Public function StringResult(const Location: T2DRealPoint): string; override;

Description

Fields

Private FExpression: TExpression;

FExpression is the TExpression used to assign the result of the interpolation.

Methods

Private procedure InitializeVariablesAndExpression(const Location: T2DRealPoint; const NearestScreenObject: TScreenObject);

InitializeVariablesAndExpression sets FExpression and sets the values of all the variables used by FExpression and then evaluates FExpression.

Private function GetExpression(const Location: T2DRealPoint): TExpression;

GetExpression gets the TExpression for the nearest TScreenObject that sets TCustom2DInterpolater.DataSet by interpolation, sets the variable for it and evaluates it. If there is no closest TScreenObject, GetExpression returns nil.

Protected function GetNearestScreenObject(const Location: T2DRealPoint; out ClosestLocation: T2DRealPoint): TScreenObject; virtual;

GetNearestScreenObject returns the TScreenObject that is used to assign values using interpolation to TCustom2DInterpolater.DataSet and is closest to Location. ClosestLocation is the location on that TScreenObject that is closest to Location.

Public class function InterpolatorName: string; override;

InterpolatorName is the name of the interpolator displayed to the user.

Public class function ValidReturnTypes: TRbwDataTypes; override;

ValidReturnTypes tells what types of data with which this interpolator can be used. (integer, real-number, boolean, and string)

Public function BooleanResult(const Location: T2DRealPoint): boolean; override;

BooleanResult gets the boolean value at Location of the closest TScreenObject that sets TCustom2DInterpolater.DataSet by interpolation,

Public function IntegerResult(const Location: T2DRealPoint): integer; override;

IntegerResult gets the integer value at Location of the closest TScreenObject that sets TCustom2DInterpolater.DataSet by interpolation,

Public function RealResult(const Location: T2DRealPoint): real; override;

RealResult gets the real-number value at Location of the closest TScreenObject that sets TCustom2DInterpolater.DataSet by interpolation,

Public function StringResult(const Location: T2DRealPoint): string; override;

StringResult gets the string value at Location of the closest TScreenObject that sets TCustom2DInterpolater.DataSet by interpolation,


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