|
Shinya Kitaoka |
810553 |
#pragma once
|
|
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 |
|
|
Shinya Kitaoka |
9f5a1b |
#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 |
|
|
Shinya Kitaoka |
120a6e |
class FourPoints {
|
|
Toshihiro Shimizu |
890ddd |
public:
|
|
Shinya Kitaoka |
120a6e |
TPointD m_p00;
|
|
Shinya Kitaoka |
120a6e |
TPointD m_p01;
|
|
Shinya Kitaoka |
120a6e |
TPointD m_p10;
|
|
Shinya Kitaoka |
120a6e |
TPointD m_p11;
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
FourPoints() : m_p00(), m_p01(), m_p10(), m_p11() {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
FourPoints(const TPointD &p00, const TPointD &p01, const TPointD &p10,
|
|
Shinya Kitaoka |
120a6e |
const TPointD &p11)
|
|
Shinya Kitaoka |
120a6e |
: m_p00(p00), m_p01(p01), m_p10(p10), m_p11(p11) {}
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
bool operator==(const FourPoints &fp) const {
|
|
Shinya Kitaoka |
120a6e |
return m_p00 == fp.m_p00 && m_p10 == fp.m_p10 && m_p01 == fp.m_p01 &&
|
|
Shinya Kitaoka |
120a6e |
m_p11 == fp.m_p11;
|
|
Shinya Kitaoka |
120a6e |
}
|
|
Shinya Kitaoka |
120a6e |
bool operator!=(const FourPoints &fp) const { return !(*this == fp); }
|
|
Toshihiro Shimizu |
890ddd |
};
|
|
Toshihiro Shimizu |
890ddd |
|
|
luz paz |
6454c4 |
// this function computes the perspective transformation 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)
|
|
Shinya Kitaoka |
120a6e |
FourPoints computeTransformed(const FourPoints &transfFrom,
|
|
Shinya Kitaoka |
120a6e |
const FourPoints &transfTo,
|
|
Shinya Kitaoka |
120a6e |
const FourPoints &from);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Toshihiro Shimizu |
890ddd |
//--------------------------------------------------------------------------------
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void subdivision(const TPointD &p00, const TPointD &p10, const TPointD &p11,
|
|
Shinya Kitaoka |
120a6e |
const TPointD &p01, const TPointD &tex00, const TPointD &tex10,
|
|
Shinya Kitaoka |
120a6e |
const TPointD &tex11, const TPointD &tex01,
|
|
Shinya Kitaoka |
120a6e |
const TRectD &clippingRect, int details);
|
|
Toshihiro Shimizu |
890ddd |
|
|
Shinya Kitaoka |
120a6e |
void subCompute(TRasterFxPort &m_input, TTile &tile, double frame,
|
|
Shinya Kitaoka |
120a6e |
const TRenderSettings &ri, TPointD p00, TPointD p01,
|
|
Shinya Kitaoka |
120a6e |
TPointD p11, TPointD p10, int details, bool wireframe,
|
|
Shinya Kitaoka |
120a6e |
TDimension m_offScreenSize, bool isCast = false);
|
|
Toshihiro Shimizu |
890ddd |
#endif
|