Class TMFNode
Unit
Declaration
type TMFNode = class(TX3DMultField)
Description
VRML/X3D field holding a list of nodes.
Just like SFNode, it's defined in this unit, as it uses TX3DNode. Note that items of MFNode cannot be nil (i.e. VRML/X3D doesn't allow to use NULL inside MFNode), contrary to SFNode.
Note that TMFNode implementation doesn't use TX3DSimpleMultField. One reason is that we don't want to parse MFNode items by SFNode parser, because MFNode doesn't allow NULL items. (In the past, another argument was that we want to use TX3DNodeList and it wasn't compatible with TX3DSimpleMultField. But now TX3DNodeList descends from TFPSList, so it isn't a problem.)
Just like for TSFNode: Note that we store AllowedChildren list, which is a list of classes allowed as Items. But this is used only to produce warnings for a user. You should never assert that every item actually is one the requested classes.
Source: scene/x3d/x3dnodes_mfnode.inc (line 38).
Hierarchy
- TObject
- TPersistent
- TX3DFileItem
- TX3DFieldOrEvent
- TX3DField
- TX3DMultField
- TMFNode
Overview
Fields
| Public | OnInputIgnore: TInputIgnoreEvent; |
Methods
| Public | constructor Create; |
| Public | constructor Create(const AParentNode: TX3DFileItem; const AX3DName: string); |
| Public | function IsClauseNamesCount: Integer; |
| Public | procedure IsClauseNamesAssign(const SourceIsClauseNames: TCastleStringList); |
| Public | procedure IsClauseNamesAdd(const S: string); |
| Public | procedure ParseIsClause(Lexer: TX3DLexer); |
| Public | procedure AddAlternativeName(const AlternativeName: string; const X3DMajorVersion: Integer); virtual; |
| Public | procedure RemoveAlternativeName(const X3DMajorVersion: Integer); |
| Public | function IsName(const S: string): boolean; |
| Public | function NameForVersion(Version: TX3DVersion): string; overload; |
| Public | function NameForVersion(Writer: TX3DWriter): string; overload; |
| Public | function NiceName: string; |
| Public | procedure SaveToStreamClassicIsClauses(Writer: TX3DWriter); |
| Public | procedure Parse(Lexer: TX3DLexer; Reader: TX3DReader; IsClauseAllowed: boolean); |
| Public | procedure ParseXMLAttributeLexer(Lexer: TX3DLexer; Reader: TX3DReader); virtual; |
| Public | procedure FieldSaveToStream(Writer: TX3DWriter; FieldSaveWhenDefault: boolean = false; XmlAvoidSavingNameBeforeValue: boolean = false); |
| Public | procedure SaveToStream(Writer: TX3DWriter); override; |
| Public | function SaveToXml: TSaveToXmlMethod; override; |
| Public | function FastEqualsValue(SecondValue: TX3DField): boolean; virtual; |
| Public | function EventIn: TX3DEvent; |
| Public | function EventOut: TX3DEvent; |
| Public | class function TypeName: String; deprecated 'use X3DType'; |
| Public | procedure AssignLerp(const A: Double; Value1, Value2: TX3DField); virtual; |
| Public | function CanAssignLerp: boolean; virtual; |
| Public | procedure AddAlternativeName(const AlternativeName: String; const X3DMajorVersion: Integer); override; |
| Public | procedure Changed; |
| Public | function ExecuteChange: TX3DChange; virtual; |
| Public | procedure Send(Value: TX3DField); overload; |
| Public | procedure AddNotification(const Notification: TX3DEventReceive); |
| Public | procedure RemoveNotification(const Notification: TX3DEventReceive); |
| Public | constructor CreateUndefined(const AParentNode: TX3DFileItem; const AExposed: boolean; const AName: String); override; |
| Public | constructor Create(const AParentNode: TX3DNode; const AExposed: boolean; const AName: String; const AAllowedChildrenClasses: array of TX3DNodeClass); overload; |
| Public | constructor Create(const AParentNode: TX3DNode; const AExposed: boolean; const AName: String; const AAllowedChildrenClasses: TX3DNodeClassesList); overload; |
| Public | constructor Create(const AParentNode: TX3DNode; const AExposed: boolean; const AName: String; const AnAllowedChildrenFunctionality: TNodeFunctionalityClass); overload; |
| Public | destructor Destroy; override; |
| Public | function GetEnumerator: TEnumerator; |
| Public | procedure Replace(const Index: Integer; Node: TX3DNode); |
| Public | procedure Add(Node: TX3DNode); overload; |
| Public | procedure Add(Position: Integer; Node: TX3DNode); overload; |
| Public | procedure Delete(Index: Integer); |
| Public | function Remove(const Node: TX3DNode): Integer; |
| Public | function Extract(Index: Integer): TX3DNode; |
| Public | procedure Clear; |
| Public | procedure AssignItems(const SourceItems: TX3DNodeList); overload; |
| Public | procedure AssignItems(const SourceItems: array of TX3DNode); overload; |
| Public | procedure ParseValue(Lexer: TX3DLexer; Reader: TX3DReader); override; |
| Public | procedure ParseXMLAttribute(const AttributeValue: String; Reader: TX3DReader); override; |
| Public | procedure ParseXMLElement(Element: TDOMElement; Reader: TX3DReader); override; |
| Public | function EqualsDefaultValue: boolean; override; |
| Public | function Equals(SecondValue: TX3DField): boolean; override; |
| Public | procedure Assign(Source: TPersistent); override; |
| Public | procedure AssignValue(Source: TX3DField); override; |
| Public | procedure AssignDefaultValueFromValue; override; |
| Public | procedure UnassignDefaultValue; override; |
| Public | class function X3DType: String; override; |
| Public | class function CreateEvent(const AParentNode: TX3DFileItem; const AName: String; const AInEvent: boolean): TX3DEvent; override; |
| Public | procedure WarningIfChildNotAllowed(Child: TX3DNode); |
| Public | function ChildAllowed(Child: TX3DNode): boolean; |
| Public | procedure AssignDefaultItems(const SourceDefaultItems: TX3DNodeList); |
| Public | procedure ClearDefault; |
| Public | function Enumerate(Func: TEnumerateChildrenFunction): Pointer; |
| Public | procedure Send(const AValue: array of TX3DNode); overload; |
| Public | function FindName(const AName: String): TX3DNode; |
| Public | function IndexOfName(const AName: String): Integer; |
| Public | function IndexOf(const ANode: TX3DNode): Integer; |
| Public | function Contains(const ANode: TX3DNode): Boolean; |
Properties
| Public | property PositionInParent: Integer
read FPositionInParent write FPositionInParent default -1; |
| Public | property X3DName: string read FX3DName; |
| Public | property Name: string read FX3DName; deprecated 'use X3DName'; |
| Public | property IsClauseNames[const Index: Integer]: string read GetIsClauseNames; |
| Public | property ParentInterfaceDeclaration: TX3DFileItem
read FParentInterfaceDeclaration write FParentInterfaceDeclaration; |
| Public | property ValueFromIsClause: boolean
read FValueFromIsClause write FValueFromIsClause; |
| Public | property Exposed: boolean read FExposed write SetExposed default false; |
| Public | property ExposedEvents [InEvent: boolean]: TX3DEvent
read GetExposedEvents; |
| Public | property ExposedEventsLinked: boolean
read FExposedEventsLinked write SetExposedEventsLinked
default true; |
| Public | property ChangeAlways: TX3DChange read FChangeAlways write FChangeAlways default chNone; |
| Public | property Count: TListSize read GetCount write SetCount; |
| Public | property Items[const Index: Integer]: TX3DNode read GetItems write Replace; default; |
| Public | property ItemsArray[Index: Integer]: TX3DNode read GetItems; deprecated 'use Items (default array property)'; |
| Public | property ParentNode: TX3DNode read FParentNode; |
| Public | property DefaultItems: TX3DNodeList read FDefaultItems; |
| Public | property DefaultValueExists: boolean
read FDefaultValueExists write FDefaultValueExists default false; |
Description
Fields
| Public | OnInputIgnore: TInputIgnoreEvent; |
|
This item is declared in ancestor TX3DField. This item has no description. | |
Methods
| Public | constructor Create; |
|
This item is declared in ancestor TX3DFileItem. This item has no description. | |
| Public | constructor Create(const AParentNode: TX3DFileItem; const AX3DName: string); |
|
This item is declared in ancestor TX3DFieldOrEvent. This item has no description. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 47). | |
| Public | function IsClauseNamesCount: Integer; |
|
This item is declared in ancestor TX3DFieldOrEvent. This item has no description. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 102). | |
| Public | procedure IsClauseNamesAssign(const SourceIsClauseNames: TCastleStringList); |
|
This item is declared in ancestor TX3DFieldOrEvent. This item has no description. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 103). | |
| Public | procedure IsClauseNamesAdd(const S: string); |
|
This item is declared in ancestor TX3DFieldOrEvent. This item has no description. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 104). | |
| Public | procedure ParseIsClause(Lexer: TX3DLexer); |
|
This item is declared in ancestor TX3DFieldOrEvent. Parse only "IS" clause, if it's not present — don't do nothing. For example, for the TX3DField descendant, this does not try to parse field value. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 110). | |
| Public | procedure AddAlternativeName(const AlternativeName: string; const X3DMajorVersion: Integer); virtual; |
|
This item is declared in ancestor TX3DFieldOrEvent. Add alternative name for the same field/event, to be used in different VRML version. When VRML major version is exactly equal X3DMajorVersion, the AlternativeName should be used — for both reading and writing of this field/event. In some cases, when reading, we may also allow all versions (both original and alternative), but this is mostly for implementation simplicity — don't count on it. A special value 0 for X3DMajorVersion means that this is just an alternative name, that should be allowed when reading (as alternative to normal Name), and never used when writing. Alternative names is a very handy mechanism for cases when the only thing that changed between VRML versions is the field name. Example: Switch node's children/choice, LOD node's children/level, Polyline2D lineSegments/point. Note that this also works for ExposedEvents with exposed TX3DField: if a field has alternative names, then it's exposed events always also have appropriate alternative names. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 133). | |
| Public | procedure RemoveAlternativeName(const X3DMajorVersion: Integer); |
|
This item is declared in ancestor TX3DFieldOrEvent. This item has no description. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 135). | |
| Public | function IsName(const S: string): boolean; |
|
This item is declared in ancestor TX3DFieldOrEvent. Returns if S matches current Name or one of the alternative names. Think about it like simple test "Name = S", but actually this checks also names added by AddAlternativeName method. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 140). | |
| Public | function NameForVersion(Version: TX3DVersion): string; overload; |
|
This item is declared in ancestor TX3DFieldOrEvent. Return how this field should be named for given VRML version. In almost all cases, this simply returns current Name. But it can also return a name added by AddAlternativeName method. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 145). | |
| Public | function NameForVersion(Writer: TX3DWriter): string; overload; |
|
This item is declared in ancestor TX3DFieldOrEvent. This item has no description. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 146). | |
| Public | function NiceName: string; |
|
This item is declared in ancestor TX3DFieldOrEvent. Nice and concise field description for user. Describes parent node type, name and field/event's name. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 159). | |
| Public | procedure SaveToStreamClassicIsClauses(Writer: TX3DWriter); |
|
This item is declared in ancestor TX3DFieldOrEvent. Save IS clauses to stream, only for classic encoding. For each IS clause, writeln field/event name followed by "IS" clause. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 163). | |
| Public | procedure Parse(Lexer: TX3DLexer; Reader: TX3DReader; IsClauseAllowed: boolean); |
|
This item is declared in ancestor TX3DField. Parse inits properties from Lexer. In this class, Parse only appends to IsClauseNames: if we stand on "IS" clause (see VRML 2.0 spec about "IS" clause) and IsClauseAllowed then we append specified identifier to IsClauseNames. If "IS" clause not found, we call ParseValue which should actually parse field's value. Descendants should override ParseValue. | |
| Public | procedure ParseXMLAttributeLexer(Lexer: TX3DLexer; Reader: TX3DReader); virtual; |
|
This item is declared in ancestor TX3DField.
Parse field value from X3D XML encoded attribute using a Lexer. Attributes in X3D are generally encoded such that normal | |
| Public | procedure FieldSaveToStream(Writer: TX3DWriter; FieldSaveWhenDefault: boolean = false; XmlAvoidSavingNameBeforeValue: boolean = false); |
|
This item is declared in ancestor TX3DField.
Save the field to the stream. Field name (if set, omitted if empty) and value are saved. Unless the current field value equals default value and FieldSaveWhenDefault is IS clauses are not saved here (because they often have to be treated specially anyway, for XML encoding, for prototype declarations etc.). | |
| Public | procedure SaveToStream(Writer: TX3DWriter); override; |
|
This item is declared in ancestor TX3DField. Save the field to the stream. This simply calls FieldSaveToStream(Writer). See FieldSaveToStream for more comments and when you need control over FieldSaveWhenDefault behavior. It doesn't actually save anything if field value is defined and equals default value. | |
| Public | function SaveToXml: TSaveToXmlMethod; override; |
|
This item is declared in ancestor TX3DField. This item has no description. Showing description inherited from TX3DFileItem.SaveToXml. How is this saved to X3D XML encoding. This determines when SaveToStream is called. It also cooperates with some SaveToStream implementations, guiding how the item is actually saved. By default it is sxChildElement. | |
| Public | function FastEqualsValue(SecondValue: TX3DField): boolean; virtual; |
|
This item is declared in ancestor TX3DField. Compare value of this field, with other field, fast. This compares only the values of the fields, not other properties (it doesn't care about names of the fields or such, or default values; only current values). In other words, it compares only the things copied by AssignValue. This tries to compare very fast, which means that for large (multi-valued) fields it may give up and answer Default implementation in this class ( | |
| Public | function EventIn: TX3DEvent; |
|
This item is declared in ancestor TX3DField.
Exposed events of this field. | |
| Public | function EventOut: TX3DEvent; |
|
This item is declared in ancestor TX3DField. This item has no description. | |
| Public | class function TypeName: String; deprecated 'use X3DType'; |
|
This item is declared in ancestor TX3DField. Warning: this symbol is deprecated: use X3DType This item has no description. | |
| Public | procedure AssignLerp(const A: Double; Value1, Value2: TX3DField); virtual; |
|
This item is declared in ancestor TX3DField. Assigns value to this node calculated from linear interpolation between two given nodes Value1, Value2. Just like other lerp functions in our units (like CastleVectors.Lerp). Like AssignValue, this copies only the current value. All other properties (like Name, IsClauseNames, ValueFromIsClause, default value) are untouched. There are some special precautions for this:
Exceptions raised
| |
| Public | function CanAssignLerp: boolean; virtual; |
|
This item is declared in ancestor TX3DField. Is AssignLerp usable on this field type?
Descendants implementors notes: In this class, this always returns | |
| Public | procedure AddAlternativeName(const AlternativeName: String; const X3DMajorVersion: Integer); override; |
|
This item is declared in ancestor TX3DField. This item has no description. Showing description inherited from TX3DFieldOrEvent.AddAlternativeName. Add alternative name for the same field/event, to be used in different VRML version. When VRML major version is exactly equal X3DMajorVersion, the AlternativeName should be used — for both reading and writing of this field/event. In some cases, when reading, we may also allow all versions (both original and alternative), but this is mostly for implementation simplicity — don't count on it. A special value 0 for X3DMajorVersion means that this is just an alternative name, that should be allowed when reading (as alternative to normal Name), and never used when writing. Alternative names is a very handy mechanism for cases when the only thing that changed between VRML versions is the field name. Example: Switch node's children/choice, LOD node's children/level, Polyline2D lineSegments/point. Note that this also works for ExposedEvents with exposed TX3DField: if a field has alternative names, then it's exposed events always also have appropriate alternative names. | |
| Public | procedure Changed; |
|
This item is declared in ancestor TX3DField. Notify ParentNode.Scene that the value of this field changed. | |
| Public | function ExecuteChange: TX3DChange; virtual; |
|
This item is declared in ancestor TX3DField. What happens when the value of this field changes. This is called, exactly once, by TCastleSceneCore.InternalChangedField to determine what must be done when we know that value of this field changed. In overridden descendants, this can also do something immediately. Overriding this is similar to registering your callback by EventOut.AddNotification, with two additional benefits:
So overridding this is closer to "do something when field value changes" than registering notification by EventOut.AddNotification. | |
| Public | procedure Send(Value: TX3DField); overload; |
|
This item is declared in ancestor TX3DField. Set the value of the field, notifying the scenes and events engine. This sets the value of this field in the nicest possible way for any possible TCastleSceneCore (with events on or off) containing the node with this field. Precise specification:
| |
| Public | procedure AddNotification(const Notification: TX3DEventReceive); |
|
This item is declared in ancestor TX3DField.
Notifications when exposed field received new value through VRML/X3D event. Use only for exposed fields. This is simply a shortcut for Note that this observes the "out" event (not the "in" event). This way you know inside the handler that the field value is already changed as appropriate. Inside "in" event handlers, you would not know this (it would depend on the order in which handlers are run, one "in" handler sets the field value). Note that "out" event handlers are executed before Scene is notified about the field value change (before TCastleSceneCore.InternalChangedField is called). This is also usually exactly what you want — you can change the scene graph inside the event handler (for example, load something on Inline.load or Inline.url changes), and let the TX3DField.ChangeAlways cause appropriate action on this change. | |
| Public | procedure RemoveNotification(const Notification: TX3DEventReceive); |
|
This item is declared in ancestor TX3DField. This item has no description. | |
| Public | constructor CreateUndefined(const AParentNode: TX3DFileItem; const AExposed: boolean; const AName: String); override; |
|
Construct a field allowing any children class. Suitable only for special cases. For example, in instantiated prototypes, we must initially just allow all children, otherwise valid prototypes with SFNode/MFNode would cause warnings when parsing. | |
| Public | constructor Create(const AParentNode: TX3DNode; const AExposed: boolean; const AName: String; const AAllowedChildrenClasses: array of TX3DNodeClass); overload; |
|
This item has no description. | |
| Public | constructor Create(const AParentNode: TX3DNode; const AExposed: boolean; const AName: String; const AAllowedChildrenClasses: TX3DNodeClassesList); overload; |
|
Constructor that takes a list of allowed children classes. Note that we copy the contents of AAllowedChildrenClasses, not the reference. | |
| Public | constructor Create(const AParentNode: TX3DNode; const AExposed: boolean; const AName: String; const AnAllowedChildrenFunctionality: TNodeFunctionalityClass); overload; |
|
Constructor that allows as children any implementor of given functionality. | |
| Public | destructor Destroy; override; |
|
This item has no description. | |
| Public | function GetEnumerator: TEnumerator; |
|
This item has no description. | |
| Public | procedure Replace(const Index: Integer; Node: TX3DNode); |
|
This item has no description. | |
| Public | procedure Add(Node: TX3DNode); overload; |
|
This item has no description. | |
| Public | procedure Add(Position: Integer; Node: TX3DNode); overload; |
|
This item has no description. | |
| Public | procedure Delete(Index: Integer); |
|
This item has no description. | |
| Public | function Remove(const Node: TX3DNode): Integer; |
|
Search list for given node, and, if found, remove it. Returns the index of removed item, or -1 if not found. | |
| Public | function Extract(Index: Integer): TX3DNode; |
|
Remove child with given Index, and return it, never freeing it. This is analogous to TX3DNode.ExtractChild, see there for more explanation. | |
| Public | procedure Clear; |
|
This item has no description. | |
| Public | procedure AssignItems(const SourceItems: TX3DNodeList); overload; |
|
This item has no description. | |
| Public | procedure AssignItems(const SourceItems: array of TX3DNode); overload; |
|
This item has no description. | |
| Public | procedure ParseValue(Lexer: TX3DLexer; Reader: TX3DReader); override; |
|
This item has no description. | |
| Public | procedure ParseXMLAttribute(const AttributeValue: String; Reader: TX3DReader); override; |
|
This item has no description. Showing description inherited from TX3DField.ParseXMLAttribute. Parse field value from X3D XML encoded attribute. Implementation in this class creates a Lexer to parse the string, and calls ParseXMLAttributeLexer. | |
| Public | procedure ParseXMLElement(Element: TDOMElement; Reader: TX3DReader); override; |
|
This item has no description. Showing description inherited from TX3DField.ParseXMLElement. Parse field's value from XML Element children. This is used to read SFNode / MFNode field value inside <field> (for interface declaration default field value) and <fieldValue> inside <ProtoInstance>. | |
| Public | function EqualsDefaultValue: boolean; override; |
|
This item has no description. Showing description inherited from TX3DField.EqualsDefaultValue.
Whether the value is equal to default. Returns always | |
| Public | function Equals(SecondValue: TX3DField): boolean; override; |
|
This item has no description. Showing description inherited from TX3DField.Equals.
All descendants (that add some property that should be compared) should override this like Result := (inherited Equals(SecondValue)) and (SecondValue is TMyType) and (TMyType(SecondValue).MyProperty = MyProperty);
The floating-point fields may be compared with a small epsilon tolerance by this method. Note that this *doesn't* compare the default values of two fields instances. This compares only the current values of two fields instances, and eventually some other properties that affect parsing (like names for TSFEnum and TSFBitMask) or allowed future values (like TSFFloat.MustBeNonnegative). | |
| Public | procedure Assign(Source: TPersistent); override; |
|
This item has no description. | |
| Public | procedure AssignValue(Source: TX3DField); override; |
|
This item has no description. Showing description inherited from TX3DField.AssignValue. Copies the current field value. Contrary to TPersistent.Assign, this doesn't copy the rest of properties. After setting, our ValueFromIsClause is always changed to
Descendants implementors notes: In this class, implementation takes care of setting our ValueFromIsClause to if Source is <appropriate class> then begin inherited; Value := Source.value; end else AssignValueRaiseInvalidClass(Source); | |
| Public | procedure AssignDefaultValueFromValue; override; |
|
This item has no description. Showing description inherited from TX3DField.AssignDefaultValueFromValue. Set field's default value from the current value. Note that for now this doesn't guarantee that every possible field's value can be stored as default value. In case of trouble, it will silently record "no default is known" information, so e.g. EqualsDefaultValue will always return | |
| Public | procedure UnassignDefaultValue; override; |
|
This item has no description. Showing description inherited from TX3DField.UnassignDefaultValue.
Remove default value, recording that "no default is known". In effect EqualsDefaultValue will always return | |
| Public | class function X3DType: String; override; |
|
This item has no description. Showing description inherited from TX3DField.X3DType.
Field type in X3D, like | |
| Public | class function CreateEvent(const AParentNode: TX3DFileItem; const AName: String; const AInEvent: boolean): TX3DEvent; override; |
|
This item has no description. Showing description inherited from TX3DField.CreateEvent. Create TX3DEvent descendant suitable as exposed event for this field. | |
| Public | procedure WarningIfChildNotAllowed(Child: TX3DNode); |
|
Checks is Child allowed on the list of nodes of this MFNode, and makes WritelnWarning if not. Check is allowed is done looking at AllowedChildrenAll and AllowedChildren properties. Child must not be WritelnWarning message will suggest that this Child is added to this node. In other words, you should only pass as Child a node that you want to add (e.g. by Add) to this field, otherwise WritelnWarning message will be a little unsensible. | |
| Public | function ChildAllowed(Child: TX3DNode): boolean; |
|
This item has no description. | |
| Public | procedure AssignDefaultItems(const SourceDefaultItems: TX3DNodeList); |
|
Operate on DefaultItems, just like analogous AssignItems and Clear. | |
| Public | procedure ClearDefault; |
|
This item has no description. | |
| Public | function Enumerate(Func: TEnumerateChildrenFunction): Pointer; |
|
Calls Func for all current children. Stops if Func returns something non-nil. The main use for this is to simplify implementation of TX3DNode.DirectEnumerateActive overrides in TX3DNode descendants. | |
| Public | procedure Send(const AValue: array of TX3DNode); overload; |
|
Set the field's value in a correct way (by sending X3D event, or at least notifying the parent scene). | |
| Public | function FindName(const AName: String): TX3DNode; |
|
Find node by name, For empty node name, always returns See also
| |
| Public | function IndexOfName(const AName: String): Integer; |
|
Find index of a node with given name, -1 if not found. | |
| Public | function IndexOf(const ANode: TX3DNode): Integer; |
|
Find index of a node , -1 if not found. | |
| Public | function Contains(const ANode: TX3DNode): Boolean; |
|
Is given ANode one of the values on the list. | |
Properties
| Public | property PositionInParent: Integer
read FPositionInParent write FPositionInParent default -1; |
|
This item is declared in ancestor TX3DFileItem. Position of this item within parent VRML/X3D node, used for saving the VRML/X3D graph to file. Default value -1 means "undefined". For normal usage and processing of VRML graph, this is totally not needed. This position doesn't dictate actual meaning of VRML graph. If you're looking to change order of nodes, you probably want to rather look at something like ReplaceItems within TMFNode or such. This field is purely a hint when encoding VRML file how to order VRML items (nodes, fields, routes, protos) within parent node or the VRML file. Reason: VRML allows non-unique node names. Each DEF XXX overrides all previous ("previous" in lexical sense, i.e. normal order of tokens in the file) DEF XXX with the same XXX, thus hiding previous node name "XXX". This means that when saving VRML file we have to be very careful about the order of items, such that e.g. all routes are specified when appropriate node names are bound. This is a relative position, relative to other See e.g. ../../../demo_models/x3d/tricky_def_use.x3dv for tests of some tricky layout. When reading such file we have to record | |
| Public | property X3DName: string read FX3DName; |
|
This item is declared in ancestor TX3DFieldOrEvent. Name of the field or event. Most fields/events are inside some X3D node, and then they have a non-empty name. But in some special cases we also use temporary fields with an empty name. Note that you cannot change this after object creation, since Name is used for various purposes (like to generate names for TX3DField.ExposedEvents). Note that this property is deliberately not called Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 67). | |
| Public | property Name: string read FX3DName; deprecated 'use X3DName'; |
|
This item is declared in ancestor TX3DFieldOrEvent. Warning: this symbol is deprecated: use X3DName This item has no description. Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 68). | |
| Public | property IsClauseNames[const Index: Integer]: string read GetIsClauseNames; |
|
This item is declared in ancestor TX3DFieldOrEvent. "IS" clauses of this field/event, used when this field/event is inside prototype definition. This is an array, as one item may have many "IS" clauses (for a field, only one "IS" clause should refer to another field; but you can have many "IS" clauses connecting events, also exposedField may have "IS" clause that should be interpreted actually as links to it's exposed events). See e.g. Note that having "IS" clauses doesn't mean that the field should be considered "without any value". This is not a good way of thinking, as an exposed field may have an "IS" clause, but linking it to an event, and thus such field has it's value (default value, if not specified in the file), event though it also has an "IS" clause. Although there is TX3DField.ValueFromIsClause, which indicates whether current value was obtained from "IS" clause. To be able to significantly optimize memory, we do not expose Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 101). | |
| Public | property ParentInterfaceDeclaration: TX3DFileItem
read FParentInterfaceDeclaration write FParentInterfaceDeclaration; |
|
This item is declared in ancestor TX3DFieldOrEvent. For fields contained in TX3DInterfaceDeclaration. This should always be Source: scene/x3d/castlefields_x3dfieldorevent.inc (line 154). | |
| Public | property ValueFromIsClause: boolean
read FValueFromIsClause write FValueFromIsClause; |
|
This item is declared in ancestor TX3DField. Does current field value came from expanding "IS" clause. If yes, then saving this field to stream will only save it's "IS" clauses, never saving actual value. | |
| Public | property Exposed: boolean read FExposed write SetExposed default false; |
|
This item is declared in ancestor TX3DField. Does this field generate/accept events, that is an "exposedField" (in VRML 2.0) or "inputOutput" (in X3D). | |
| Public | property ExposedEvents [InEvent: boolean]: TX3DEvent
read GetExposedEvents; |
|
This item is declared in ancestor TX3DField.
These are the set_xxx and xxx_changed events exposed by this field. | |
| Public | property ExposedEventsLinked: boolean
read FExposedEventsLinked write SetExposedEventsLinked
default true; |
|
This item is declared in ancestor TX3DField.
When You almost certainly want to leave this as That said, in special cases you may decide to break this. | |
| Public | property ChangeAlways: TX3DChange read FChangeAlways write FChangeAlways default chNone; |
|
This item is declared in ancestor TX3DField. What always happens when the value of this field changes. This is included in the ExecuteChange method result. So instead of using this property, you could always override ExecuteChange method. But often it's easier to use the property. By default this is chNone. See TX3DChange for possible values. | |
| Public | property Count: TListSize read GetCount write SetCount; |
|
This item is declared in ancestor TX3DMultField. Number of items in this field. Remember that increasing this generally sets new items to undefined values (see SetCount documentation of particular descendant for docs). So you usually want to initialize them afterwards to something correct. | |
| Public | property Items[const Index: Integer]: TX3DNode read GetItems write Replace; default; |
|
Items of this field. | |
| Public | property ItemsArray[Index: Integer]: TX3DNode read GetItems; deprecated 'use Items (default array property)'; |
|
Warning: this symbol is deprecated: use Items (default array property) This item has no description. | |
| Public | property ParentNode: TX3DNode read FParentNode; |
|
This item has no description. | |
| Public | property DefaultItems: TX3DNodeList read FDefaultItems; |
|
Lists default items of this field. Do not modify this list explicitly. Use only methods in this class like AssignDefaultItems (they take care of calling appropriate AddParentField / RemoveParentField, otherwise you could break reference-counting of nodes by ParentFields). | |
| Public | property DefaultValueExists: boolean
read FDefaultValueExists write FDefaultValueExists default false; |
|
This item has no description. | |
Generated by PasDoc 0.17.0.snapshot.