Main Page   Class Hierarchy   Compound List   Header Files   Compound Members  

ddgCamera Class Reference

Camera object to manage a scene and connect to a viewport. More...

#include <ddgcamera.h>

List of all members.


Public Members

 ddgCamera ( ddgContext *ctx )
Create a camera object.

void scene ( ddgScene* s )
Set the scene which this camera will render.

bool init (void)
Callback which is called to initialize the camera.

void draw (void)
Render the scene maintained by this camera.

void update (void)
Update the camera for the next frame.

bool map (ddgVector3 vin, ddgVector3 *vout)
Map a 3D world coordinate to view space. More...

bool unmap (ddgVector3 vin, ddgVector3 *vout)
Map a view coordinate to world space. More...

void ortho ( unsigned int w, unsigned int h)
Set up an ortho graphic camera.

void viewport ( int vp[4] )
Return the window size. vp returns the viewport dimensions in pixels.

ddgContextcontext (void)
Return the context for this camera.


Detailed Description

Camera object to manage a scene and connect to a viewport.

Class which supports OpenGL camera capabilities. Contains parameters to control various settings Also registers keys for camera motion control.

Should define a set of activities which camera can perform. These activities can then be mapped to events. ddgVector of events is then mapped to activities to allow alternate key mappings.


Member Function Documentation

bool ddgCamera::map (ddgVector3 vin, ddgVector3 * vout)

Map a 3D world coordinate to view space.

vin is in world space, vout is in view space, Returns false if point is not on view and vout is left unchanged. (Uses OpenGL)

bool ddgCamera::unmap (ddgVector3 vin, ddgVector3 * vout)

Map a view coordinate to world space.

vin is in view space, vout is in world space, Returns false if point is not in view and vout is left unchanged. (Uses OpenGL)


The documentation for this class was generated from the following file:
Generated at Sun Sep 17 19:27:52 2000 for Digital Dawn Graphics Toolkit by doxygen 0.49-991205 written by Dimitri van Heesch, © 1997-1999