Class TViewpointNode
Unit
X3DNodes
Declaration
type TViewpointNode = class(TAbstractX3DViewpointNode)
Description
Viewpoint that provides a perspective view of the scene.
Hierarchy
Overview
Methods
Properties
Description
Methods
 |
procedure CreateNode; override; |
|
 |
class function ClassX3DType: string; override; |
|
 |
class function URNMatching(const URN: string): boolean; override; |
|
 |
function AngleOfView(const ThisToOtherSizeRatio: Single): Single; deprecated 'use only ViewpointAngleOfView for calculating angles'; |
Warning: this symbol is deprecated: use only ViewpointAngleOfView for calculating angles
Calculate proper angle of view for typical rectangular display, based on given fieldOfView field value. Result is in radians (just like fieldOfView X3D field).
If you want to calculate horizontal angle of view then pass as ThisToOtherSizeRatio your window's width / height. If you want to calculate vertical angle of view then pass as ThisToOtherSizeRatio your window's height / width. For this method it doesn't really matter which is horizontal and which is vertical, both are treated the same.
This works following X3D spec. So the angle of view for smaller window size is set to fieldOfView. The other angle can always be calculated by AdjustViewAngleRadToAspectRatio (this implements the same equation that is mentioned in X3D spec). The larger angle cannot be larger than Pi, and may force the smaller angle to be smaller than fieldOfView.
|
 |
class function ViewpointAngleOfView( FieldOfView: Single; const ThisToOtherSizeRatio: Single): Single; deprecated 'use only ViewpointAngleOfView for calculating angles'; |
Warning: this symbol is deprecated: use only ViewpointAngleOfView for calculating angles
Like AngleOfView, but allows to specify FieldOfView as a parameter.
|
 |
class function ViewpointAngleOfView( const FieldOfView: Single; const FieldOfViewForceVertical: boolean; const ViewportWidth, ViewportHeight: Single): TVector2; |
Calculate horizontal and vertical angle of view, assuming given value of FieldOfView and FieldOfViewForceVertical fields, and assuming given viewport size.
The result is in radians, like the input FieldOfView.
|
 |
function ProjectionMatrix: TMatrix4; override; |
|
Properties
 |
property FdFieldOfView: TSFFloat read FFdFieldOfView; |
|
 |
property FdFieldOfViewForceVertical: TSFBool read FFdFieldOfViewForceVertical; |
|
 |
property FdPosition: TSFVec3f read FFdPosition; |
|
 |
property FieldOfView: Single read GetFieldOfView write SetFieldOfView; |
|
 |
property FieldOfViewForceVertical: boolean read GetFieldOfViewForceVertical write SetFieldOfViewForceVertical; |
|
Generated by PasDoc 0.15.0.
|