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.

Hierarchy

Overview

Methods

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

Properties

Public property LODNode: TLODNode read FLODNode write FLODNode;
Public property Level: Cardinal read FLevel default 0;

Description

Methods

Public function LODInverseTransform: PMatrix4;

This item has no description.

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 LODNode.EventLevel_Changed (whenever it should be send).

Looks at LOD node in LODNode and transformation in LODInverseTransform to choose the current level.

Returns

Whether the level changed.

Public function DebugInfoWithoutChildren: String; override;

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

Describe this shape, not recursively.

Properties

Public property LODNode: TLODNode read FLODNode write FLODNode;

This item has no description.

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.


Generated by PasDoc 0.16.0-snapshot.