Castle Game Engine: X3DNodes: Class TAbstractViewpointNode

# Class TAbstractViewpointNode
Description | Hierarchy | Fields | Methods | Properties
## Unit X3DNodes ## Declaration `type TAbstractViewpointNode = class(TAbstractBindableNode)` ## Description Common ancestor for both VRML 1.0 camera nodes and VRML/X3D >= 2.0 viewpoint nodes. ## Hierarchy TPersistent TNonRefCountedInterfacedPersistent TX3DFileItem TX3DNode TAbstractNode TAbstractChildNode TAbstractBindableNode TAbstractViewpointNode ## Overview ### Methods
| `procedure CreateNode; override;`
| `function TransformationChange: TNodeTransformationChange; override;`
| `function Position: TSFVec3f; virtual; abstract;`
| `class function ProjectionType: TProjectionType; virtual; abstract;`
| `procedure GetView(out CamPos, CamDir, CamUp, GravityUp: TVector3Single);`
| `function Description: string; virtual;`
### Properties
| `property FdOrientation: TSFRotation read FFdOrientation;`
| `property FdDirection: TMFVec3f read FFdDirection;`
| `property FdUp: TMFVec3f read FFdUp;`
| `property FdGravityUp: TSFVec3f read FFdGravityUp;`
| `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 FdDescription: TSFString read FFdDescription;`
## Description ### Methods
| `procedure CreateNode; override;`
| `function TransformationChange: TNodeTransformationChange; override;`
| `function Position: TSFVec3f; virtual; abstract;`
Position of the viewpoint. This is an abstract function, not a simple FdPosition, because one of the descendants (TAbstractX3DViewpointNode) doesn't have FdPosition field. For now, all non-abstract descendants (for both VRML 1.0 and VRML >= 2.0) override this and expose their position field correctly.
| `class function ProjectionType: TProjectionType; virtual; abstract;`
| `procedure GetView(out CamPos, CamDir, CamUp, GravityUp: TVector3Single);`
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 Transform). 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 http://castle-engine.sourceforge.net/x3d_extensions.php#section_ext_cameras_alt_orient Returned CamDir, CamUp, GravityUp are always normalized.
| `function Description: string; virtual;`
Description generated smart (trying to use FdDescription field, falling back on other information to help user identify the node).
### Properties
| `property FdOrientation: TSFRotation read FFdOrientation;`
| `property FdDirection: TMFVec3f read FFdDirection;`
| `property FdUp: TMFVec3f read FFdUp;`
| `property FdGravityUp: TSFVec3f read FFdGravityUp;`
| `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 FdDescription: TSFString read FFdDescription;`
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:15