Class TSFImage
Unit
X3DFields
Declaration
type TSFImage = class(TX3DSingleField)
Description
no description available, TX3DSingleField description follows no description available, TX3DField description follows
Base class for all VRML/X3D fields.
Common notes for all descendants: most of them expose field or property "Value", this is (surprise, surprise!) the value of the field. Many of them also expose DefaultValue and DefaultValueExists fields/properties, these should be the default VRML value for this field. You can even change DefaultValue after the object is created.
Most of descendants include constructor that initializes both DefaultValue and Value to the same thing, as this is what you usually want.
Some notes about Assign method (inherited from TPersistent and overridied appropriately in TX3DField descendants):
There are some exceptions, but usually assignment is possible only when source and destination field classes are equal.
Assignment (by Assign, inherited from TPersistent) tries to copy everything: name (with alternative names), default value, IsClauseNames, ValueFromIsClause, Exposed, and of course current value.
Exceptions are things related to hierarchy of containers: ParentNode, ParentInterfaceDeclaration. Also ExposedEventsLinked.
If you want to copy only the current value, use AssignValue (or AssignLerp, where available).
Hierarchy
Overview
Methods
Properties
Description
Methods
 |
procedure SaveToStreamValue(Writer: TX3DWriter); override; |
|
|
 |
constructor Create(AParentNode: TX3DFileItem; const AName: string; const AValue: TCastleImage); |
Parameters
- AValue
- is the initial value for Value.
Note - our constructor COPIES passed reference AValue, not it's contents (I mean, we do Value := AValue, NOT Value := ImageCopy(AValue), so don't Free image given to us (at least, don't do this without clearing our Value field)). You can pass AValue = nil, then Value will be initialized to null image TRGBImage.Create.
|
 |
constructor CreateUndefined(AParentNode: TX3DFileItem; const AName: string; const AExposed: boolean); override; |
|
|
 |
destructor Destroy; override; |
|
|
 |
procedure ParseValue(Lexer: TX3DLexer; Reader: TX3DReader); override; |
|
|
 |
function Equals(SecondValue: TX3DField; const EqualityEpsilon: Double): boolean; override; |
|
|
 |
procedure Assign(Source: TPersistent); override; |
|
|
 |
procedure AssignValue(Source: TX3DField); override; |
|
|
 |
class function X3DType: string; override; |
|
|
 |
class function CreateEvent(const AParentNode: TX3DFileItem; const AName: string; const AInEvent: boolean): TX3DEvent; override; |
|
|
Properties
 |
property Value: TCastleImage read FValue write SetValue; |
|
Current image, expressed as the TCastleImage instance.
The image instance is by default owned by this object, which means that we will free it in destructor or when setting another value.
Value may be IsEmpty, and then we know that there is no image recorded in this field. Value may never be Nil.
|
Generated by PasDoc 0.14.0.
|