TVectorMap.Vector

property FixedVector[X, Y: Integer]: TFixedVector; default;

property FixedVectorS[X, Y: Integer]: TFixedVector;

property FixedVectorX[X, Y: TFixed]: TFixedVector;

property FixedVectorXS[X, Y: TFixed]: TFixedVector;

property FloatVector[X, Y: Integer]: TFloatVector;

property FloatVectorS[X, Y: Integer]: TFloatVector;

property FloatVectorF[X, Y: Single]: TFloatVector;

property FloatVectorFS[X, Y: Single]: TFloatVector;

Description

FixedVector property sets the value of the vector in the vectormap. Reading it, will return the vector value of the vector located at specified coordinates. This property does not validate the specified coordinates, so use it only when completely certain that the ranges provided is within the vectormap boundaries. FixedVector is declared as default property, you may use it as shown below:

Vectormap[10, 20] := Vectormap[20, 10]; // copy a vector from (20,10) to (10,20) position

FixedVectorS is a 'safe' version of the FixedVector property. When reading vectors from the outside the bitmap boundary, a vector of (0, 0) is returned. Writing with invalid coordinates will have no effect.

FixedVectorX provides a method for accessing the vectors in TFixed based coordinates. The returned vector is computed by performing linear interpolation on four adjacent vectors. Similarly, when vectors are set, they are distributed weighted over four adjacent vectors.

FixedVectorXS is a 'safe' version of the above property.

FloatVector/S/F/FS Provides floating point compatible versions of the above properties. Note that the floating point versions are provided for convenience only; coding for optimal performance, consider using fixedpoint versions (which will allow execution inside MMX enabled code segments). TVectormap stores its vectors natively in TFixedVector format, hence no extra precision is gained by using floating point versions.

See Also

Naming Conventions, Fixed Point Math, TFixed, Vector Types