⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hair.h

📁 hair solusion, c&#226 cs ádasda
💻 H
字号:
#if !defined(HAIR_H_)
#define HAIR_H_

#include <GL/glut.h>

#include "decal.h"

#define HAIR_PYRAMID_WIDTH 0.01
#define HAIR_PYRAMID_HEIGHT 0.2

class Hair
{
public:
	Hair();
	~Hair();

	void CreateDisplayList(GLuint *id);
	void Draw();

	void SetTextureInfo(Decal *pInput);
	void SetPixelPos(GLuint x, GLuint y);

private:
	GLuint DisplayID;
	GLuint pixelx;
	GLuint pixely;

	float xangle;
	float yangle;

	float xpos;
	float ypos;

	Decal *pDecal;

	GLfloat fWhiteDif[4];
	GLfloat fBlackDif[4];

	float PixelToPhysicalPos(GLuint pixel, float fPhysicalSize, GLuint nPixelSize);

	void SetAnglesWithPixelLoc(GLuint x, GLuint y);
	void SetAnglesWithPixelColor(GLubyte r, GLubyte g, GLubyte b, GLubyte a);

	float GetAngleFromBytes(GLubyte high, GLubyte low);
};

#endif // !defined(HAIR_H_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -