#ifndef _RUCONTROLLER_CAMERA_H_
#define _RUCONTROLLER_CAMERA_H_

#include "../../Scene/Base/RuEntityController.h"

#pragma unmanaged

// ************************************************************************************************************************************************************

class CRuController_Camera : public IRuEntity_Controller
{
	ruRTTI_DECLARE
	ruHEAP_DECLARE
	ruCLASSGUID_DECLARE

protected:
	// Settings
	REAL									m_cameraMovementSpeed;
	UINT32									m_collisionExclusionMask;

	CRuCamera*								m_targetCamera;									//!< Camera that the controller affects
	IRuObject*								m_collisionObject;

	CRuVector3								m_currentCameraPosition;

	REAL									m_presetCameraToTargetDistance;
	REAL									m_targetCameraToTargetDistance;

public:
											CRuController_Camera();
	virtual									~CRuController_Camera();

	void									SetCollisionExclusionMask(UINT32 mask);

	void									Dolly(REAL offset, BOOL buffered);

	void									UpdatePresetCameraConfiguration();

	virtual BOOL							Update(REAL elapsedTime);

	virtual REAL							GetStartTime() const;
	virtual REAL							GetDuration() const;

	virtual BOOL							IsLooping() const;

	virtual IRuObject*						GetTarget();
	virtual BOOL							SetTarget(IRuObject *target);

	void									SetCollisionObject(IRuObject *colObject);
};

// ************************************************************************************************************************************************************

#pragma managed

#endif
