// ScrollingProfile.h: interface for the CScrollingProfile class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_SCROLLINGPROFILE_H__4EC638D0_A00B_415C_BDF9_FD56BC6B83C1__INCLUDED_)
#define AFX_SCROLLINGPROFILE_H__4EC638D0_A00B_415C_BDF9_FD56BC6B83C1__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "OpenGLBase.h"

#define PALSIZE		256
#define MAX_BEAMS	1024

#pragma pack(1)

typedef struct tagSINGLE_POINT
{
	double		depth;
	double		distance;
}SINGLE_POINT;

typedef struct tagBATHY_POINTS
{
	double			numPoints; //-1 == none
	double			minDepth;
	double			maxDepth;
	double			minDist;
	double			maxDist;
	double			distOff;
	SINGLE_POINT	profile[MAX_BEAMS];
}
BATHY_POINTS;

typedef struct tagBATHY_PALETTE
{
	COLORREF	colorValue;
}
BATHY_PALETTE;

typedef enum tagPALETTE_STYLE
{
	DEFAULT = 0,
	SEABAT,
	JET,
	QUALITY
}
PALETTE_STYLE;

#pragma pack()




class CScrollingProfile : public COpenGLBase  
{
public:

					CScrollingProfile			(	void );
	virtual			~CScrollingProfile			(	void );

	DWORD			AddPoints					(	float			*travelTime,
													UINT			beamCount );
	
	DWORD			ForceRender					(	void );	//renders without history update
	DWORD			ForceFullRender				(	void ); //renders nd increments history


	//this stores the color for each value range
	//the REAL min/max depths are used to recompute this
	//on a ping to ping basis(?)/
	


    DWORD           Render						(	BOOL			flag);

    DWORD           DraxAxis					(	void );

    DWORD           DrawProfile					(	BOOL			skipMemMove);

	void			RampColor					(	int				first, 
													int				last, 
													int				r1, int g1, int b1, 
													int				r2, int g2, int b2 );

	float			m_fPointSize;
	
	double			m_dMinDistance;
	double			m_dMaxDistance;
	double			m_dMinDepth;
	double			m_dMaxDepth;
	double			m_dDistanceOffset;
				  
	double			m_dRealMaxDepth,  m_dRealMinDepth;

	char			m_labels[128];
	
	BATHY_PALETTE	m_rgbPalette[PALSIZE];


};

#endif // !defined(AFX_SCROLLINGPROFILE_H__4EC638D0_A00B_415C_BDF9_FD56BC6B83C1__INCLUDED_)
