Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Camera.h

00001 /*
00002   File: Camera.h
00003 
00004   Copyright(C) C. Kotterink, Computed Graphics
00005 */
00006 #ifndef CAMERA_H
00007 #define CAMERA_H
00008 
00009 #include<DynamicObject.h>
00010 
00011 #include<ObjectFile.h>
00012 #include<Vertex3.h>
00013 #include<Quaternion.h>
00014 
00036 class Camera : public DynamicObject
00037 {
00038     DYNAMIC_OBJECT;
00039 public:
00041     Camera(Vertex3 pos = Vertex3(0.0, 0.0, 0.0), real f = 1.0);
00042 
00044     Vertex3 &getPosition() { return position; }
00045 
00047     Quaternion &getOrientation() { return orientation; }
00048 
00050     real getFov() { return fov; }
00051 
00053     void contructOrientation(Vertex3 &up, const Vertex3 &dir);
00054 
00056     void lookAt(Vertex3 &up, const Vertex3 &p) {
00057         contructOrientation(up, p - position);
00058     }
00059 
00060     // Inherited from DynamicObject
00061     void parseSymbol(Token &t, ObjectFile &file);
00062     void writeParams(ostream &stream);
00063 
00064 protected:
00065     typedef DynamicObject super;
00066 
00067     // Inherited from DynamicObject
00068     void createSymbols();
00069 
00071     real fov;
00072 
00074     Vertex3 position;
00075     
00077     Quaternion orientation;
00078 };
00079 #endif

This documentation was generated using doxygen. If you have any comments or additions please mail me.