понедельник, 5 марта 2012 г.

About TGLCamera from source code

TGLCamera = class(TGLBaseSceneObject)
  property NearPlane: Single read FnearPlane;
  property DepthOfView: Single read FDepthOfView write SetDepthOfView;
  property FocalLength: Single read FFocalLength write SetFocalLength;
  property SceneScale: Single read FSceneScale write SetSceneScale;
  property NearPlaneBias: Single read FNearPlaneBias write SetNearPlaneBias;
  property TargetObject: TGLBaseSceneObject read FTargetObject write SetTargetObject;
  property CameraStyle: TGLCameraStyle read FCameraStyle write SetCameraStyle;
  property KeepFOVMode: TGLCameraKeepFOVMode read FkeepFOVMode write SetKeepFOVMode;
  procedure ZoomAll(aSceneBuffer: TGLSceneBuffer);

property NearPlane: Single read FnearPlane;
Nearest clipping plane for the frustum. This value depends on the FocalLength and DepthOfView fields and is calculated to minimize Z-Buffer crawling as suggested by the OpenGL documentation.
property DepthOfView: Single read FDepthOfView write SetDepthOfView;
Depth of field/view. Adjusts the maximum distance, beyond which objects will be clipped (ie. not visisble). You must adjust this value if you are experiencing disappearing objects (increase the value) of Z-Buffer crawling (decrease the value). Z-Buffer crawling happens when depth of view is too large and the Z-Buffer precision cannot account for all that depth accurately : objects farther overlap closer objects and vice-versa. Note that this value is ignored in cSOrtho2D mode.
property FocalLength: Single read FFocalLength write SetFocalLength;
Focal Length of the camera. Adjusting this value allows for lens zooming effects (use SceneScale for linear zooming). This property affects near/far planes clipping.
property SceneScale: Single read FSceneScale write SetSceneScale stored StoreSceneScale;
Scene scaling for camera point. This is a linear 2D scaling of the camera's output, allows for linear zooming (use FocalLength for lens zooming).
property NearPlaneBias: Single read FNearPlaneBias write SetNearPlaneBias stored StoreNearPlaneBias;
Scaling bias applied to near-plane calculation. Values inferior to one will move the nearplane nearer, and also reduce medium/long range Z-Buffer precision, values superior to one will move the nearplane farther, and also improve medium/long range Z-Buffer precision.
property TargetObject: TGLBaseSceneObject read FTargetObject write SetTargetObject;
If set, camera will point to this object. When camera is pointing an object, the Direction vector is ignored and the Up vector is used as an absolute vector to the up.
property CameraStyle: TGLCameraStyle read FCameraStyle write SetCameraStyle default csPerspective;
Adjust the camera style.
Thees styles are available:
- csPerspective, the default value for perspective projection.
- csOrthogonal, for orthogonal (or isometric) projection.
- csOrtho2D, setups orthogonal 2D projection in which 1 unit (in x or y) represents 1 pixel.
- csInfinitePerspective, for perspective view without depth limit.
- csKeepCamAnglePerspective, for perspective view with keeping aspect on view resize.
- csCustom, setup is deferred to the OnCustomPerspective event.
property KeepFOVMode: TGLCameraKeepFOVMode read FkeepFOVMode write SetKeepFOVMode default ckmHorizontalFOV;
Keep camera angle mode. When CameraStyle is csKeepCamAnglePerspective, select which camera angle you want to keep.
- kaHeight, for Keep Height oriented camera angle
- kaWidth, for Keep Width oriented camera angle
procedure ZoomAll(aSceneBuffer: TGLSceneBuffer);
Position the camera so that the whole scene can be seen

Комментариев нет:

Отправить комментарий