Class TVector3SingleList

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TVector3SingleList = class(specialize TGenericStructList<TVector3Single>)

Description

no description available, TGenericStructList description follows

Generic list of types that are compared by CompareByte.

This is equivalent to TFPGList, except it doesn't override IndexOf, so your type doesn't need to have a "=" operator built-in inside FPC. When calling IndexOf or Remove, it will simply compare values using CompareByte, this is what TFPSList.IndexOf uses. This way it works to create lists of records, vectors (constant size arrays), old-style TP objects, and also is suitable to create a list of methods (since for methods, the "=" is broken, for Delphi compatibility, see http://bugs.freepascal.org/view.php?id=9228).

We also add some trivial helper methods like Add and L.

Hierarchy

Overview

Methods

Public procedure AssignNegated(Source: TVector3SingleList);
Public procedure Negate;
Public procedure Normalize;
Public procedure MultiplyComponents(const V: TVector3Single);
Public procedure AssignLerp(const Fraction: Single; V1, V2: TVector3SingleList; Index1, Index2, ACount: Integer);
Public procedure AssignLerpNormalize(const Fraction: Single; V1, V2: TVector3SingleList; Index1, Index2, ACount: Integer);
Public procedure AssignLerpRgbInHsv(const Fraction: Single; V1, V2: TVector3SingleList; Index1, Index2, ACount: Integer);
Public procedure AddList(Source: TVector3SingleList);
Public procedure AddListRange(Source: TVector3SingleList; Index, AddCount: Integer);
Public procedure AddArray(const A: array of TVector3Single);
Public procedure AssignArray(const A: array of TVector3Single);
Public function ToVector4Single(const W: Single): TVector4SingleList;
Public function MergeCloseVertexes(MergeDistance: Single): Cardinal;

Description

Methods

Public procedure AssignNegated(Source: TVector3SingleList);
 
Public procedure Negate;

Negate all items.

Public procedure Normalize;

Normalize all items. Zero vectors are left as zero.

Public procedure MultiplyComponents(const V: TVector3Single);

Multiply each item, component-wise, with V.

Public procedure AssignLerp(const Fraction: Single; V1, V2: TVector3SingleList; Index1, Index2, ACount: Integer);

Assign linear interpolation between two other vector arrays. We take ACount items, from V1[Index1 ... Index1 + ACount - 1] and V2[Index2 ... Index2 + ACount - 1], and interpolate between them like normal Lerp functions.

It's Ok for both V1 and V2 to be the same objects. But their ranges should not overlap, for future optimizations (although it's Ok for current implementation).

Public procedure AssignLerpNormalize(const Fraction: Single; V1, V2: TVector3SingleList; Index1, Index2, ACount: Integer);

Assign linear interpolation between two other vector arrays, and normalize resulting vectors.

See also
AssignLerp
Assign linear interpolation between two other vector arrays.
Public procedure AssignLerpRgbInHsv(const Fraction: Single; V1, V2: TVector3SingleList; Index1, Index2, ACount: Integer);

Assign linear interpolation between two other vector arrays, treating vectors as RGB colors and interpolating in HSV space.

See also
AssignLerp
Assign linear interpolation between two other vector arrays.
Public procedure AddList(Source: TVector3SingleList);
 
Public procedure AddListRange(Source: TVector3SingleList; Index, AddCount: Integer);
 
Public procedure AddArray(const A: array of TVector3Single);
 
Public procedure AssignArray(const A: array of TVector3Single);
 
Public function ToVector4Single(const W: Single): TVector4SingleList;

Convert to TVector4SingleList, with 4th vector component in new array set to constant W.

Public function MergeCloseVertexes(MergeDistance: Single): Cardinal;

When two vertexes on the list are closer than MergeDistance, set them truly (exactly) equal. Returns how many vertex positions were changed.