#include "flGlobal.h"
Go to the source code of this file.
Classes | |
struct | Camera |
This structure holds all information about the cameras position and orientation. More... | |
Defines | |
#define | camRotateYaw(inCam, inAngle) ((inCam)->camRot.y += (inAngle)) |
Rotate the cameras yaw. | |
#define | camRotatePitch(inCam, inAngle) ((inCam)->camRot.x += (inAngle)) |
Rotate the cameras pitch. | |
#define | camRotateRoll(inCam, inAngle) ((inCam)->camRot.z += (inAngle)) |
Rotate the cameras roll. | |
Functions | |
Camera * | camCreate () |
Create a valid initialized Camera struct. | |
void | camFree (Camera *inCam) |
Free a camera struct from memory. | |
void | camReset (Camera *inCam) |
Reset the camera to its home position. | |
void | camView (Camera *inCam) |
Set the view matrix to the cameras view. | |
void | camMove (Camera *inCam, vect3f inMove) |
Move a Camera relative to it's current position. | |
void | camMoveTo (Camera *inCam, vect3f inTarget) |
Move a Camera to a specific location. | |
void | camMoveForward (Camera *inCam, float inSize) |
Move a Camera forward in the direction it is pointing in. | |
void | camMoveStrafe (Camera *inCam, float inSize) |
Move a Camera horizontally with respect to the direction it is pointing. |
#define camRotatePitch | ( | inCam, | |||
inAngle | ) | ((inCam)->camRot.x += (inAngle)) |
Rotate the cameras pitch.
inCam | The Camera to be moved. | |
inAngle | The amount the Cameras pitch should be modified by. |
Definition at line 118 of file flCamera.h.
#define camRotateRoll | ( | inCam, | |||
inAngle | ) | ((inCam)->camRot.z += (inAngle)) |
Rotate the cameras roll.
inCam | The Camera to be moved. | |
inAngle | The amount the Cameras roll should be modified by. |
Definition at line 126 of file flCamera.h.
#define camRotateYaw | ( | inCam, | |||
inAngle | ) | ((inCam)->camRot.y += (inAngle)) |
Rotate the cameras yaw.
inCam | The Camera to be moved. | |
inAngle | The amount the Cameras yaw should be modified by. |
Definition at line 110 of file flCamera.h.
Camera* camCreate | ( | ) |
Create a valid initialized Camera struct.
Definition at line 44 of file flCamera.c.
References camReset(), debugWarning, memAlloc, and NULL.
void camFree | ( | Camera * | inCam | ) |
Free a camera struct from memory.
inCam | The camera struct to be free'd. |
Definition at line 56 of file flCamera.c.
References memFree.
Move a Camera relative to it's current position.
inCam | The Camera to be moved. | |
inMove | A vector representing the amount to be moved in each dimension relative to it's current position. |
Definition at line 85 of file flCamera.c.
References Camera::camPos, and vect3f_Add.
Referenced by camMoveForward(), camMoveStrafe(), and camMoveTo().
void camMoveForward | ( | Camera * | inCam, | |
float | inSize | |||
) |
Move a Camera forward in the direction it is pointing in.
inCam | The Camera to be moved. | |
inSize | The amount the camera should be moved forward. |
Definition at line 98 of file flCamera.c.
References camMove(), Camera::camView, and camViewCalc().
void camMoveStrafe | ( | Camera * | inCam, | |
float | inSize | |||
) |
Move a Camera horizontally with respect to the direction it is pointing.
inCam | The Camera to be moved. | |
inSize | The amount the camera should be strafed right by. |
Definition at line 109 of file flCamera.c.
References camMove(), Camera::camRot, camViewCalc(), mathCosf(), and mathSinf().
Move a Camera to a specific location.
inCam | The Camera to be moved. | |
inTarget | A vector representing the destination that the Camera will be moved to. |
Definition at line 91 of file flCamera.c.
References camMove(), Camera::camPos, and vect3f_Sub.
void camReset | ( | Camera * | inCam | ) |
Reset the camera to its home position.
inCam | The Camera to be reset. |
Definition at line 64 of file flCamera.c.
References Camera::camPos, Camera::camRot, Camera::camUp, and Camera::camView.
Referenced by camCreate().
void camView | ( | Camera * | inCam | ) |
Set the view matrix to the cameras view.
inCam | The Camera to be viewed. |
Definition at line 71 of file flCamera.c.
References Camera::camPos, Camera::camUp, Camera::camView, camViewCalc(), and vect3f_Add.