Class TAbstractGroupingNode

Unit

Declaration

type TAbstractGroupingNode = class(TAbstractInternalGroupingNode)

Description

Base node that contains children nodes.

Hierarchy

Overview

Methods

Public constructor Create(const AX3DName: String = ''; const ABaseUrl: String = ''); override;
Public procedure AddChildren(const Children: array of TAbstractChildNode; const AllowDuplicates: Boolean = true); overload;
Public procedure AddChildren(const Child: TAbstractChildNode; const AllowDuplicates: Boolean = true); overload;
Public procedure RemoveChildren(const Children: array of TAbstractChildNode); overload;
Public procedure RemoveChildren(const Child: TAbstractChildNode); overload;
Public procedure ClearChildren;
Public procedure CreateNode; override;
Public class function ClassX3DType: string; override;

Properties

Public property EventAddChildren: TMFNodeEvent read FEventAddChildren;
Public property EventRemoveChildren: TMFNodeEvent read FEventRemoveChildren;
Public property FdChildren: TMFNode read FFdChildren;
Public property FdBboxCenter: TSFVec3f read FFdBboxCenter;
Public property BBox: TBox3D read GetBBox write SetBBox;
Public property FdBboxSize: TSFVec3f read FFdBboxSize;
Public property FdVisible: TSFBool read FFdVisible;
Public property Visible: Boolean read GetVisible write SetVisible;
Public property FdBboxDisplay: TSFBool read FFdBboxDisplay;
Public property BboxDisplay: Boolean read GetBboxDisplay write SetBboxDisplay;

Description

Methods

Public constructor Create(const AX3DName: String = ''; const ABaseUrl: String = ''); override;

This item has no description. Showing description inherited from TX3DNode.Create.

Constructor. Initializes various properties:

  • Name, BaseUrl are initialized from given parameters.

  • The Fields, Events lists are filled in every descendant, to have all the fields/events defined by the specification.

  • DefaultContainerField, and other node-specific stuff, is filled in descendants. This is actually implemented in CreateNode, that is called at the end of this constructor.

Public procedure AddChildren(const Children: array of TAbstractChildNode; const AllowDuplicates: Boolean = true); overload;

Add the nodes as children.

By default, adding the same node multiple times makes the node present on the list multiple times. This AddChildren behavior is consistent with how FdChildren.Add(Child) behaves, and consistent with how RemoveChildren works (it removes only a single copy in case of duplicates). Our engine allows duplicates on the children list — you can specify them in the X3D file, or you can add them using FdChildren.Add.

If you specify AllowDuplicates = False, then adding a node that already exists on the children list is ignored. This has a tiny performance hit (we need to check for existence first), but it is consistent with how X3D event "addChildren" should behave according to the spec. The X3D specification doesn't allow duplicates on the children list.

This propagates the changes appropriately to the parent TCastleSceneCore, calling TCastleSceneCore.ChangedAll or something similar.

Public procedure AddChildren(const Child: TAbstractChildNode; const AllowDuplicates: Boolean = true); overload;

This item has no description.

Public procedure RemoveChildren(const Children: array of TAbstractChildNode); overload;

Remove the nodes from the children list. Removing a node that does not exist on the children list is ignored.

If a node exists on the current children list multiple times, then a single occurrence of this node is removed, for each occurrence of this node in the parameters list.

This propagates the changes appropriately to the parent TCastleSceneCore, calling TCastleSceneCore.ChangedAll or something similar.

Public procedure RemoveChildren(const Child: TAbstractChildNode); overload;

This item has no description.

Public procedure ClearChildren;

Clear all children from the list. This automatically propagates the changes appropriately to the parent TCastleSceneCore.

Public procedure CreateNode; override;

This item has no description. Showing description inherited from TAbstractChildNode.CreateNode.

Automatically generated node properties.

Do not edit this file manually! To add new properties: - add them to the text files in tools/internal/x3d-nodes-to-pascal/nodes-specification/ , - and regenerate include files by running x3d-nodes-to-pascal

Public class function ClassX3DType: string; override;

This item has no description. Showing description inherited from TX3DNode.ClassX3DType.

Node type name in VRML/X3D, for this class. Normal VRML/X3D node classes should override this to return something non-empty, and then X3DType automatically will return the same value.

Empty for classes that don't have a hardcoded VRML/X3D node name, like a special TX3DUnknownNode. Such special classes should override then X3DType to return actual non-empty name there.

You usually should call X3DType. The only use of this method is that it works on classes (it's "class function"), without needing at actual instance.

Properties

Public property EventAddChildren: TMFNodeEvent read FEventAddChildren;

This item has no description.

Public property EventRemoveChildren: TMFNodeEvent read FEventRemoveChildren;

This item has no description.

Public property FdChildren: TMFNode read FFdChildren;

Internal wrapper for property Children. This wrapper API may change, we advise to access simpler Children 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;

You can provide a manually-calculated bounding box of the group here, for optimization purposes. Ignored for now. Leave this field as empty (TBox3D.Empty) to let the engine calculate best bounding box automatically.

See also
TAbstractShapeNode.BBox
You can provide a manually-calculated bounding box of the shape here, for optimization purposes.
Public property FdBboxSize: TSFVec3f read FFdBboxSize;

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

Public property FdVisible: TSFBool read FFdVisible;

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

Public property Visible: Boolean read GetVisible write SetVisible;

Is this group visible (not implemented yet). While this is not implemented for an entire group, note that you can use TAbstractShapeNode.Render to toggle visibility of each shape.

Public property FdBboxDisplay: TSFBool read FFdBboxDisplay;

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

Public property BboxDisplay: Boolean read GetBboxDisplay write SetBboxDisplay;

Is the bounding box of this group visible (not implemented yet). While this is not implemented for an X3D group, note that you can use TDebugTransformBox to easily display bounding box of a whole TCastleTransform.


Generated by PasDoc 0.16.0.