Class TShapeTreeLOD

Unit

Declaration

type TShapeTreeLOD = class(TShapeTreeGroup)

Description

LOD (level of detail) alternative in the TShapeTree. At most one child (from it's children list) is active at a given time.

Corresponds to X3D (or VRML 2.0) TLodNode.

( Note for VRML 1.0: This doesn't correspond to VRML 1.0 LOD node in TLODNode_1, which is more difficult to handle, as it may affect also other nodes after LOD. )

The scene code must call UpdateLevel whenever the camera (in scene coordinates) potentially changed.

Source: src/scene/castleshapes.pas (line 999).

Hierarchy

Overview

Fields

Public InverseTransform: TMatrix4;

Methods

Public function UpdateLevel(const CameraLocalPosition: TVector3; const ProcessEvents: Boolean): Boolean;
Public function DebugInfoWithoutChildren: String; override;

Properties

Public property Node: TLODNode read FNode write FNode;
Public property Level: Cardinal read FLevel default 0;

Description

Fields

Public InverseTransform: TMatrix4;

This item has no description.

Source: src/scene/castleshapes.pas (line 1012).

Methods

Public function UpdateLevel(const CameraLocalPosition: TVector3; const ProcessEvents: Boolean): Boolean;

Calculate and set new value for Level, thus changing which child is the active one.

Also, if ProcessEvents, send X3D output event Node.EventLevel_Changed (whenever it should be send).

Looks at LOD node in Node and transformation in InverseTransform to choose the current level.

Returns

Whether the level changed.

Source: src/scene/castleshapes.pas (line 1025).

Public function DebugInfoWithoutChildren: String; override;

This item has no description. Showing description inherited from TShapeTree.DebugInfoWithoutChildren.

Describe this shape, not recursively.

Source: src/scene/castleshapes.pas (line 1041).

Properties

Public property Node: TLODNode read FNode write FNode;

This item has no description.

Source: src/scene/castleshapes.pas (line 1013).

Public property Level: Cardinal read FLevel default 0;

Current level, that is index of the active child of this LOD node. This is always < Children.Count, unless there are no children. In this case it's 0.

Should be modified UpdateLevel.

By default we use the first (highest-detail) LOD as active.

Source: src/scene/castleshapes.pas (line 1035).


Generated by PasDoc 0.17.0.snapshot.