Class TAbstractViewpointNode
Unit
Declaration
type TAbstractViewpointNode = class(TAbstractBindableNode)
Description
Base type for viewpoints in X3D, which are locations from which the user may view the scene.
Hierarchy
- TObject
- TPersistent
- TX3DFileItem
- TX3DNode
- TAbstractNode
- TAbstractChildNode
- TAbstractBindableNode
- TAbstractViewpointNode
Overview
Methods
constructor Create(const AX3DName: string = ''; const ABaseUrl: String = ''); override; |
|
function TransformationChange: TNodeTransformationChange; override; |
|
class function ProjectionType: TProjectionType; virtual; abstract; |
|
procedure GetView(out CamPos, CamDir, CamUp, GravityUp: TVector3); overload; |
|
procedure GetView(out CamView: TViewVectors); overload; |
|
function SmartDescription: string; virtual; |
|
function ProjectionMatrix: TMatrix4; virtual; |
|
function ModelviewMatrix: TMatrix4; |
|
function GetProjectorMatrix: TMatrix4; |
|
procedure CreateNode; override; |
|
class function ClassX3DType: String; override; |
Properties
property Position: TVector3 read GetPosition write SetPosition; |
|
property FdAutoCenterOfRotation: TSFBool read FFdAutoCenterOfRotation; |
|
property AutoCenterOfRotation: Boolean read GetAutoCenterOfRotation write SetAutoCenterOfRotation; |
|
property FdCenterOfRotation: TSFVec3f read FFdCenterOfRotation; |
|
property CenterOfRotation: TVector3 read GetCenterOfRotation write SetCenterOfRotation; |
|
property FdDescription: TSFString read FFdDescription; |
|
property Description: String read GetDescription write SetDescription; |
|
property FdJump: TSFBool read FFdJump; |
|
property Jump: Boolean read GetJump write SetJump; |
|
property FdOrientation: TSFRotation read FFdOrientation; |
|
property Orientation: TVector4 read GetOrientation write SetOrientation; |
|
property FdRetainUserOffsets: TSFBool read FFdRetainUserOffsets; |
|
property RetainUserOffsets: Boolean read GetRetainUserOffsets write SetRetainUserOffsets; |
|
property EventCameraMatrix: TSFMatrix4fEvent read FEventCameraMatrix; |
|
property EventCameraInverseMatrix: TSFMatrix4fEvent read FEventCameraInverseMatrix; |
|
property EventCameraRotationMatrix: TSFMatrix3fEvent read FEventCameraRotationMatrix; |
|
property EventCameraRotationInverseMatrix: TSFMatrix3fEvent read FEventCameraRotationInverseMatrix; |
|
property FdCameraMatrixSendAlsoOnOffscreenRendering: TSFBool read FFdCameraMatrixSendAlsoOnOffscreenRendering; |
|
property CameraMatrixSendAlsoOnOffscreenRendering: Boolean read GetCameraMatrixSendAlsoOnOffscreenRendering write SetCameraMatrixSendAlsoOnOffscreenRendering; |
|
property FdDirection: TMFVec3f read FFdDirection; |
|
property FdUp: TMFVec3f read FFdUp; |
|
property FdGravityUp: TSFVec3f read FFdGravityUp; |
|
property GravityUp: TVector3 read GetGravityUp write SetGravityUp; |
|
property FdGravityTransform: TSFBool read FFdGravityTransform; |
|
property GravityTransform: Boolean read GetGravityTransform write SetGravityTransform; |
Description
Methods
constructor Create(const AX3DName: string = ''; const ABaseUrl: String = ''); override; |
|
This item has no description. Showing description inherited from TX3DNode.Create. Constructor. Initializes various properties:
|
function TransformationChange: TNodeTransformationChange; override; |
|
This item has no description. |
class function ProjectionType: TProjectionType; virtual; abstract; |
|
This item has no description. |
procedure GetView(out CamPos, CamDir, CamUp, GravityUp: TVector3); overload; |
|
Calculate camera vectors (position, direction, up, gravity up). Follows VRML/X3D specification:
They are all then transformed by the current viewpoint transformation (determined by parent nodes like TTransformNode). One conclusion from the above is that the only way to change the gravity up vector (this determines in which direction viewer falls down) is to use the Transform node around the viewpoint node. Additionally, as an extension, we also look at FdDirection and FdUp and FdGravityUp vectors. See https://castle-engine.io/x3d_extensions.php#section_ext_cameras_alt_orient Returned CamDir, CamUp, GravityUp are always normalized. TODO: This may need transform to world space, not just scene space, just like TAbstractLightNode.GetView does. Test how it behaves in TCastleScene that has some transformation. |
procedure GetView(out CamView: TViewVectors); overload; |
|
This item has no description. |
function SmartDescription: string; virtual; |
|
Description generated smart (trying to use FdDescription field, falling back on other information to help user identify the node). |
function ProjectionMatrix: TMatrix4; virtual; |
|
Matrices for projecting texture from this viewpoint, for ProjectedTextureCoordinate. Override |
function ModelviewMatrix: TMatrix4; |
|
This item has no description. |
function GetProjectorMatrix: TMatrix4; |
|
This item has no description. |
procedure CreateNode; override; |
|
Create node fields and events. |
class function ClassX3DType: String; override; |
|
This item has no description. Showing description inherited from TX3DNode.ClassX3DType. Node type name in VRML/X3D, for this class. Normal VRML/X3D node classes should override this to return something non-empty, and then X3DType automatically will return the same value. Empty for classes that don't have a hardcoded VRML/X3D node name, like a special TX3DUnknownNode. Such special classes should override then X3DType to return actual non-empty name there. You usually should call X3DType. The only use of this method is that it works on classes (it's "class function"), without needing at actual instance. |
Properties
property Position: TVector3 read GetPosition write SetPosition; |
|
Position of the viewpoint. |
property FdAutoCenterOfRotation: TSFBool read FFdAutoCenterOfRotation; |
|
Internal wrapper for property |
property AutoCenterOfRotation: Boolean read GetAutoCenterOfRotation write SetAutoCenterOfRotation; |
|
When This field is a Castle Game Engine extension of the X3D standard. The default value ( |
property FdCenterOfRotation: TSFVec3f read FFdCenterOfRotation; |
|
Internal wrapper for property |
property CenterOfRotation: TVector3 read GetCenterOfRotation write SetCenterOfRotation; |
|
This item has no description. |
property FdDescription: TSFString read FFdDescription; |
|
Internal wrapper for property |
property Description: String read GetDescription write SetDescription; |
|
This item has no description. |
property FdJump: TSFBool read FFdJump; |
|
Internal wrapper for property |
property Jump: Boolean read GetJump write SetJump; |
|
This item has no description. |
property FdOrientation: TSFRotation read FFdOrientation; |
|
Internal wrapper for property |
property Orientation: TVector4 read GetOrientation write SetOrientation; |
|
Orientation of the viewpoint, expressed as rotation to transform default direction and up (DefaultX3DCameraDirection, DefaultX3DCameraUp). |
property FdRetainUserOffsets: TSFBool read FFdRetainUserOffsets; |
|
Internal wrapper for property |
property RetainUserOffsets: Boolean read GetRetainUserOffsets write SetRetainUserOffsets; |
|
This item has no description. |
property EventCameraMatrix: TSFMatrix4fEvent read FEventCameraMatrix; |
|
This item has no description. |
property EventCameraInverseMatrix: TSFMatrix4fEvent read FEventCameraInverseMatrix; |
|
This item has no description. |
property EventCameraRotationMatrix: TSFMatrix3fEvent read FEventCameraRotationMatrix; |
|
This item has no description. |
property EventCameraRotationInverseMatrix: TSFMatrix3fEvent read FEventCameraRotationInverseMatrix; |
|
This item has no description. |
property FdCameraMatrixSendAlsoOnOffscreenRendering: TSFBool read FFdCameraMatrixSendAlsoOnOffscreenRendering; |
|
Internal wrapper for property |
property CameraMatrixSendAlsoOnOffscreenRendering: Boolean read GetCameraMatrixSendAlsoOnOffscreenRendering write SetCameraMatrixSendAlsoOnOffscreenRendering; |
|
This item has no description. |
property FdDirection: TMFVec3f read FFdDirection; |
|
Internal wrapper for property |
property FdUp: TMFVec3f read FFdUp; |
|
Internal wrapper for property |
property FdGravityUp: TSFVec3f read FFdGravityUp; |
|
Internal wrapper for property |
property GravityUp: TVector3 read GetGravityUp write SetGravityUp; |
|
Warning: this symbol is deprecated. Specify the gravity vector explicitly. See https://castle-engine.io/x3d_implementation_navigation_extensions.php . |
property FdGravityTransform: TSFBool read FFdGravityTransform; |
|
Internal wrapper for property |
property GravityTransform: Boolean read GetGravityTransform write SetGravityTransform; |
|
Should the gravity vector be affected by the viewpoint transformation, that is by the TTransformNode instances that contain this TAbstractViewpointNode. |
Generated by PasDoc 0.16.0-snapshot.