?? decal.h
字號:
#if !defined(DECAL_H_)
#define DECAL_H_
#include <GL/glut.h>
#include <string.h>
#include "tga.h"
#include "utils.h"
#define HAIR_PYRAMID_WIDTH 0.01
#define HAIR_PYRAMID_HEIGHT 0.2
class Decal
{
public:
float fPhysicalTextureWidth;
float fPhysicalTextureHeight;
float fCenterTextureX;
float fCenterTextureY;
float fSinglePixelSize;
GLuint nPixelTextureWidth;
GLuint nPixelTextureHeight;
GLuint nDecalWidth;
GLuint nDecalHeight;
Decal();
Decal(tgaInfo *psImageFile);
Decal(char *sFileName);
~Decal();
void SetDecal(tgaInfo *psImageFile);
void SetDecal(char *sFileName);
void GetPixel(GLuint x, GLuint y, GLubyte &red, GLubyte &green, GLubyte &blue, GLubyte &alpha);
void InitGLTexture();
void Draw();
void DoTransform();
private:
GLuint texName;
GLubyte *pData;
void InitVariables();
float fTexCoordWidth;
float fTexCoordHeight;
GLuint nOldDecalWidth;
GLuint nOldDecalHeight;
GLfloat fWhiteDif[4];
GLfloat fBlackDif[4];
};
#endif // !defined(DECAL_H_)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -