#ifndef _ENGINE_TEXTURE_HPP_ #define _ENGINE_TEXTURE_HPP_ #ifndef _COMMON_VECTOR2D_HPP_ #include #endif #ifndef _ENGINE_VECTOR3D_HPP_ #include #endif #ifndef _ENGINE_DEVICE3D_HPP_ #include #endif #ifndef _ENGINE_PUREEDGE_HPP_ #include #endif #ifndef _ENGINE_PUREMAP_HPP_ #include #endif #ifndef _ENGINE_ASMUTIL_HPP_ #include #endif class DIBitmap; class Bitmap; class Triangle3D; class DIB3D; class Texture { public: enum TriMap{MapCenter,MapLowerLeft,MapUpperRight}; typedef void (Texture::*PMFI)(long pixelPoint,long imagePoint); Texture(const Vector3D &dstPoints,Bitmap &textureBitmap,DIB3D &displayBitmap); Texture(const Vector3D &dstPoints,Bitmap &textureBitmap,Bitmap &displayBitmap,Device3D &displayDevice); Texture(const Vector3D &dstPoints,Bitmap &textureBitmap,DIBitmap &displayBitmap,Device3D &displayDevice); Texture(const Vector2D &dstPoints,Bitmap &textureBitmap,DIBitmap &displayBitmap); Texture(const Triangle3D &angle3D,Bitmap &textureBitmap,DIBitmap &displayBitmap,Device3D &displayDevice,TriMap triMap=MapCenter); virtual ~Texture(); void mapTexture(void); private: enum EdgeType{LeftEdge=-1,RightEdge=1}; Texture &operator=(const Texture &someTexture); PureEdge mLeftEdge; PureEdge mRightEdge; PureMap mEdgeMap; Vector2D mTexturePoints; Vector2D mDstPoints2D; Vector3D mDstPoints3D; }; inline Texture &Texture::operator=(const Texture &/*someTexture*/) { // undefined return *this; } inline Texture::~Texture() { } inline void Texture::mapTexture(void) { ::initEdge(LeftEdge,&mLeftEdge); ::initEdge(RightEdge,&mRightEdge); ::mapTexture(&mEdgeMap); } #endif