Class TMakeX3DViewpoint
Unit
Declaration
type TMakeX3DViewpoint = class(TObject)
Description
Utility class to set various viewpoint properties, and then generate given viewpoint node.
Hierarchy
- TObject
- TMakeX3DViewpoint
Overview
Fields
nested const DefaultPerspectiveFieldOfView = Pi / 4; |
Methods
constructor Create; |
|
function ToString: String; override; |
|
function ToNode(out ViewpointNode: TAbstractViewpointNode): TAbstractChildNode; overload; |
|
function ToNode: TAbstractChildNode; overload; |
Properties
property Version: TX3DCameraVersion read FVersion write FVersion default cvVrml2_X3d; |
|
property Xml: Boolean read FXml write FXml default true; |
|
property Position: TVector3 read FPosition write FPosition; |
|
property Direction: TVector3 read FDirection write FDirection; |
|
property Up: TVector3 read FUp write FUp; |
|
property GravityUp: TVector3 read FGravityUp write FGravityUp; |
|
property CenterOfRotation: TVector3 read FCenterOfRotation write FCenterOfRotation; |
|
property AutoCenterOfRotation: Boolean
read FAutoCenterOfRotation write FAutoCenterOfRotation default false; |
|
property PerspectiveFieldOfView: Single read FPerspectiveFieldOfView write FPerspectiveFieldOfView
default DefaultPerspectiveFieldOfView; |
|
property ProjectionType: TProjectionType
read FProjectionType write FProjectionType default ptPerspective; |
|
property OrthographicFieldOfView: TFloatRectangle
read FOrthographicFieldOfView write FOrthographicFieldOfView; |
Description
Fields
nested const DefaultPerspectiveFieldOfView = Pi / 4; |
|
Matches X3D default TViewpointNode.FieldOfView. It also matches TCastlePerspective.DefaultFieldOfView, which is good – our TCastleCamera and friends (like TCastlePerspective) is consistent with X3D in this regard. |
Methods
constructor Create; |
|
This item has no description. |
function ToString: String; override; |
|
Construct string with VRML/X3D node defining Viewpoint with given properties. |
function ToNode(out ViewpointNode: TAbstractViewpointNode): TAbstractChildNode; overload; |
|
Construct X3D nodes that define viewpoint (maybe with some transformation) with given properties. Overloaded version with ViewpointNode parameter returns the TAbstractViewpointNode descendant that is for sure somewhere within the returned node. But the returned node may be a transformation node. |
function ToNode: TAbstractChildNode; overload; |
|
This item has no description. |
Properties
property Version: TX3DCameraVersion read FVersion write FVersion default cvVrml2_X3d; |
|
property Xml: Boolean read FXml write FXml default true; |
|
Whether to use XML encoding in ToString. |
property Position: TVector3 read FPosition write FPosition; |
|
Position of the camera. By default it is DefaultX3DCameraPosition[cvVrml2_X3d]. |
property Direction: TVector3 read FDirection write FDirection; |
|
Direction of the camera. By default it is DefaultX3DCameraDirection. |
property Up: TVector3 read FUp write FUp; |
|
Up vector of the camera. By default it is DefaultX3DCameraUp. |
property GravityUp: TVector3 read FGravityUp write FGravityUp; |
|
Gravity up vector of the camera. By default it is DefaultX3DGravityUp. |
property CenterOfRotation: TVector3 read FCenterOfRotation write FCenterOfRotation; |
|
Center of rotation, as should be specified in viewpoint node. By default it is zero, just like TAbstractViewpointNode.CenterOfRotation. |
property AutoCenterOfRotation: Boolean
read FAutoCenterOfRotation write FAutoCenterOfRotation default false; |
|
Automatically calculate center of rotation based on scene bounding box. The default ( |
property PerspectiveFieldOfView: Single read FPerspectiveFieldOfView write FPerspectiveFieldOfView
default DefaultPerspectiveFieldOfView; |
|
Perspective field of view, in radians. |
property ProjectionType: TProjectionType
read FProjectionType write FProjectionType default ptPerspective; |
|
TODO: This does not support yet choice perspective/orthographic camera, we always generate perspective node. But we expose relevant properties and they will be used in the future. |
property OrthographicFieldOfView: TFloatRectangle
read FOrthographicFieldOfView write FOrthographicFieldOfView; |
|
This item has no description. |
Generated by PasDoc 0.16.0-snapshot.