#pragma once

#include "l4vidrnd.h"
#include "..\munga\rotation.h"
#include "..\munga\reticle.h"
#include "..\munga\simulate.h"
#include "..\munga\linmtrx.h"

// RB 1/14/07
//#include <dpl\dpl.h>
//#include <dpl\dplutils.h>
//#include <dpl\dpl_2d.h>

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// StripChartRenderable
//
class StripChartRenderable:
	public VideoRenderable
{
	public:
		StripChartRenderable(
			Entity					*entity,					// Entity to attach the renderable to
			ExecutionType			execution_type,		// How/when to execute the renderable
			dpl_VIEW					*this_view,				// the view associated with our eye
			float						left,
			float						right,
			float						top,
			float						bottom,
			int						max_samples,			// The number of samples to hold
			int						max_value,				//	The maximum value allowed
			int						min_value,				// the minimum value allowed
			int						*value_to_chart,		// the value we will be graphing
			int						update_interval);		// How frequently (in frames) to update the graphics

		~StripChartRenderable();

		Logical
			TestInstance() const;

		void
			Execute();

	protected:
		dpl_VIEW
			*myView;
		dpl2d_DISPLAY
			*mySystemDisplayList,
			*myDisplayList;
		int
			myMaxSamples,
			myMaxValue,
			myMinValue,
			*myValue,
			*myValueStorage,
			myUpdateInterval,
			myFrameCount,
			myCurrentSample;
		float
			myLeft,
			myRight,
			myTop,
			myBottom;

};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// RendererChartRenderable
//
class RendererChartRenderable:
	public VideoRenderable
{
	public:
		RendererChartRenderable(
			Entity					*entity,					// Entity to attach the renderable to
			ExecutionType			execution_type,		// How/when to execute the renderable
			dpl_VIEW					*this_view,				// the view associated with our eye
			float						left,
			float						right,
			float						top,
			float						bottom,
			int						max_samples,			// The number of samples to hold
			int						max_value,				//	The maximum value allowed
			int						min_value,				// the minimum value allowed
			int						update_interval);		// How frequently (in frames) to update the graphics

		~RendererChartRenderable();

		Logical
			TestInstance() const;

		void
			Execute();

	protected:
		dpl_VIEW
			*myView;
		dpl2d_DISPLAY
			*mySystemDisplayList,
			*myDisplayList;
		int
			*myCullStorage,
			*myDrawStorage,
			*myFrameStorage,
			*myPixelPlanesStorage,
			*myPrimativeStorage,
			myMaxSamples,
			myMaxValue,
			myMinValue,
			myUpdateInterval,
			myFrameCount,
			myCurrentSample;
		float
			myLeft,
			myRight,
			myTop,
			myBottom;

};