Class TCastleOrthographic
Unit
Declaration
type TCastleOrthographic = class(TCastleComponent)
Description
Subcomponent used in TCastleCamera.Orthographic to set orthographic projection parameters.
Do not create instances of this class yourself, these are automatically created by TCastleCamera.
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastleOrthographic
Overview
Methods
constructor Create(AOwner: TComponent); override; |
|
destructor Destroy; override; |
|
function PropertySections(const PropertyName: String): TPropertySections; override; |
|
procedure CustomSerialization(const SerializationProcess: TSerializationProcess); override; |
|
function EffectiveWidth: Single; deprecated 'use EffectiveRect.Width'; |
|
function EffectiveHeight: Single; deprecated 'use EffectiveRect.Height'; |
Properties
property Origin: TVector2 read FOrigin write SetOrigin; |
|
property EffectiveRect: TFloatRectangle read FEffectiveRect; |
|
property Scale: Single read FScale write SetScale default 1; deprecated 'just multiply Width or Height instead of using this'; |
|
property Stretch: Boolean read FStretch write SetStretch default false; experimental; |
|
property Width: Single read FWidth write SetWidth default 0; |
|
property Height: Single read FHeight write SetHeight default 0; |
|
property OriginPersistent: TCastleVector2Persistent read FOriginPersistent ; |
Description
Methods
constructor Create(AOwner: TComponent); override; |
|
This item has no description. |
destructor Destroy; override; |
|
This item has no description. |
function PropertySections(const PropertyName: String): TPropertySections; override; |
|
This item has no description. Showing description inherited from TCastleComponent.PropertySections. Section where to show property in the editor. |
procedure CustomSerialization(const SerializationProcess: TSerializationProcess); override; |
|
This item has no description. Showing description inherited from TCastleComponent.CustomSerialization. Override this method to call various methods of SerializationProcess, which in turn allows to serialize/deserialize things that are not published. This allows to serialize/deserialize with more freedom, e.g. to serialize/deserialize some private field. |
function EffectiveWidth: Single; deprecated 'use EffectiveRect.Width'; |
|
Warning: this symbol is deprecated: use EffectiveRect.Width This item has no description. |
function EffectiveHeight: Single; deprecated 'use EffectiveRect.Height'; |
|
Warning: this symbol is deprecated: use EffectiveRect.Height This item has no description. |
Properties
property Origin: TVector2 read FOrigin write SetOrigin; |
|
Additional translation of the camera. The camera movement applied here is always scaled by the calculated orthographic projection width and height. By default this equals (0,0) which means that Camera.Translation determines what is visible in the left-bottom corner of the viewport. This matches the typical 2D drawing coordinates used throughout our engine. In other words, if the camera is at position (0,0,whatever), then the (0,0) position in 2D is in the left-bottom corner of the TCastleViewport. You can change it e.g. to (0.5,0.5) to move the camera to the middle of the viewport. In effect, if the camera is at position (0,0,whatever), then the (0,0) position is in the center of the TCastleViewport. Both values of
|
property EffectiveRect: TFloatRectangle read FEffectiveRect; |
|
Currently used projection dimensions, calculated following the algorithm described at Width and Height, taking into account sizes of the viewport using this camera. |
property Scale: Single read FScale write SetScale default 1; deprecated 'just multiply Width or Height instead of using this'; |
|
Warning: this symbol is deprecated: just multiply Width or Height instead of using this Scales the projection size derived from Width and Height. The effect of this scale is also affected by the Origin. When Origin is zero, this behaves like scaling around left-bottom corner of the viewport. When Origin is (0.5,0.5), this behaves like scaling around the middle of the viewport. |
property Stretch: Boolean read FStretch write SetStretch default false; experimental; |
|
Warning: this symbol is experimental.
Allow non-proportional |
property Width: Single read FWidth write SetWidth default 0; |
|
Orthographic projection width and height. You can leave one or both of them as zero (default) to automatically calculate effective projection width and height (in EffectiveWidth and EffectiveHeight):
In all the cases, the resulting size is also multiplied by Scale, by default 1.0. You can read EffectiveWidth and EffectiveHeight to learn the actual projection width and height, calculated using the above algorithm. |
property Height: Single read FHeight write SetHeight default 0; |
|
This item has no description. |
property OriginPersistent: TCastleVector2Persistent read FOriginPersistent ; |
|
Origin that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write Origin directly. See also
|
Generated by PasDoc 0.16.0-snapshot.