/*****************************************************************************
 * $Id: game_pony_view.hh,v 1.9 2006/08/03 02:17:22 devel Exp $
 * @file
 * @author	Jim E. Brooks  http://www.jimbrooks.org
 * @brief	Game Pony View classes.
 *//*
 * LEGAL:	COPYRIGHT (C) 2004 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE (GPL).
 *****************************************************************************/

#if COMPILING_GAME_PONY
#ifndef GAME_PONY_VIEW_HH
#define GAME_PONY_VIEW_HH 1

////////////////////////////////////////////////////////////////////////////////
/// @brief Primary view.
class ViewGamePony : public View
{
private:
	PREVENT_COPYING(ViewGamePony)
	typedef View Parent;

public:
	explicit	ViewGamePony( ViewMaster& master );
	void		Reset( void ) { }
	void		Reshape( int w, int h ) { }

	/// Enable/disable texturing in this view.
	/// Whether an object is actually textured depends on LOD.
	/// Engine::mTexturing or -no-texturing may override this.
	void SetTexturing( bool f )
	{
		mTexturing = f;
	}

	/// @return True if texturing is enabled in this view.
	/// Whether an object is actually textured also depends on LOD.
	/// Even then an class Draw() method might not texture the object depending on its distance.
	bool IfTexturing( void )
	{
#if 1
		// With advent of clouds and removal of simple tree models,
		// texturing has become necessary at any LOD.
		return true;
#else
		// Don't do texturing if user-selected LOD is too low or altitude is too high.
		return    mTexturing
			   && ! gEng.mEye.IfAboveAltitude( MAX_ALTITUDE_DETAIL )
			   && gEng.IfAtLeastLod( LOD_TEXTURE_LEAST );
#endif
	}

private:
	bool		mTexturing;
};

////////////////////////////////////////////////////////////////////////////////
/// @brief Radar view class.
class ViewRadar : public View
{
private:
	PREVENT_COPYING(ViewRadar)
	typedef View Parent;

public:
	enum eRadar { eRadar_HORIZON, eRadar_OVERHEAD };

					ViewRadar( ViewMaster& master, eRadar radar );
	virtual			~ViewRadar() { }
	void			Draw( void );
	void			Reset( void ) { }
	void			Reshape( int w, int h );
	bool			IfTexturing( void ) { return false; }
	void			SetTexturing( bool f ) { }

	eRadar			mRadar;
};

#endif // GAME_PONY_VIEW_HH
#endif // COMPILING_GAME_PONY
