Danbias/Code/Game/GameClient/GameClientState/Camera_Basic.h

42 lines
1.9 KiB
C
Raw Normal View History

2014-02-10 12:02:48 +01:00
#ifndef CAMERA_BASIC_H
#define CAMERA_BASIC_H
#include "OysterMath.h"
class Camera_Basic
{
public:
Camera_Basic();
Camera_Basic( const ::Oyster::Math::Float3 &position, const ::Oyster::Math::Float3 &angularAxis, const ::Oyster::Math::Float4x4 &projection );
virtual ~Camera_Basic();
Camera_Basic & operator = ( const Camera_Basic &camera );
void SetPosition( const ::Oyster::Math::Float3 &translation );
void SetAngular( const ::Oyster::Math::Float3 &axis );
void SetProjection( const ::Oyster::Math::Float4x4 &matrix );
void SetOrthographicProjection( ::Oyster::Math::Float width, ::Oyster::Math::Float height, ::Oyster::Math::Float nearClip, ::Oyster::Math::Float farClip );
void SetPerspectiveProjection( ::Oyster::Math::Float verticalFoV, ::Oyster::Math::Float aspectRatio, ::Oyster::Math::Float nearClip, ::Oyster::Math::Float farClip );
void Move( const ::Oyster::Math::Float3 &deltaPosition );
void Rotate( const ::Oyster::Math::Float3 &deltaAngularAxis );
2014-02-10 15:19:42 +01:00
const ::Oyster::Math::Float3 & GetPosition() const;
const ::Oyster::Math::Float3 & GetAngularAxis() const;
2014-02-10 13:01:46 +01:00
::Oyster::Math::Float3 GetNormalOf( const ::Oyster::Math::Float3 &axis ) const;
2014-02-10 12:02:48 +01:00
const ::Oyster::Math::Quaternion & GetRotation() const;
::Oyster::Math::Float3x3 & GetRotationMatrix( ::Oyster::Math::Float3x3 &targetMem ) const;
::Oyster::Math::Float4x4 & GetRotationMatrix( ::Oyster::Math::Float4x4 &targetMem ) const;
::Oyster::Math::Float4x4 & GetViewMatrix( Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const;
const ::Oyster::Math::Float4x4 & GetProjectionMatrix() const;
::Oyster::Math::Float4x4 & GetViewsProjMatrix( Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const;
private:
2014-02-10 15:19:42 +01:00
::Oyster::Math::Float3 translation;
mutable ::Oyster::Math::Float3 angularAxis;
::Oyster::Math::Float4x4 projection;
2014-02-10 12:02:48 +01:00
mutable ::Oyster::Math::Quaternion rotation;
mutable bool rotationIsOutOfDate;
};
#endif