// ===================================================================
//
// OBJsupport.h
// Additional OBJ functions 
//
// Initial coding by Martin Ruzicka

#ifndef OBJSUPPORT_H
#define OBJSUPPORT_H

#include "./material/MTLreader.h"
#include "./phong/Phong.h"
#include "./texture/TextureManager.h"
#include "./geometry/ModelStorage.h"
#include "./math/Mathematics.h"
#include <string>

using namespace std;
using namespace ANALYTICAL_GEOMETRY;

void convertMaterialToVRMLCompatible(MTLmaterial &material);
void initMaterialAndTextures(	MTLreader &reader, PhongMaterialManager &materialManager, 
								TextureManager &textureManager,  const string& textureNamePrefix,
								const string texturePathPrefix);

///Bounding box, which is defined with 6 points - MaxX point, MaxY point, MaxZ point and MinX point, MinY point and MinZ point.
struct BoundingBox
{
	enum BOUND_TYPE
	{
		MAX_X,
		MAX_Y,
		MAX_Z,
		MIN_X,
		MIN_Y,
		MIN_Z
	};

	Point_3<float> bound[6];
	
	static bool calculateBoundingBox( const vcoord_buffer &src_vcoord_buffer, BoundingBox &dstBoundingBox );
};


#endif