Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef PINS_H
Toshihiro Shimizu 890ddd
#define PINS_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//#include "tfxparam.h"
Toshihiro Shimizu 890ddd
//#include "trop.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "trasterfx.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//#include "stdfx.h"
Toshihiro Shimizu 890ddd
//#include "tfx.h"
Toshihiro Shimizu 890ddd
//#include "tparamset.h"
Toshihiro Shimizu 890ddd
#include "tgl.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifdef WIN32
Toshihiro Shimizu 890ddd
#include <gl gl.h=""></gl>
Toshihiro Shimizu 890ddd
#include <gl glu.h=""></gl>
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//#ifdef MACOSX
Toshihiro Shimizu 890ddd
//#include <glut glut.h=""></glut>
Toshihiro Shimizu 890ddd
//#define GLUT_NO_LIB_PRAGMA
Toshihiro Shimizu 890ddd
//#define GLUT_NO_WARNING_DISABLE
Toshihiro Shimizu 890ddd
//#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
///#include "offscreengl.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class FourPoints
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	TPointD m_p00;
Toshihiro Shimizu 890ddd
	TPointD m_p01;
Toshihiro Shimizu 890ddd
	TPointD m_p10;
Toshihiro Shimizu 890ddd
	TPointD m_p11;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	FourPoints()
Toshihiro Shimizu 890ddd
		: m_p00(), m_p01(), m_p10(), m_p11() {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	FourPoints(const TPointD &p00, const TPointD &p01, const TPointD &p10, const TPointD &p11)
Toshihiro Shimizu 890ddd
		: m_p00(p00), m_p01(p01), m_p10(p10), m_p11(p11) {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	bool operator==(const FourPoints &fp) const { return m_p00 == fp.m_p00 && m_p10 == fp.m_p10 && m_p01 == fp.m_p01 && m_p11 == fp.m_p11; }
Toshihiro Shimizu 890ddd
	bool operator!=(const FourPoints &fp) const { return !(*this == fp); }
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//this function computes the perspective trasformation defined with
Toshihiro Shimizu 890ddd
//-transfFrom, transfTo- (the points in transfFrom goes in transfTo)
Toshihiro Shimizu 890ddd
// and applies it on the fourPoints from, and returns the result)
Toshihiro Shimizu 890ddd
FourPoints computeTransformed(const FourPoints &transfFrom, const FourPoints &transfTo, const FourPoints &from);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//--------------------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void subdivision(const TPointD &p00,
Toshihiro Shimizu 890ddd
				 const TPointD &p10,
Toshihiro Shimizu 890ddd
				 const TPointD &p11,
Toshihiro Shimizu 890ddd
				 const TPointD &p01,
Toshihiro Shimizu 890ddd
				 const TPointD &tex00,
Toshihiro Shimizu 890ddd
				 const TPointD &tex10,
Toshihiro Shimizu 890ddd
				 const TPointD &tex11,
Toshihiro Shimizu 890ddd
				 const TPointD &tex01,
Toshihiro Shimizu 890ddd
				 const TRectD &clippingRect,
Toshihiro Shimizu 890ddd
				 int details);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
void subCompute(TRasterFxPort &m_input, TTile &tile, double frame, const TRenderSettings &ri,
Toshihiro Shimizu 890ddd
				TPointD p00, TPointD p01, TPointD p11, TPointD p10, int details, bool wireframe,
Toshihiro Shimizu 890ddd
				TDimension m_offScreenSize, bool isCast = false);
Toshihiro Shimizu 890ddd
#endif