Kochol Game Engine
0.1.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Material.h
Go to the documentation of this file.
1
// File name: Material.h
2
// Des: The Material class.
3
// Date: 2/1/1386
4
// Programmer: Ali Akbar Mohammadi(Kochol)
5
6
#ifndef MATERIAL_H
7
#define MATERIAL_H
8
9
#include "../KgeUnknown.h"
10
#include "../kgedef.h"
11
#include "../core/String.h"
12
#include "../core/KgeMemory.h"
13
#include "
Color.h
"
14
#include "
Shader.h
"
15
#include "
Texture.h
"
16
17
namespace
kge
18
{
19
namespace
gfx
20
{
23
class
Material
:
public
KgeUnknown
24
{
25
public
:
26
Material
() :
Shininess
(0.0f),
Alpha
(false),
TextureAlphal
(false),
Culling
(true)
27
{
28
shader
=
KGE_NEW
(
ShaderInstance
)();
29
for
(
int
i = 0; i < 8; i++)
30
ppTexture
[i] =
NULL
;
31
32
}
33
34
~Material
()
35
{
36
KGE_DELETE
(
shader
,
ShaderInstance
);
37
}
38
39
Material
&
operator =
(
const
Material
& mat)
40
{
41
Name
= mat.
Name
;
42
Ambient
= mat.
Ambient
;
43
Diffuse
= mat.
Diffuse
;
44
Specular
= mat.
Specular
;
45
Emissive
= mat.
Emissive
;
46
Shininess
= mat.
Shininess
;
47
for
(
int
i = 0; i < 8; i++)
48
ppTexture
[i] = mat.
ppTexture
[i];
49
*
shader
= *mat.
shader
;
50
Alpha
= mat.
Alpha
;
51
TextureAlphal
= mat.
TextureAlphal
;
52
Culling
= mat.
Culling
;
53
54
return
*
this
;
55
}
56
57
kge::core::String
Name
;
58
Colorf
Ambient
;
59
Colorf
Diffuse
;
60
Colorf
Specular
;
61
Colorf
Emissive
;
62
float
Shininess
;
63
Texture
*
ppTexture
[8];
64
ShaderInstance
*
shader
;
65
bool
Alpha
;
66
bool
TextureAlphal
;
67
bool
Culling
;
68
Colorf
Frensel
;
69
float
FrenselVal
;
70
71
};
// Material
72
73
}
// gfx
74
75
}
// kge
76
77
#endif // MATERIAL_H
E:
mycodes
git
kge
Include
gfx
Material.h
Generated on Mon Jan 6 2014 16:02:53 for Kochol Game Engine by
1.8.1.2