Class TInlineNode

Unit

Declaration

type TInlineNode = class(TAbstractInternalGroupingNode)

Description

Embed another X3D scene into the current scene.

Hierarchy

Overview

Methods

Protected procedure BeforeTraverse(StateStack: TX3DGraphTraverseStateStack); override;
Protected procedure AfterTraverse(StateStack: TX3DGraphTraverseStateStack); override;
Protected procedure AfterLoadInlined; virtual;
Protected procedure ParseAfter(Reader: TX3DReaderNames); override;
Protected function DeepCopyCore(CopyState: TX3DNodeDeepCopyState): TX3DNode; override;
Public constructor Create(const AX3DName: String = ''; const ABaseUrl: String = ''); override;
Public class function VRML1ChildrenSaveToStream: boolean; override;
Public procedure LoadInlined(CanReload: boolean; const CurrentLengthConversionFactor: Float = 1.0; const Exported: TX3DNodeNames = nil);
Public procedure UnLoadInlined;
Public procedure LoadedInlineDirectly;
Public procedure CreateNode; override;
Public class function ClassX3DType: string; override;
Public procedure SetUrl(const Value: array of string); overload;
Public procedure SetUrl(const Value: TCastleStringList); overload;

Properties

Public property Inlined: TX3DRootNode read FInlined;
Public property FdLoad: TSFBool read FFdLoad;
Public property Load: Boolean read GetLoad write SetLoad;
Public property FdUrl: TMFString read FFdUrl;
Public property FdBboxCenter: TSFVec3f read FFdBboxCenter;
Public property BBox: TBox3D read GetBBox write SetBBox;
Public property FdBboxSize: TSFVec3f read FFdBboxSize;

Description

Methods

Protected procedure BeforeTraverse(StateStack: TX3DGraphTraverseStateStack); override;
 
Protected procedure AfterTraverse(StateStack: TX3DGraphTraverseStateStack); override;
 
Protected procedure AfterLoadInlined; virtual;

You can override this to do anything after the Inline children were loaded. It's called only after actual loading occurred, e.g. it's not called when LoadInlined was called on the already-loaded node with CanReload = False.

Protected procedure ParseAfter(Reader: TX3DReaderNames); override;
 
Protected function DeepCopyCore(CopyState: TX3DNodeDeepCopyState): TX3DNode; override;
 
Public constructor Create(const AX3DName: String = ''; const ABaseUrl: String = ''); override;
 
Public class function VRML1ChildrenSaveToStream: boolean; override;
 
Public procedure LoadInlined(CanReload: boolean; const CurrentLengthConversionFactor: Float = 1.0; const Exported: TX3DNodeNames = nil);

Load inlined content now. If Inlined is already loaded: if CanReload = True then it will be freed and loaded again, else (if CanReload = False) nothing will happen.

Note that this has a really simple support for "load" field (this concerns VRML 97 amendment 1 "InlineLoadControl.load" and X3D (actually used also in VRML 97 handling) "Inline.load" fields). It simply doesn't do any loading when "load" = False.

Note that this doesn't perform setting the "load" field, or sending any notifications to Scene about "load" field. It's the caller's job to keep loaded state synchronized with "load" field value.

LoadInlined(false) will be called automatically, to ensure the inlined contents are always loaded. It will be called at the end of Parse (this is needed to handle VRML/X3D IMPORT/EXPORT mechanism), it will also be called in BeforeTraverse (in case you constructed node by code, not by parsing; this also happens when node was made by expanding a PROTO).

Parameters
Exported
If non-nil, we will assign here node names exported from the file. Used to handle IMPORT/EXPORT X3D mechanism.
Public procedure UnLoadInlined;
 
Public procedure LoadedInlineDirectly;

Call this to indicate that you loaded the inline contents directly, by using AddChild yourself.

Public procedure CreateNode; override;
 
Public class function ClassX3DType: string; override;
 
Public procedure SetUrl(const Value: array of string); overload;
 
Public procedure SetUrl(const Value: TCastleStringList); overload;
 

Properties

Public property Inlined: TX3DRootNode read FInlined;

The inlined content (loaded from inlined url). Nil if not yet loaded, or no loading was successful.

This is also kept in VRML 1.0 children list as VRML1Children[0], but for future it's better to not depend on that. But it will always be enumerated by things like TX3DNode.EnumerateNodes.

Public property FdLoad: TSFBool read FFdLoad;

Internal wrapper for property Load. This wrapper API may change, we advise to access simpler Load instead.

Public property Load: Boolean read GetLoad write SetLoad;
 
Public property FdUrl: TMFString read FFdUrl;

Internal wrapper for property Url. This wrapper API may change, we advise to access simpler Url instead.

Public property FdBboxCenter: TSFVec3f read FFdBboxCenter;

Internal wrapper for property BboxCenter. This wrapper API may change, we advise to access simpler BboxCenter instead.

Public property BBox: TBox3D read GetBBox write SetBBox;
 
Public property FdBboxSize: TSFVec3f read FFdBboxSize;

Internal wrapper for property BboxSize. This wrapper API may change, we advise to access simpler BboxSize instead.


Generated by PasDoc 0.16.0.