00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
#ifndef OPENCAL_UTILS_CAMERA_H
00012
#define OPENCAL_UTILS_CAMERA_H
00013
00014
00015
#include <OpenCAL/global.h>
00016
#include <OpenCAL/Vector3.h>
00017
00018
namespace OpenCAL
00019 {
00020
namespace Utils
00021 {
00022
00023
00027 class OPENCAL_API Camera
00028 {
00029
protected:
00030
00031
Vector3 m_target;
00032
float m_distance, m_tiltAngle, m_rotateAngle, m_twistAngle;
00033
00034
public:
00035
00036 Camera();
00037
virtual ~Camera();
00038
00039
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
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
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
00062
00063
00064
00065
00066 };
00067 }
00068 }
00069
00070
#endif // OPENCAL_UTILS_CAMERA_H