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

Camera.h

00001 /*************************************************************************** 00002 * This file is part of OpenCAL: Open Computer Animation Library * 00003 * I created OpenCAL as my master's thesis Computer Science (multimedia) * 00004 * at the tUL university in Diepenbeek, Belgium * 00005 * * 00006 * Copyright (C) 2003-2004 by Jeroen Dierckx * 00007 * jeroen.dierckx@student.luc.ac.be * 00008 * * 00009 ***************************************************************************/ 00010 00011 #ifndef OPENCAL_UTILS_CAMERA_H 00012 #define OPENCAL_UTILS_CAMERA_H 00013 00014 // Includes 00015 #include <OpenCAL/global.h> 00016 #include <OpenCAL/Vector3.h> 00017 00018 namespace OpenCAL 00019 { 00020 namespace Utils 00021 { 00022 // Forward declarations 00023 00027 class OPENCAL_API Camera 00028 { 00029 protected: 00030 // Member variables 00031 Vector3 m_target; 00032 float m_distance, m_tiltAngle, m_rotateAngle, m_twistAngle; 00033 00034 public: 00035 // Constructors and destructor 00036 Camera(); 00037 virtual ~Camera(); 00038 00039 // Get functions 00040 const Vector3 &getTarget() const { return m_target; } 00041 Vector3 *getTargetP() { return &m_target; } 00042 float getDistance() const { return m_distance; } 00043 float getTiltAngle() const { return m_tiltAngle; } 00044 float getRotateAngle() const { return m_rotateAngle; } 00045 float getTwistAngle() const { return m_twistAngle; } 00046 00047 // Set functions 00048 void setTarget(const Vector3 &target) { m_target = target; } 00049 void setDistance(float distance) { m_distance = distance; } 00050 void setTiltAngle(float degrees) { m_tiltAngle = degrees; } 00051 void setRotateAngle(float degrees) { m_rotateAngle = degrees; } 00052 void setTwistAngle(float degrees) { m_twistAngle = degrees; } 00053 00054 // Other functions 00055 void zoom(float distance); 00056 void tilt(float degrees) { m_tiltAngle += degrees; } 00057 void rotate(float degrees) { m_rotateAngle += degrees; } 00058 void twist(float degrees) { m_twistAngle += degrees; } 00059 00060 /* 00061 #ifdef USE_OPENGL 00062 void applyGL() const; 00063 void unapplyGL() const; 00064 #endif // USE_OPENGL 00065 */ 00066 }; 00067 } 00068 } 00069 00070 #endif // OPENCAL_UTILS_CAMERA_H

Generated on Sun Aug 15 19:19:22 2004 for OpenCAL: Open Computer Animation Library by doxygen 1.3.8