Castle Game Engine: CastleShapes: Class TShapeTree

# Class TShapeTree
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleShapes ## Declaration `type TShapeTree = class(TObject)` ## Description Tree of shapes. Although VRML/X3D model already provides the tree (graph of VRML/X3D nodes), it's a little too complicated to be used at each render call. It's especially true for VRML <= 1.0 (where properties may "leak out" from one node to the next), VRML/X3D >= 2.0 cleaned a lot here but still some work must be done when traversing (like accumulating transformations). So we process VRML/X3D tree to this tree, which is much simpler with all the geometry nodes (TAbstractGeometryNode) along with their state (TX3DGraphTraverseState) as leafs (TShape). ## Hierarchy TObject TShapeTree ## Overview ### Methods
| `constructor Create(AParentScene: TObject);`
| `procedure Traverse(Func: TShapeTraverseFunc; const OnlyActive: boolean; const OnlyVisible: boolean = false; const OnlyCollidable: boolean = false); virtual; abstract;`
| `function ShapesCount(const OnlyActive: boolean; const OnlyVisible: boolean = false; const OnlyCollidable: boolean = false): Cardinal; virtual; abstract;`
| `function FindGeometryNodeName(const GeometryNodeName: string; OnlyActive: boolean = false): TShape;`
| `function FindShapeWithParentNamed(const ParentNodeName: string; OnlyActive: boolean = false): TShape;`
| `procedure EnumerateTextures(Enumerate: TEnumerateShapeTexturesFunction); virtual; abstract;`
| `function DebugInfo(const Indent: string = ''): string; virtual; abstract;`
### Properties
| `property ParentScene: TObject read FParentScene write FParentScene;`
## Description ### Methods
| `constructor Create(AParentScene: TObject);`
| `procedure Traverse(Func: TShapeTraverseFunc; const OnlyActive: boolean; const OnlyVisible: boolean = false; const OnlyCollidable: boolean = false); virtual; abstract;`
| `function ShapesCount(const OnlyActive: boolean; const OnlyVisible: boolean = false; const OnlyCollidable: boolean = false): Cardinal; virtual; abstract;`
| `function FindGeometryNodeName(const GeometryNodeName: string; OnlyActive: boolean = false): TShape;`
Look for shape with Geometry.NodeName = GeometryNodeName. Returns `Nil` if not found.
| `function FindShapeWithParentNamed(const ParentNodeName: string; OnlyActive: boolean = false): TShape;`
Look for shape with Geometry that has a parent named ParentNodeName. Parent is searched by Geometry.TryFindParentNodeByName. Returns `Nil` if not found.
| `procedure EnumerateTextures(Enumerate: TEnumerateShapeTexturesFunction); virtual; abstract;`
Enumerate all single texture nodes (possibly) used by the shapes. This looks into all shapes (not only active, so e.g. it looks into all Switch/LOD children, not only the chosen one). This looks into the Appearance.texture field (and if it's MultiTexture, looks into it's children). Also it looks into shaders textures. Also, for VRML 1.0, looks into LastNodes.Texture2.
| `function DebugInfo(const Indent: string = ''): string; virtual; abstract;`
### Properties
| `property ParentScene: TObject read FParentScene write FParentScene;`
Parent TCastleSceneCore instance. This cannot be declared here as TCastleSceneCore (this would create circular unit dependency), but it always is TCastleSceneCore.
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:12