#ifndef _PAINTER_H_
#define _PAINTER_H_

#define _CRT_SECURE_NO_DEPRECATE //i won't use fopen_s; so, don't warn me

#define HAVE_SINGLEPRECISION_MATH //Eigen package does #include <complex> which conflicts with Inventor/C/basic.h definitions; so prevent them with this in files using include Inventor

//#include <Inventor/nodes/SoCoordinate3.h>
#include <Inventor/nodes/SoDrawStyle.h>
#include <Inventor/nodes/SoIndexedFaceSet.h>
#include <Inventor/nodes/SoMaterial.h>
#include <Inventor/nodes/SoMaterialBinding.h>
#include <Inventor/nodes/SoShapeHints.h>
#include <Inventor/nodes/SoIndexedLineSet.h>
#include <Inventor/nodes/SoPointSet.h>
#include <Inventor/nodes/SoTransform.h>
#include <Inventor/nodes/SoSphere.h>
#include <Inventor/nodes/SoCube.h>

#include "Mesh.h"

class Painter
{
public:
	SoSeparator* getShapeSeparator(Mesh* mesh, float deltaX = 0.0f, float deltaY = 0.0f, float scale = 1.0f);
	SoSeparator* get1PointSep(Mesh* obj, int pnt, float r = 0.7f, float g = 0.0f, float b = 7.0f);
	SoSeparator* get1PointSep(Mesh* obj, int pnt, bool sketch, float deltaX = 0.0f, float r = 1.0f, float g = 0.0f, float b = 1.0f);
	SoSeparator* get1PointSep(float x, float y, float z, float r = 0.7f, float g = 0.7f, float b = 0.0f);
	SoSeparator* getSphereSep(Mesh* obj);
	SoSeparator* getSphereSep(float x, float y, float z);
	SoSeparator* getSpheresSep(Mesh* obj, float deltaX = 0.0f, float deltaY = 0.0f, float scale = 1.0f);
	SoSeparator* getSpheresSepSketch(Mesh* obj, float deltaX = 0.0f, float deltaY = 0.0f, float scale = 1.0f);
	SoSeparator* getStrokesSepSketch(Mesh* sketch);
	SoSeparator* getStrokeSep(Mesh* sketch, int strokeID);
	SoSeparator* getPointsSep(Mesh* sketch, bool multicolor);
	SoSeparator* getPointsSep(Mesh* sketch);
	Painter(float radius) : sphereRadius(radius) {};
	float sphereRadius;
	SoSeparator* getMatchingLinesSep(Mesh* sketch, Mesh* mesh, float deltaX = 0.0f, float deltaY = 0.0f, float scale = 1.0f);
	SoSeparator* getMatchingSpheresSep(Mesh* sketch, Mesh* mesh, float deltaX = 0.0f, float deltaY = 0.0f, float scale = 1.0f);
};

#endif
