// RayTracingView.h : interface of the CRayTracingView class
//

#include "Vector.h"
#include "Scene.h"
#include "Serializer.h"

#pragma once

#define PICX 1024
#define PICY 768
#define PICSIZE PICX*PICY

#define THREADS 16

#define FLATS 2
#define SPHERES 5
#define LIGHTS 2

// CRayTracingView window

class CRayTracingView : public CWnd
{
// Construction
public:
	CRayTracingView();

// Attributes
public:
	bool bReady;

	CVector3 Array[PICSIZE];
	int PicArray[PICSIZE];
	int ThreadInfo[THREADS];

	CScene Scene;

// Operations
public:

// Overrides
	protected:
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);

// Implementation
public:
	virtual ~CRayTracingView();

	void MakePicArray();
	void InvalidatePicture();

	// Generated message map functions
protected:
	afx_msg void OnPaint();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnMoveLeft();
	afx_msg void OnMoveRight();
	afx_msg void OnStepLeft();
	afx_msg void OnStepRight();
	afx_msg void OnMoveUp();
	afx_msg void OnMoveDown();
	afx_msg void OnMoveHigher();
	afx_msg void OnMoveLower();
	afx_msg void OnViewAmbient();
	afx_msg void OnViewDiffuse();
	afx_msg void OnViewSpecular();
	afx_msg void OnUpdateViewAmbient(CCmdUI *pCmdUI);
	afx_msg void OnUpdateViewDiffuse(CCmdUI *pCmdUI);
	afx_msg void OnUpdateViewSpecular(CCmdUI *pCmdUI);

};