iPerspectiveCamera Struct Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
iPerspectiveCamera Struct Reference
Views & Cameras

An implementation of iCamera that renders a world with a classical perspective. More...

`#include <iengine/camera.h>`

Inheritance diagram for iPerspectiveCamera:

List of all members.

## Public Member Functions
virtual iCamera * | GetCamera ()=0
| Get the iCamera interface for this camera.
virtual float | GetFOV () const =0
| Return the normalized FOV (field of view)
virtual float | GetFOVAngle () const =0
| Return the FOV (field of view) in degrees.
virtual float | GetInvFOV () const =0
| Return the inverse of normalized field of view (1/FOV)
virtual float | GetNearClipDistance () const =0
| Get the near clip distance of this camera.
virtual float | GetShiftX () const =0
| Get the X shift amount.
virtual float | GetShiftY () const =0
| Get the Y shift amount.
virtual void | SetFOV (float fov, float width)=0
| Set the FOV.
virtual void | SetFOVAngle (float fov, float width)=0
| Set the FOV in degrees.
virtual void | SetNearClipDistance (float dist)=0
| Set near clip distance of this camera.
virtual void | SetPerspectiveCenter (float x, float y)=0
| Set the shift amount.

## Detailed Description

An implementation of iCamera that renders a world with a classical perspective.

Main creators of instances implementing this interface:

- iEngine::CreatePerspectiveCamera()

Main ways to get pointers to this interface:

- iView::GetPerspectiveCamera()

Definition at line 350 of file camera.h.

## Member Function Documentation

virtual iCamera* iPerspectiveCamera::GetCamera | ( |  | ) | `[pure virtual]`

Get the iCamera interface for this camera.

virtual float iPerspectiveCamera::GetFOV | ( |  | ) | const`[pure virtual]`

Return the normalized FOV (field of view)

virtual float iPerspectiveCamera::GetFOVAngle | ( |  | ) | const`[pure virtual]`

Return the FOV (field of view) in degrees.

virtual float iPerspectiveCamera::GetInvFOV | ( |  | ) | const`[pure virtual]`

Return the inverse of normalized field of view (1/FOV)

virtual float iPerspectiveCamera::GetNearClipDistance | ( |  | ) | const`[pure virtual]`

Get the near clip distance of this camera.

Higher clip distances increases the possibility that the camera may look "inside" some geometry, however, it also provides higher depth value precision - especially for large scenes this can prevent depth buffer issues (Z-fighting, wrong occlusion) at a distance.

If you have a collider (player etc.) coupled to camera movement a good initial value for the near clip distance is a value slightly above the collider radius.

virtual float iPerspectiveCamera::GetShiftX | ( |  | ) | const`[pure virtual]`

Get the X shift amount.

The parameter specified the desired X coordinate on the normalized screen of the projection center of the camera.

virtual float iPerspectiveCamera::GetShiftY | ( |  | ) | const`[pure virtual]`

Get the Y shift amount.

The parameter specified the desired Y coordinate on the normalized screen of the projection center of the camera.

virtual void iPerspectiveCamera::SetFOV | ( | float | fov,
|  | float | width
| ) |  | `[pure virtual]`

Set the FOV.

fov is the desired FOV in normalized screen coordinates. width is the display width, also normalized.

virtual void iPerspectiveCamera::SetFOVAngle | ( | float | fov,
|  | float | width
| ) |  | `[pure virtual]`

Set the FOV in degrees.

fov is the desired FOV in degrees. width is the display width in normalized screen coordinates.

virtual void iPerspectiveCamera::SetNearClipDistance | ( | float | dist | ) | `[pure virtual]`

Set near clip distance of this camera.

The default near clipping distance is controlled by the engine.

virtual void iPerspectiveCamera::SetPerspectiveCenter | ( | float | x,
|  | float | y
| ) |  | `[pure virtual]`

Set the shift amount.

The parameter specified the desired projection center of the camera on the normalized screen.

The documentation for this struct was generated from the following file:

- iengine/camera.h