- Main Page
- Classes
- Files

- File List
- File Members

# flCamera.h

Go to the documentation of this file.

    00001 // Funclib Camera v1.0.0
    00002 //
    00003 // This module contains functions for manipulating the 3d view.
    00004 // It is basically an easy to use 3d camera class, with roll implemented too.
    00005 //
    00006 // Contributor(s): Flatmush (Based off the timer class in the PSP NeHe tutorial ports)
    00007
    00008
    00009
    00010 #ifndef FLCAMERA_H
    00011 #define FLCAMERA_H
    00012
    00013 #include "flGlobal.h"
    00014
    00015 #if FL_CAMERA
    00016
    00017 #ifdef __cplusplus
    00018 extern "C" {
    00019 #endif
    00020
    00025 typedef struct {
    00029      vect3f camPos;
    00033      vect3f camView;
    00037      vect3f camUp;
    00041      vect3f camRot;
    00042 } Camera;
    00043
    00050 extern Camera* camCreate();
    00051
    00058 extern void    camFree(Camera* inCam);
    00059
    00066 extern void    camReset(Camera* inCam);
    00067
    00073 extern void    camView(Camera* inCam);
    00074
    00080 extern void    camMove(Camera* inCam, vect3f inMove);
    00081
    00087 extern void    camMoveTo(Camera* inCam, vect3f inTarget);
    00088
    00094 extern void    camMoveForward(Camera* inCam, float inSize);
    00095
    00102 extern void    camMoveStrafe(Camera* inCam, float inSize);
    00103
    00110 #define camRotateYaw(inCam, inAngle) ((inCam)->camRot.y += (inAngle))
    00111
    00118 #define camRotatePitch(inCam, inAngle) ((inCam)->camRot.x += (inAngle))
    00119
    00126 #define camRotateRoll(inCam, inAngle) ((inCam)->camRot.z += (inAngle))
    00127
    00128 #ifdef __cplusplus
    00129 }
    00130 #endif
    00131
    00132 #endif
    00133
    00134 #endif