Class TAbstractViewpointNode
Unit
X3DNodes
Declaration
type TAbstractViewpointNode = class(TAbstractBindableNode)
Description
Base type for viewpoints in X3D, which are locations from which the user may view the scene.
Hierarchy
Overview
Methods
Properties
Description
Methods
|
constructor Create(const AX3DName: string = ''; const ABaseUrl: string = ''); override; |
|
|
procedure GetView(out CamPos, CamDir, CamUp, GravityUp: TVector3); |
Calculate camera vectors (position, direction, up, gravity up). Follows VRML/X3D specification:
position is taken directly from FdPosition field,
direction and up are (respectively) -Z and +Y rotated by FdOrientation,
gravity up is +Y.
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.
|
|
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 ProjectionMatrix for subclasses (ModelviewMatrix is already correctly defined here).
|
|
procedure CreateNode; override; |
|
|
class function ClassX3DType: string; override; |
|
Properties
|
property Position: TVector3 read GetPosition write SetPosition; |
Position of the viewpoint.
|
|
property CenterOfRotation: TVector3 read GetCenterOfRotation write SetCenterOfRotation; |
|
|
property FdDescription: TSFString read FFdDescription; |
Internal wrapper for property Description. This wrapper API may change, we advise to access simpler Description instead.
|
|
property Description: String read GetDescription write SetDescription; |
|
|
property FdJump: TSFBool read FFdJump; |
Internal wrapper for property Jump. This wrapper API may change, we advise to access simpler Jump instead.
|
|
property Jump: Boolean read GetJump write SetJump; |
|
|
property FdOrientation: TSFRotation read FFdOrientation; |
Internal wrapper for property Orientation. This wrapper API may change, we advise to access simpler Orientation instead.
|
|
property RetainUserOffsets: Boolean read GetRetainUserOffsets write SetRetainUserOffsets; |
|
|
property EventCameraInverseMatrix: TSFMatrix4fEvent read FEventCameraInverseMatrix; |
|
|
property EventCameraRotationMatrix: TSFMatrix3fEvent read FEventCameraRotationMatrix; |
|
|
property EventCameraRotationInverseMatrix: TSFMatrix3fEvent read FEventCameraRotationInverseMatrix; |
|
|
property CameraMatrixSendAlsoOnOffscreenRendering: Boolean read GetCameraMatrixSendAlsoOnOffscreenRendering write SetCameraMatrixSendAlsoOnOffscreenRendering; |
|
|
property FdDirection: TMFVec3f read FFdDirection; |
Internal wrapper for property Direction . This wrapper API may change, we advise to access simpler Direction instead.
|
|
property FdUp: TMFVec3f read FFdUp; |
Internal wrapper for property Up . This wrapper API may change, we advise to access simpler Up instead.
|
|
property FdGravityUp: TSFVec3f read FFdGravityUp; |
Internal wrapper for property GravityUp. This wrapper API may change, we advise to access simpler GravityUp instead.
|
|
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.