56 lines
1013 B
C++
56 lines
1013 B
C++
#ifndef BLUECORE_CAMERA_H
|
|
#define BLUECORE_CAMERA_H
|
|
|
|
// project includes
|
|
#include "Utilities/Referenced.h"
|
|
#include "Math/Vector.h"
|
|
#include "Math/Quaternion.h"
|
|
#include "Math/Plane.h"
|
|
//#include "geometry/frustum.h"
|
|
|
|
namespace BlueCore {
|
|
|
|
class Camera : public Referenced
|
|
{
|
|
|
|
private:
|
|
|
|
Vector3 _LookAtPoint;
|
|
Vector3 _LookAtUp;
|
|
bool _LookAt;
|
|
Scalar _NearPlane, _FarPlane, _FoV, _AspectRatio;
|
|
//Frustum _Frustum;
|
|
|
|
Vector3 _Position;
|
|
Quaternion _Rotation;
|
|
|
|
public:
|
|
|
|
Camera();
|
|
~Camera();
|
|
|
|
void lookAt( const Vector3 &point );
|
|
void lookAt( const Vector3 &point, const Vector3 &up );
|
|
void lookStraight();
|
|
|
|
void setFoV( Scalar fov );
|
|
void setAspectRatio( Scalar aspect );
|
|
void setNearPlane( Scalar near );
|
|
void setFarPlane( Scalar far );
|
|
|
|
void setPosition (const Vector3& position);
|
|
const Vector3& getPosition ();
|
|
|
|
void setRotation (const Quaternion& rotation);
|
|
|
|
void setupViewMatrix ();
|
|
void setupProjectionMatrix ();
|
|
|
|
//const Frustum &getFrustum() const;
|
|
};
|
|
|
|
} // namespace BlueCore
|
|
|
|
#endif
|
|
|