Class TCastleVector2Persistent
Unit
Declaration
type TCastleVector2Persistent = class(TCastleComponent)
Description
TVector2 record represented as a TPersistent descendant, to be able to visually edit it (in Lazarus and Delphi visual designer, and Castle Game Engine visual designer) and to serialize it.
Normal user code does not need to deal with this class or it's instances. Instead directly operate on TVector2 values, which is faster and more natural. TVector2 are simple records, so they are naturally copied on assignment, and various operators like additions work in a natural way too.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleVector2Persistent
Overview
Fields
InternalGetValue: TGetVector2Event; |
|
InternalSetValue: TSetVector2Event; |
|
InternalDefaultValue: TVector2; |
Methods
procedure Loaded; override; |
|
constructor Create(const AOwner: TComponent = nil); reintroduce; |
|
function ValueIsStreamed: Boolean; override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
|
function ToString: String; override; |
Properties
property Value: TVector2 read GetValue write SetValue; |
|
property X: Single read GetX write SetX stored XIsStored nodefault; |
|
property Y: Single read GetY write SetY stored YIsStored nodefault; |
Description
Fields
InternalGetValue: TGetVector2Event; |
|
This item has no description. |
InternalSetValue: TSetVector2Event; |
|
This item has no description. |
InternalDefaultValue: TVector2; |
|
Default value, just like Pascal "default" property attribute, is only used to decide which vector components to write to file. It is your responsibility to make sure that this is really the default (right after creation) state of the object, and the deserialization will just not modify components not specified (it will not reset them to |
Methods
procedure Loaded; override; |
|
This item has no description. |
constructor Create(const AOwner: TComponent = nil); reintroduce; |
|
This item has no description. |
function ValueIsStreamed: Boolean; override; |
|
This item has no description. Showing description inherited from TCastleComponent.ValueIsStreamed.
Whether the current value of this object should be written to the stream. This should be This is used by CastleComponentSerialize, which is used in Castle Game Engine for all serialization. In simple cases, this just says whether the current value of this object equals to some default value. The default implementation of this class returns Descendants that override this to sometimes return The name of this method is consistent with TPropertyEditor.ValueIsStreamed in LCL. |
function PropertySections(const PropertyName: String): TPropertySections; override; |
|
This item has no description. Showing description inherited from TCastleComponent.PropertySections. Section where to show property in the editor. |
function ToString: String; override; |
|
This item has no description. |
Properties
property Value: TVector2 read GetValue write SetValue; |
|
This item has no description. |
property X: Single read GetX write SetX stored XIsStored nodefault; |
|
This item has no description. |
property Y: Single read GetY write SetY stored YIsStored nodefault; |
|
This item has no description. |
Generated by PasDoc 0.16.0-snapshot.