view LightClone/Source/CameraController.h @ 18:33cb6979ac51

More work on GUI system
author koryspansel
date Wed, 14 Sep 2011 17:24:49 -0700
parents 292e534f00c2
children 58a16d529d95
line wrap: on
line source

/*
 * CameraController
 */

#ifndef __CAMERACONTROLLER_H__
#define __CAMERACONTROLLER_H__

#include "Core.h"
#include "Camera.h"

/*
 * CameraMode
 */
enum
{
	CameraMode_2D,
	CameraMode_3D,
};

/*
 * CameraController
 */
class CameraController : public Camera
{
public:

	/*
	 * nMode
	 */
	uint32 nMode;

	/*
	 * fCameraDistance
	 */
	float fCameraDistance;

	/*
	 * fCameraYaw
	 */
	float fCameraYaw;

	/*
	 * fCameraPitch
	 */
	float fCameraPitch;

	/*
	 * fViewAngle
	 */
	float fViewAngle;

	/*
	 * fMinimumZ
	 */
	float fMinimumZ;

	/*
	 * fMaximumZ
	 */
	float fMaximumZ;

public:

	/*
	 * CameraController
	 */
	CameraController(float fInitialDistance = 16.0f, float fInitialYaw = 0.306f, float fInitialPitch = 0.875f);

	/*
	 * SetMode
	 */
	void SetMode(uint32 nCameraMode);

	/*
	 * Update
	 */
	void Update(float fElapsed);

	/*
	 * Yaw
	 */
	void Yaw(float fAmount);

	/*
	 * Pitch
	 */
	void Pitch(float fAmount);

	/*
	 * Move
	 */
	void Move(float fAmount);

	/*
	 * GetLocation
	 */
	const D3DXVECTOR3 GetLocation() const;

	/*
	 * GetDirection
	 */
	const D3DXVECTOR3 GetDirection() const;

	/*
	 * GetRight
	 */
	const D3DXVECTOR3 GetRight() const;

	/*
	 * GetUp
	 */
	const D3DXVECTOR3 GetUp() const;

	/*
	 * GetProjection
	 */
	virtual const D3DXMATRIX GetProjection(const D3DVIEWPORT9& kViewport) const;

	/*
	 * GetView
	 */
	virtual const D3DXMATRIX GetView() const;
};

#endif //__CAMERACONTROLLER_H__