Class TCastlePerspective
Unit
Declaration
type TCastlePerspective = class(TCastleComponent)
Description
Subcomponent used in TCastleCamera.Perspective to set perspective projection parameters.
Do not create instances of this class yourself, these are automatically created by TCastleCamera.
Source: transform/castletransform_camera.inc (line 51).
Hierarchy
- TObject
- TPersistent
- TComponent
- TCastleComponent
- TCastlePerspective
Overview
Constants
| Public | DefaultFieldOfView = Pi / 4; |
| Public | DefaultFieldOfViewAxis = faSmallest; |
Methods
| Protected | function GetInternalText: String; virtual; |
| Protected | procedure SetInternalText(const Value: String); virtual; |
| Protected | procedure SetName(const Value: TComponentName); override; |
| Protected | procedure TranslateProperties(const TranslatePropertyEvent: TTranslatePropertyEvent); virtual; |
| Public | destructor Destroy; override; |
| Public | procedure CustomSerialization(const SerializationProcess: TSerializationProcess); virtual; |
| Public | procedure SetTransient; |
| Public | procedure AddNonVisualComponent(const NonVisualComponent: TComponent); |
| Public | procedure InsertNonVisualComponent(const Index: Integer; const NonVisualComponent: TComponent); |
| Public | procedure RemoveNonVisualComponent(const NonVisualComponent: TComponent); |
| Public | function NonVisualComponentsIndexOf(const NonVisualComponent: TComponent): Integer; |
| Public | function NonVisualComponentsCount: Integer; |
| Public | function NonVisualComponentsEnumerate: TNonVisualComponentsEnumerator; |
| Public | function ValueIsStreamed: Boolean; virtual; |
| Public | procedure DesignerInfo(const SList: TStrings); virtual; |
| Public | procedure DesignerWarnings(const SList: TStrings); virtual; |
| Public | constructor Create(AOwner: TComponent); override; |
| Public | function PropertySections(const PropertyName: String): TPropertySections; override; |
Properties
| Public | property NonVisualComponents [const Index: Integer]: TComponent read GetNonVisualComponents; |
| Public | property IsLoading: Boolean read FIsLoading; |
| Public | property EffectiveFieldOfView: TVector2 read FEffectiveFieldOfView; |
| Published | property FieldOfView: Single read FFieldOfView write SetFieldOfView
stored IsStoredFieldOfView default DefaultFieldOfView; |
| Published | property FieldOfViewAxis: TFieldOfViewAxis
read FFieldOfViewAxis write SetFieldOfViewAxis default DefaultFieldOfViewAxis; |
Description
Constants
| Public | DefaultFieldOfView = Pi / 4; |
|
This item has no description. | |
| Public | DefaultFieldOfViewAxis = faSmallest; |
|
This item has no description. | |
Methods
| Protected | function GetInternalText: String; virtual; |
|
This item is declared in ancestor TCastleComponent. This item has no description. | |
| Protected | procedure SetInternalText(const Value: String); virtual; |
|
This item is declared in ancestor TCastleComponent. This item has no description. | |
| Protected | procedure SetName(const Value: TComponentName); override; |
|
This item is declared in ancestor TCastleComponent. This item has no description. | |
| Protected | procedure TranslateProperties(const TranslatePropertyEvent: TTranslatePropertyEvent); virtual; |
|
This item is declared in ancestor TCastleComponent. Enumerate all properties that are possible to translate in this component. E.g. in TCastleLabel it will return TCastleLabel.Caption, in TCastleEdit it will return TCastleEdit.Text and TCastleEdit.Placeholder. Returns only non-empty properties, thus assuming that if current (by convention, English) text is empty, then there is no point in translating it. Moreover descendants may define boolean properties to exclude particular text from translating, e.g. TCastleLabel.CaptionTranslate, TCastleEdit.TextTranslate, TCastleEdit.PlaceholderTranslate. It is not recursive (it doesn't enumerate children properties). Use global TranslateProperties procedure to call this on a hierarchy of TComponent. You usually don't want to call this method (it is called by other engine routines). But you may find it useful to override this, if you define new component. | |
| Public | destructor Destroy; override; |
|
This item is declared in ancestor TCastleComponent. This item has no description. | |
| Public | procedure CustomSerialization(const SerializationProcess: TSerializationProcess); virtual; |
|
This item is declared in ancestor TCastleComponent. 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. | |
| Public | procedure SetTransient; |
|
This item is declared in ancestor TCastleComponent. Ignore this component when serializing parent's TCastleUserInterface.Controls list or TCastleTransform.List, and do not show this component in CGE editor. This simply sets csTransient flag in ComponentStyle. This is useful for children that are automatically managed by the parent, and should not be modified by user code. For example, TCastleCheckbox is internally composed from TCastleImageControl and TCastleLabel children, but we don't want to serialize or even show these children to user. Note that if you want to prevent this component from serializing as part of TCastleUserInterface.Controls list or TCastleTransform.List, but you still want it to be visible in CGE editor, then make it a "subcomponent" instead, by Note that both csSubComponent and csTransient only disable the component serialization as part of parent's lists enumerated by CustomSerialization (see internal TCastleUserInterface.SerializeChildrenEnumerate , TCastleTransform.SerializeChildrenEnumerate, TCastleTransform.SerializeBehaviorsEnumerate). If you will make the component published in its own property (which is normal for "subcomponents") then it will be serialized anyway, just as part of it's own property (like TCastleScrollView.ScrollArea). So to really avoid serializing a children component make it csSubComponent and/or csTransient, and do not publish it. | |
| Public | procedure AddNonVisualComponent(const NonVisualComponent: TComponent); |
|
This item is declared in ancestor TCastleComponent. Add non-visual component to this component. This is used to organize non-visual components in a tree hierarchy, in CGE designs and editor.
See also
| |
| Public | procedure InsertNonVisualComponent(const Index: Integer; const NonVisualComponent: TComponent); |
|
This item is declared in ancestor TCastleComponent. Insert non-visual component to this component. This is used to organize non-visual components in a tree hierarchy, in CGE designs and editor.
See also
| |
| Public | procedure RemoveNonVisualComponent(const NonVisualComponent: TComponent); |
|
This item is declared in ancestor TCastleComponent. Removes the component previously added by AddNonVisualComponent. | |
| Public | function NonVisualComponentsIndexOf(const NonVisualComponent: TComponent): Integer; |
|
This item is declared in ancestor TCastleComponent. Index of the previously added non-visual component. Returns -1 if the component was not found. | |
| Public | function NonVisualComponentsCount: Integer; |
|
This item is declared in ancestor TCastleComponent. Count of components added by AddNonVisualComponent.
See also
| |
| Public | function NonVisualComponentsEnumerate: TNonVisualComponentsEnumerator; |
|
This item is declared in ancestor TCastleComponent.
You can enumerate current non-visual components using loop like See also
| |
| Public | function ValueIsStreamed: Boolean; virtual; |
|
This item is declared in ancestor TCastleComponent.
Whether the current value of this object should be written to the stream. This should be This is used by CastleComponentSerialize, which is used in Castle Game Engine for all serialization. In simple cases, this just says whether the current value of this object equals to some default value. The default implementation of this class returns Descendants that override this to sometimes return The name of this method is consistent with TPropertyEditor.ValueIsStreamed in LCL. | |
| Public | procedure DesignerInfo(const SList: TStrings); virtual; |
|
This item is declared in ancestor TCastleComponent.
Override to add information that should be visible at design-time. Call | |
| Public | procedure DesignerWarnings(const SList: TStrings); virtual; |
|
This item is declared in ancestor TCastleComponent.
Override to add warnings that should be visible at design-time. Call | |
| Public | constructor Create(AOwner: TComponent); override; |
|
This item has no description. | |
| Public | 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. | |
Properties
| Public | property NonVisualComponents [const Index: Integer]: TComponent read GetNonVisualComponents; |
|
This item is declared in ancestor TCastleComponent. Components added by AddNonVisualComponent. | |
| Public | property IsLoading: Boolean read FIsLoading; |
|
This item is declared in ancestor TCastleComponent. Is the component during deserialization now. Note: We can't use | |
| Public | property EffectiveFieldOfView: TVector2 read FEffectiveFieldOfView; |
|
Effective field of view, horizontal and vertical, in radians. Calculated looking at FieldOfView and FieldOfViewAxis, taking into account sizes of the viewport using this camera. | |
| Published | property FieldOfView: Single read FFieldOfView write SetFieldOfView
stored IsStoredFieldOfView default DefaultFieldOfView; |
|
Perspective field of view angle, in radians. The FieldOfViewAxis determines whether this is horizontal or vertical angle. | |
| Published | property FieldOfViewAxis: TFieldOfViewAxis
read FFieldOfViewAxis write SetFieldOfViewAxis default DefaultFieldOfViewAxis; |
|
Which axis is determined explicitly by FieldOfView. See also | |
Generated by PasDoc 0.17.0.snapshot.