/*********************************************************************

Name:		Raytracer
Author:		Kamil Szatkowski "Netrix" (C)
Website:	http://www.netrix.org.pl/

*********************************************************************/
#pragma once
#include "NLib/nMath.hpp"

#ifndef MAX_PATH_LENGTH
#define MAX_PATH_LENGTH 255
#endif

#ifndef MAX_PATH_SIZE
#define MAX_PATH_SIZE MAX_PATH_LENGTH + 1
#endif

#define MAX_FILE_PATH 256

class SceneDesc
{
public:
	SceneDesc() : m_bLoaded(false) { }

	bool loadDescription(const char* szFile);

	const char* getScenePath() const		{ return m_szScenePath; }
	const char* getAttributesPath() const	{ return m_szAttributesPath; }
	const char* getCameraPath() const		{ return m_szCameraPath; }
	const char* getLightsPath() const		{ return m_szLightsPath; }

	operator bool() { return m_bLoaded; }

private:
	void trimCRNL(char* szString);

private:
	bool m_bLoaded;
	char m_szScenePath[MAX_PATH_SIZE];
	char m_szAttributesPath[MAX_PATH_SIZE];
	char m_szCameraPath[MAX_PATH_SIZE];
	char m_szLightsPath[MAX_PATH_SIZE];
};

// Additional custom attributes
struct CustomCamera
{
	NIne::NMVector3f vCamPos;
	NIne::NMVector3f vCamLook;
	bool bCustomCamera;
};

struct BrickDesc
{
	float fBrickWidth;
	float fBrickHeight;
	float fMortarWidth;
	bool bCustomBrick;
};

struct CustomAngle
{
	float fCoeff;
	bool bCustomAngle;
};

struct CustomResolution
{
	NIne::NUint32 uWidth;
	NIne::NUint32 uHeight;
	bool bCustomResolution;
};