#ifndef __C_SCENE_NODE_ANIMATOR_CAMERA_MAYA_H_INCLUDED__
#define __C_SCENE_NODE_ANIMATOR_CAMERA_MAYA_H_INCLUDED__
#include "ISceneNodeAnimatorCameraMaya.h"
#include "ICameraSceneNode.h"
#include "vector2d.h"
namespace irr
{
namespace gui
{
class ICursorControl;
}
namespace scene
{
class CSceneNodeAnimatorCameraMaya : public ISceneNodeAnimatorCameraMaya
{
public:
CSceneNodeAnimatorCameraMaya(gui::ICursorControl* cursor, f32 rotateSpeed = -1500.0f,
f32 zoomSpeed = 200.0f, f32 translationSpeed = 1500.0f);
virtual ~CSceneNodeAnimatorCameraMaya();
virtual void animateNode(ISceneNode* node, u32 timeMs);
virtual bool OnEvent(const SEvent& event);
virtual f32 getMoveSpeed() const;
virtual void setMoveSpeed(f32 moveSpeed);
virtual f32 getRotateSpeed() const;
virtual void setRotateSpeed(f32 rotateSpeed);
virtual f32 getZoomSpeed() const;
virtual void setZoomSpeed(f32 zoomSpeed);
virtual bool isEventReceiverEnabled() const
{
return true;
}
virtual ESCENE_NODE_ANIMATOR_TYPE getType() const
{
return ESNAT_CAMERA_MAYA;
}
virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0);
private:
void allKeysUp();
void animate();
bool isMouseKeyDown(s32 key);
bool MouseKeys[3];
gui::ICursorControl *CursorControl;
core::vector3df Pos;
bool Zooming;
bool Rotating;
bool Moving;
bool Translating;
f32 ZoomSpeed;
f32 RotateSpeed;
f32 TranslateSpeed;
core::position2df RotateStart;
core::position2df ZoomStart;
core::position2df TranslateStart;
f32 CurrentZoom;
f32 RotX, RotY;
core::vector3df OldTarget;
core::vector3df LastCameraTarget;
scene::ICameraSceneNode* OldCamera;
core::position2df MousePos;
};
}
}
#endif