Class TAbstractGroupingNode

Unit

Declaration

type TAbstractGroupingNode = class(TAbstractChildNode)

Description

Base node that may contain children nodes. Note that this descends from TAbstractChildNode, so it can be inserted as child of another grouping node. So, you can create a hierarchy of nodes with any depth.

Hierarchy

Overview

Methods

Protected function SeparateGroup: boolean; virtual;
Protected procedure BeforeTraverse(StateStack: TX3DGraphTraverseStateStack); override;
Protected procedure AfterTraverse(StateStack: TX3DGraphTraverseStateStack); override;
Protected procedure ApplyTransform(const State: TX3DGraphTraverseState); virtual;
Protected procedure ApplyTransform(var Transformation: TTransformation); virtual;
Public procedure CreateNode; override;
Public destructor Destroy; override;

Description

Methods

Protected function SeparateGroup: boolean; virtual;

If True (default implementation in this class), then this really behaves like a grouping node. If False, this allows everything to "leak out" (transform changes, VRML 1.0 state changes etc.). Possibility useful for VRML 1.0 extension https://castle-engine.io/x3d_extensions.php#section_ext_wwwinline_separate

Protected procedure BeforeTraverse(StateStack: TX3DGraphTraverseStateStack); override;
 
Protected procedure AfterTraverse(StateStack: TX3DGraphTraverseStateStack); override;
 
Protected procedure ApplyTransform(const State: TX3DGraphTraverseState); virtual;

Change State.Transformation for children nodes.

This should be done here, not in overriden BeforeTraverse. Reason: for storing ClipPlanes transformations, we need to know transformed matrix inside TAbstractGroupingNode.BeforeTraverse implementation. And we also do StateStack.Push inside TAbstractGroupingNode.BeforeTraverse implementation... So ApplyTransform must happen in the middle of TAbstractGroupingNode.BeforeTraverse call.

Almost all descendants should override only the overload changing TTransformation.

Protected procedure ApplyTransform(var Transformation: TTransformation); virtual;
 
Public procedure CreateNode; override;
 
Public destructor Destroy; override;
 

Generated by PasDoc 0.16.0.