Gama C Library
Gama C API Documentation
camera.h File Reference

Defines the 3D camera structure for scene projection. More...

Go to the source code of this file.

Data Structures

struct  gm3Camera
 Represents a camera in a 3D scene, used for projection. More...

Functions

int gm3_camera_create (gm3Camera *c)
 Initializes a gm3Camera struct with default values.

Variables

const gm3Camera gm3_default_camera
 A default gm3Camera instance.

Detailed Description

Defines the 3D camera structure for scene projection.

Function Documentation

◆ gm3_camera_create()

int gm3_camera_create ( gm3Camera * c)

Initializes a gm3Camera struct with default values.

Parameters
cA pointer to the gm3Camera struct to initialize.
Returns
0 on success, -1 if c is NULL.

Variable Documentation

◆ gm3_default_camera

const gm3Camera gm3_default_camera
Initial value:
= {
.far = 100,
.near = 0.01,
.focal = 1.3,
}

A default gm3Camera instance.

Initializes a camera with a typical focal length and clipping planes.