Class T2DSceneManager
Unit
Castle2DSceneManager
Declaration
type T2DSceneManager = class(TCastleSceneManager)
Description
Scene manager best suited for 2D worlds.
Features:
By default creates camera looks down in -Z, good when your world spans in XY plane. And TUniversalCamera.NavigationType is ntNone, which means that no automatic way to move camera in the world is possible, you want to program your own movement for 2D.
Sets 2D projection. By default (see CalculateProjection) our visible X range is [0..window width in pixels], visible Y is [0..window height in pixels].
Such projection is set regardless of the viewpoints defined in MainScene (this is unlike ancestor TCastleSceneManager, that sets projection using a flexible algorithm that takes into account VRML/X3D viewpoints in MainScene).
Sets RenderStyle = rs2D by default, which makes it possible to place the scene manager rendering in the middle of other 2D controls (for example, over some 2D background and before some 2D buttons.)
Sets Transparent = True by default, which means that background underneath will be visible. Useful for 2D games where you usually have an image or another background underneath, like TCastleImage or TCastleSimpleBackground.
Hierarchy
Overview
Fields
Methods
Properties
Description
Fields
 |
internal const DefaultProjectionSpan = 1000.0; |
|
Methods
 |
constructor Create(AOwner: TComponent); override; |
|
 |
function CreateDefaultCamera(AOwner: TComponent): TCamera; override; |
|
Properties
 |
property RenderStyle default rs2D; |
|
 |
property ProjectionHeight: Single
read FProjectionHeight write FProjectionHeight default 1; |
|
 |
property CurrentProjectionWidth: Single read FCurrentProjectionWidth; |
|
 |
property CurrentProjectionHeight: Single read FCurrentProjectionHeight; |
|
 |
property ProjectionSpan: Single
read FProjectionSpan write FProjectionSpan default DefaultProjectionSpan; |
|
 |
property Transparent default true; |
|
Generated by PasDoc 0.14.0.
|