Class TMFVec3f

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TMFVec3f = class(TVRMLSimpleMultField)

Description

no description available, TVRMLSimpleMultField description follows

Multiple values VRML field. Remember that such field may always have any number of items, including zero.

Note that we keep MF fields contents in TDyn*Array instances (RawItems in this class, also accessible as Items (with more concrete class) in descendants). This means that they are in compact form, easy for reading, or even for feeding the list into OpenGL. That's the main reason why I did not simply implement TVRMLSimpleMultField as a descendant of TVRMLSingleFieldsList: A long list of vertexes, MFVec3f, would be kept as a list of pointers to a lot of TSFVec3f instances. This would be quite memory-consuming, and very uncomfortable for access. On the contrary, current implementation keeps all these vertexes inside one TDynVector3SingleArray instance, that internally keeps all items in one continuos piece of memory.

Descendants implementors notes: to make new descendant:

Hierarchy

Overview

Methods

Protected function RawItemToString(ItemNum: integer): string; override;
Public function Items: TDynVector3SingleArray;
Public procedure RawItemsAdd(Item: TVRMLSingleField); override;
Public constructor Create(AParentNode: TVRMLFileItem; const AName: string; const InitialContent: array of TVector3Single);
Public constructor CreateUndefined(AParentNode: TVRMLFileItem; const AName: string); override;
Public function EqualsDefaultValue: boolean; override;
Public function Equals(SecondValue: TVRMLField; const EqualityEpsilon: Double): boolean; override;
Public procedure AssignLerp(const A: Double; Value1, Value2: TVRMLField); override;
Public function CanAssignLerp: boolean; override;
Public procedure Assign(Source: TPersistent); override;
Public procedure AssignValue(Source: TVRMLField); override;
Public procedure AssignDefaultValueFromValue; override;
Public class function VRMLTypeName: string; override;

Properties

Public property ItemsSafe[Index: Integer]: TVector3Single read GetItemsSafe write SetItemsSafe;

Description

Methods

Protected function RawItemToString(ItemNum: integer): string; override;
 
Public function Items: TDynVector3SingleArray;
 
Public procedure RawItemsAdd(Item: TVRMLSingleField); override;
 
Public constructor Create(AParentNode: TVRMLFileItem; const AName: string; const InitialContent: array of TVector3Single);
 
Public constructor CreateUndefined(AParentNode: TVRMLFileItem; const AName: string); override;
 
Public function EqualsDefaultValue: boolean; override;
 
Public function Equals(SecondValue: TVRMLField; const EqualityEpsilon: Double): boolean; override;
 
Public procedure AssignLerp(const A: Double; Value1, Value2: TVRMLField); override;
 
Public function CanAssignLerp: boolean; override;
 
Public procedure Assign(Source: TPersistent); override;
 
Public procedure AssignValue(Source: TVRMLField); override;
 
Public procedure AssignDefaultValueFromValue; override;
 
Public class function VRMLTypeName: string; override;
 

Properties

Public property ItemsSafe[Index: Integer]: TVector3Single read GetItemsSafe write SetItemsSafe;

Access Items[] checking for range errors. In case of errors, Get will return zero vector, Set will do nothing, and both will produce clear VRMLNonFatalError.


Generated by PasDoc 0.11.0 on 2008-09-12 11:58:35