Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_Camera

This is camera class.
Contained in: global
Derived from: none
Derived by: none
Group: GL (OpenGL)

#include <ClanLib/gl.h>

### public function member index:

### Construction:

`` | `CL_Camera` | `()`;
`` | `CL_Camera` | `(`float` `nearZ`, `float` `farZ`, `float` `fov`)`;

### Operations:

``void`` | `set_viewport` | `(`const` `CL_Viewpoint`& `viewpoint`, `float` `distance`) `const``;

## Description:

Camera maintains the projection and view matrix

## Function Member Descriptions:

CL_Camera::CL_Camera - Constructs an uninitialized camera.
`` `CL_Camera` `()`;

CL_Camera::CL_Camera - Constructs a camera.
`` `CL_Camera` `(`float` `nearZ`, `float` `farZ`, `float` `fov`)`;

> pos - The position that the camera stands in.
> dir - The direction that the camera looks in.
> up - The up direction of the camera.
> nearZ - Near clipping plane.
> farZ - Far clipping plane.
> fov - Field of view.

CL_Camera::set_viewport - Set view matrix to look from the camera's point of view.
``void`` `set_viewport` `(`const` `CL_Viewpoint`& `viewpoint`, `float` `distance`) `const``;

## Variable Member Descriptions:

CL_Camera::farZ - Far clipping plane
``float`` ``farZ`;`

CL_Camera::fov - Field of view
``float`` ``fov`;`

CL_Camera::nearZ - Near clipping plane
``float`` ``nearZ`;`