📄 5g_material.h
字号:
// 5G_Material.h: interface for the C5G_Material class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_5G_MATERIAL_H__F78334E6_1099_49EF_99D5_05ABB496F8AD__INCLUDED_)
#define AFX_5G_MATERIAL_H__F78334E6_1099_49EF_99D5_05ABB496F8AD__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "5g_4dvertex.h"
class C5G_Material
{
public:
C5G_Material()
{
//default value about material
m_color = C5G_4DVertex(0.0f, 0.0f, 0.0f, 1.0f);
m_ambient = C5G_4DVertex(0.2f, 0.2f, 0.2f, 1.0f);
m_specular = C5G_4DVertex(0.0f, 0.0f, 0.0f, 1.0f);
m_emission = C5G_4DVertex(0.0f, 0.0f, 0.0f, 1.0f);
m_diffuse = C5G_4DVertex(0.8f, 0.8f, 0.8f, 1.0f);
m_shininess = 0.0f;
m_texturefile = NULL;
}
virtual ~C5G_Material();
/*
[#color x y z r]
[#ambient x y z r]
[#specular x y z r]
[#diffuse x y z r]
[#emission x y z r]
[#shininess s]
*/
public:
C5G_4DVertex m_color;
C5G_4DVertex m_ambient;
C5G_4DVertex m_specular;
C5G_4DVertex m_diffuse;
C5G_4DVertex m_emission;
float m_shininess;
char* m_texturefile;
public:
void SetTextureFile(char* filename)
{
if(m_texturefile != NULL)
delete []m_texturefile;
m_texturefile = new char[strlen(filename)];
strcpy(m_texturefile, filename);
}
};
#endif // !defined(AFX_5G_MATERIAL_H__F78334E6_1099_49EF_99D5_05ABB496F8AD__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -