Introduction
Units
Class Hierarchy
Classes, Interfaces, Objects and Records
Types
Variables
Constants
Functions and Procedures
Identifiers
X3DNodes
type TAbstractGroupingNode = class(TAbstractChildNode)
This is a VRML/X3D >= 2.0 grouping node. This will push/pop full TX3DGraphTraverseState in Before/AfterTraverse. It also propagates DirectionalLights in any child to all children in VRML2ActiceLights.
To keep X3D hierarchy, this descends from X3DChildNode. This way TAbstractX3DGroupingNode and TStaticGroupNode inherit also from X3DChildNode.
function SeparateGroup: boolean; virtual;
procedure BeforeTraverse(StateStack: TX3DGraphTraverseStateStack); override;
procedure AfterTraverse(StateStack: TX3DGraphTraverseStateStack); override;
procedure ApplyTransform(State: TX3DGraphTraverseState); 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 http://castle-engine.sourceforge.net/x3d_extensions.php#section_ext_wwwinline_separate
True
False
Change State.Transform 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.
ApplyTransform