Class TCastleSceneManager

Unit

Declaration

type TCastleSceneManager = class(TCastleAutoNavigationViewport)

Description

Warning: this symbol is deprecated: use TCastleViewport to render scenes. To have the same initial behavior, set FullSize, AutoCamera and AutoNavigation to true

Deprecated way to manage transformations and scenes. To upgrade: - use TCastleViewport - set FullSize, AutoCamera and AutoNavigation to true.

Hierarchy

Overview

Methods

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure Render; override;
Public function GravityUp: TVector3; deprecated 'use Camera.GravityUp';
Public function PhysicsProperties: TPhysicsProperties; deprecated 'use Items.PhysicsProperties';

Properties

Public property MoveLimit: TBox3D read GetMoveLimit write SetMoveLimit; deprecated 'use Items.MoveLimit';
Public property Viewports: TCastleViewportList read FViewports;
Public property HeadlightNode: TAbstractLightNode read GetHeadlightNode write SetHeadlightNode; deprecated 'use Items.HeadlightNode';
Public property MainCamera: TCastleCamera read GetMainCamera write SetMainCamera; deprecated 'use Items.MainCamera';
Public property TimeScale: Single read GetTimeScale write SetTimeScale default 1; deprecated 'use Items.TimeScale';
Public property MainScene: TCastleScene read GetMainSceneInternal write SetMainScene; deprecated 'use Items.MainScene';
Public property UseHeadlight: TUseHeadlight read GetUseHeadlight write SetUseHeadlight default hlMainScene; deprecated 'use Items.UseHeadlight';
Published property DefaultViewport: boolean read FDefaultViewport write SetDefaultViewport default true;
Published property FullSize default true;
Published property AutoCamera default true;
Published property AutoNavigation default true;

Description

Methods

Public constructor Create(AOwner: TComponent); override;

This item has no description.

Public destructor Destroy; override;

This item has no description.

Public procedure Render; override;

This item has no description. Showing description inherited from TCastleUserInterface.Render.

Render a control. Called only when Exists and render context is initialized.

Do not call this method. It will be automatically called by the engine when needed. It will be called when UI is part of TCastleContainer.Controls list or rendered (e.g. for off-screen rendering) by TCastleContainer.RenderControl.

You should only override this method.

See https://castle-engine.io/manual_2d_ui_custom_drawn.php for examples what you can put here.

You can depend on some OpenGL state being set before calling this method. You can depend on it being set, and you can carelessly change it. This state we set:

  • Viewport is set to include whole container.

  • Depth test is off.

  • For ancient fixed-function pipeline (see TGLFeatures.RequestCapabilities):

    • The 2D orthographic projection is always set at the beginning. Useful for 2D controls.

    • The modelview matrix is set to identity. The matrix mode is always modelview.

    • The raster position is set to (0,0). The (deprecated) WindowPos is also set to (0,0).

    • Texturing, lighting, fog is off.

Beware that GLSL RenderContext.CurrentProgram has undefined value when this is called. You should always set it, before making direct OpenGL drawing calls (all the engine drawing routines do it already, this is only a concern if you make direct OpenGL / OpenGLES calls).

Public function GravityUp: TVector3; deprecated 'use Camera.GravityUp';

Warning: this symbol is deprecated: use Camera.GravityUp

Up vector, according to gravity. Gravity force pulls in -GravityUp direction.

Public function PhysicsProperties: TPhysicsProperties; deprecated 'use Items.PhysicsProperties';

Warning: this symbol is deprecated: use Items.PhysicsProperties

See TCastleAbstractRootTransform.PhysicsProperties.

Properties

Public property MoveLimit: TBox3D read GetMoveLimit write SetMoveLimit; deprecated 'use Items.MoveLimit';

Warning: this symbol is deprecated: use Items.MoveLimit

Limit the movement allowed by TCastleAbstractRootTransform.WorldMoveAllowed. Ignored when empty (default).

See also
TCastleAbstractRootTransform.MoveLimit
Limit the movement allowed by WorldMoveAllowed.
Public property Viewports: TCastleViewportList read FViewports;

List of viewports connected to this scene manager. This contains all TCastleViewport instances that have TCastleViewport.SceneManager set to us. Also it contains Self (this very scene manager) if and only if DefaultViewport = True (because when DefaultViewport, scene manager acts as an additional viewport too).

This list is read-only from the outside! It's automatically managed in this unit (when you change TCastleViewport.SceneManager or TCastleSceneManager.DefaultViewport, we automatically update this list as appropriate).

Public property HeadlightNode: TAbstractLightNode read GetHeadlightNode write SetHeadlightNode; deprecated 'use Items.HeadlightNode';

Warning: this symbol is deprecated: use Items.HeadlightNode

See TCastleRootTransform.HeadlightNode.

Public property MainCamera: TCastleCamera read GetMainCamera write SetMainCamera; deprecated 'use Items.MainCamera';

Warning: this symbol is deprecated: use Items.MainCamera

See TCastleAbstractRootTransform.MainCamera.

Public property TimeScale: Single read GetTimeScale write SetTimeScale default 1; deprecated 'use Items.TimeScale';

Warning: this symbol is deprecated: use Items.TimeScale

See TCastleAbstractRootTransform.TimeScale.

Public property MainScene: TCastleScene read GetMainSceneInternal write SetMainScene; deprecated 'use Items.MainScene';

Warning: this symbol is deprecated: use Items.MainScene

See TCastleRootTransform.MainScene.

Public property UseHeadlight: TUseHeadlight read GetUseHeadlight write SetUseHeadlight default hlMainScene; deprecated 'use Items.UseHeadlight';

Warning: this symbol is deprecated: use Items.UseHeadlight

See TCastleRootTransform.UseHeadlight.

Published property DefaultViewport: boolean read FDefaultViewport write SetDefaultViewport default true;

Should we render the 3D world in a default viewport that covers the whole window. This is usually what you want. For more complicated uses, you can turn this off, and use explicit TCastleViewport (connected to this scene manager by TCastleViewport.SceneManager property) for making your world visible.

Published property FullSize default true;

This item has no description. Showing description inherited from TCastleUserInterface.FullSize.

When FullSize, the control will always fill the whole parent area.

Published property AutoCamera default true;

This item has no description. Showing description inherited from TCastleViewport.AutoCamera.

Assign initial camera properties (initial position, direction, up, TCastleCamera.ProjectionNear) by looking at the initial world (Items) when rendering the first frame.

The AssignDefaultCamera is automatically called only if this property is True.

Also, only if this property is True, we synchronize camera when X3D Viewpoint node changes, or a new X3D Viewpoint node is bound.

By default it is False, which means you control Camera properties on your own.

Published property AutoNavigation default true;

This item has no description. Showing description inherited from TCastleAutoNavigationViewport.AutoNavigation.

Assign sensible Navigation looking at the initial world (Items) if it is not assigned.

This also allows to later synchronize navigation properties when X3D NavigationInfo node changes, or a new NavigationInfo node is bound.

By default it is False, which means that you control Navigation on your own.


Generated by PasDoc 0.16.0-snapshot.