-
Notifications
You must be signed in to change notification settings - Fork 3
Camera.h
tiffany352 edited this page Jan 1, 2013
·
1 revision
typedef struct ilG_camera {
il_positionable* positionable;
il_Vector3 movespeed;
il_Matrix projection_matrix;
float sensitivity;
unsigned refs;
} ilG_camera;
A structure for representing a camera. There should only be 1 per [context][context.h], however, there is no requirement.
ilG_camera* ilG_camera_new(il_positionable * parent);
Creates a new camera object with the provided positionable anchoring it into 3D space.
void ilG_camera_setEgoCamKeyHandlers(ilG_camera* camera, struct il_keymap * keymap);
Sets the camera to a default egocentric camera, allowing the user to move it around. Uses the WASD keys for movement, hold left click and drag to move the camera.
void ilG_camera_setMovespeed(ilG_camera* camera, il_Vector3 movespeed, float radians_per_pixel);
Sets the movement speed and rotation speed of the camera.