-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathStoneBlock.cpp
More file actions
63 lines (49 loc) · 1.39 KB
/
StoneBlock.cpp
File metadata and controls
63 lines (49 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// StoneBlock.cpp
// Project
//
// Created by Inês on 10/31/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#include "StoneBlock.h"
namespace CastleBlast {
StoneBlock::StoneBlock(cg::Vector3d startFrom) : Block(startFrom) {
topBottom_mat_ambient[0] = 0.5f;
topBottom_mat_ambient[1] = 0.5f;
topBottom_mat_ambient[2] = 0.5f;
topBottom_mat_ambient[3] = 1.0f;
topBottom_mat_difusse[0] = 0.4f;
topBottom_mat_difusse[1] = 0.4f;
topBottom_mat_difusse[2] = 0.4f;
topBottom_mat_difusse[3] = 1.0f;
topBottom_mat_specular[0] = 0.2f;
topBottom_mat_specular[1] = 0.2f;
topBottom_mat_specular[2] = 0.2f;
topBottom_mat_specular[3] = 1.0f;
topBottom_shininess = 5;
side_mat_ambient[0] = 0.5f;
side_mat_ambient[1] = 0.5f;
side_mat_ambient[2] = 0.5f;
side_mat_ambient[3] = 1.0f;
side_mat_difusse[0] = 0.4f;
side_mat_difusse[1] = 0.4f;
side_mat_difusse[2] = 0.4f;
side_mat_difusse[3] = 1.0f;
side_mat_specular[0] = 0.2f;
side_mat_specular[1] = 0.2f;
side_mat_specular[2] = 0.2f;
side_mat_specular[3] = 1.0f;
side_shininess = 5;
loadTextures();
}
StoneBlock::~StoneBlock() {}
void StoneBlock::loadTextures()
{
#ifdef __APPLE__
_topBottomTexture = Loader::loadTexture("Textures/stone.png");
#else
_topBottomTexture = Loader::loadTexture("..\\..\\src\\Textures\\stone.png");
#endif
_sideTexture = _topBottomTexture;
}
}