This commit is contained in:
ViktorLjung
2014-03-12 22:41:53 +01:00
parent f1f9fc4fc1
commit 56ccc31e57
15 changed files with 46 additions and 39468 deletions
+6 -6
View File
@@ -45,7 +45,7 @@ void GameWorld::Initialize()
pointLight->quadraticAttenuation = 0.f;
pointLight->spotExponent = 0.0f;
model = AddComponent<Components::Model>(ent, "Model");
model->ModelFile = "sphere.obj";
model->ModelFile = "Models/sphere.obj";
ent = CreateEntity();
transform = AddComponent<Components::Transform>(ent, "Transform");
transform->Position = glm::vec3(10.f, 4.f, 0.f);
@@ -60,7 +60,7 @@ void GameWorld::Initialize()
pointLight->quadraticAttenuation = 0.f;
pointLight->spotExponent = 0.0f;
model = AddComponent<Components::Model>(ent, "Model");
model->ModelFile = "sphere.obj";
model->ModelFile = "Models/sphere.obj";
ent = CreateEntity();
transform = AddComponent<Components::Transform>(ent, "Transform");
transform->Position = glm::vec3(0.f, -4.f, 0.f);
@@ -74,27 +74,27 @@ void GameWorld::Initialize()
pointLight->quadraticAttenuation = 0.f;
pointLight->spotExponent = 0.0f;
model = AddComponent<Components::Model>(ent, "Model");
model->ModelFile = "sphere.obj";
model->ModelFile = "Models/sphere.obj";
//ground
ent = CreateEntity();
transform = AddComponent<Components::Transform>(ent, "Transform");
transform->Position = glm::vec3(0.f, -4.f, 0.f);
model = AddComponent<Components::Model>(ent, "Model");
model->ModelFile = "plane.obj";
model->ModelFile = "Models/plane.obj";
// Player
ent = CreateEntity();
transform = AddComponent<Components::Transform>(ent, "Transform");
transform->Position = glm::vec3(0.f, 0.f, 0.f);
model = AddComponent<Components::Model>(ent, "Model");
model->ModelFile = "ship.obj";
model->ModelFile = "Models/ship.obj";
ent = CreateEntity();
transform = AddComponent<Components::Transform>(ent, "Transform");
transform->Position = glm::vec3(10.f, 0.f, 0.f);
model = AddComponent<Components::Model>(ent, "Model");
model->ModelFile = "ship.obj";
model->ModelFile = "Models/ship.obj";
}
void GameWorld::Update(double dt)

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -0,0 +1,12 @@
# Blender MTL File: 'obstaclesandstuff.blend'
# Material Count: 1
newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.559600 0.559600 0.559600
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
map_Kd ObstacleTexture.png

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

@@ -3,6 +3,24 @@
void Systems::LevelGenerationSystem::SpawnObstacle()
{
std::shared_ptr<Components::Transform> transform;
std::shared_ptr<Components::Bounds> bounds;
std::shared_ptr<Components::Collision> collision;
std::shared_ptr<Components::Model> model;
EntityID ent;
ent = m_World->CreateEntity();
m_World->SetProperty(ent, "Name", std::string("Obstacle"));
transform = m_World->AddComponent<Components::Transform>(ent, "Transform");
transform->Position = glm::vec3(0,0,0); // fix position
bounds = m_World->AddComponent<Components::Bounds>(ent, "Bounds");
bounds->VolumeVector = glm::vec3(4, 4, 4);
collision = m_World->AddComponent<Components::Collision>(ent, "Collision");
model = m_World->AddComponent<Components::Model>(ent, "Model");
}
@@ -2,6 +2,15 @@
#define LevelGenerationSystem_h__
#include "System.h"
#include "World.h"
#include "Components/Transform.h"
#include "Components/Bounds.h"
#include "Components/Collision.h"
#include "Components/Model.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
namespace Systems
{
@@ -14,7 +23,7 @@ namespace Systems
void SpawnObstacle();
private:
};
}
-17
View File
@@ -1,17 +0,0 @@
# Blender v2.69 (sub 0) OBJ File: 'obstaclesandstuff.blend'
# www.blender.org
mtllib plane.mtl
o Plane_Plane.001
v 102.461288 0.778257 97.553291
v -97.538712 0.778257 97.553291
v 102.461288 0.778257 -102.446709
v -97.538712 0.778257 -102.446709
vt 0.000100 0.000100
vt 0.999900 0.000100
vt 0.000100 0.999900
vt 0.999900 0.999900
vn 0.000000 1.000000 0.000000
usemtl Material.004
s off
f 2/1/1 1/2/1 4/3/1
f 1/2/1 3/4/1 4/3/1
File diff suppressed because it is too large Load Diff
-211
View File
@@ -1,211 +0,0 @@
# Blender v2.69 (sub 0) OBJ File: 'obstaclesandstuff.blend'
# www.blender.org
mtllib sphere.mtl
o Icosphere
v -0.000000 -0.184854 -0.000000
v 0.133761 -0.082670 0.097182
v -0.051091 -0.082670 0.157246
v -0.165338 -0.082669 -0.000000
v -0.051091 -0.082670 -0.157246
v 0.133761 -0.082670 -0.097182
v 0.051091 0.082670 0.157246
v -0.133761 0.082670 0.097182
v -0.133761 0.082670 -0.097182
v 0.051091 0.082670 -0.157246
v 0.165338 0.082669 -0.000000
v -0.000000 0.184854 -0.000000
v -0.030031 -0.157247 0.092426
v 0.078622 -0.157247 0.057122
v 0.048592 -0.097185 0.149549
v 0.157245 -0.097184 -0.000000
v 0.078622 -0.157247 -0.057122
v -0.097183 -0.157246 -0.000000
v -0.127214 -0.097184 0.092426
v -0.030031 -0.157247 -0.092426
v -0.127214 -0.097184 -0.092426
v 0.048592 -0.097185 -0.149549
v 0.175807 0.000000 0.057122
v 0.175807 0.000000 -0.057122
v -0.000000 0.000000 0.184854
v 0.108654 0.000000 0.149550
v -0.175807 0.000000 0.057122
v -0.108654 0.000000 0.149550
v -0.108654 0.000000 -0.149550
v -0.175807 0.000000 -0.057122
v 0.108654 0.000000 -0.149550
v -0.000000 0.000000 -0.184854
v 0.127214 0.097184 0.092426
v -0.048592 0.097185 0.149549
v -0.157245 0.097184 -0.000000
v -0.048592 0.097185 -0.149549
v 0.127214 0.097184 -0.092426
v 0.030031 0.157247 0.092426
v 0.097183 0.157246 -0.000000
v -0.078622 0.157247 0.057122
v -0.078622 0.157247 -0.057122
v 0.030031 0.157247 -0.092426
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vn 0.102381 -0.943523 0.315090
vn 0.700224 -0.661699 0.268032
vn -0.268034 -0.943523 0.194737
vn -0.268034 -0.943523 -0.194737
vn 0.102381 -0.943523 -0.315090
vn 0.904989 -0.330385 0.268031
vn 0.024747 -0.330386 0.943521
vn -0.889697 -0.330385 0.315095
vn -0.574602 -0.330387 -0.748784
vn 0.534576 -0.330386 -0.777865
vn 0.802609 -0.125627 0.583127
vn -0.306569 -0.125628 0.943522
vn -0.992077 -0.125629 0.000000
vn -0.306569 -0.125628 -0.943522
vn 0.802609 -0.125627 -0.583127
vn 0.408946 0.661699 0.628425
vn -0.471300 0.661699 0.583122
vn -0.700224 0.661699 -0.268032
vn 0.038530 0.661699 -0.748779
vn 0.724042 0.661695 -0.194736
vn -0.038530 -0.661699 0.748779
vn 0.187594 -0.794658 0.577345
vn 0.471300 -0.661699 0.583122
vn 0.700224 -0.661699 -0.268032
vn 0.607060 -0.794656 0.000000
vn 0.331304 -0.943524 0.000000
vn -0.724042 -0.661695 0.194736
vn -0.491119 -0.794658 0.356821
vn -0.408946 -0.661699 0.628425
vn -0.408946 -0.661699 -0.628425
vn -0.491119 -0.794657 -0.356821
vn -0.724042 -0.661695 -0.194736
vn 0.471300 -0.661699 -0.583122
vn 0.187594 -0.794658 -0.577345
vn -0.038530 -0.661699 -0.748779
vn 0.992077 0.125629 0.000000
vn 0.982246 -0.187599 0.000000
vn 0.904989 -0.330385 -0.268031
vn 0.306569 0.125628 0.943522
vn 0.303531 -0.187597 0.934171
vn 0.534576 -0.330386 0.777865
vn -0.802609 0.125627 0.583127
vn -0.794655 -0.187595 0.577348
vn -0.574602 -0.330387 0.748783
vn -0.802609 0.125627 -0.583127
vn -0.794655 -0.187595 -0.577348
vn -0.889697 -0.330385 -0.315095
vn 0.306569 0.125628 -0.943522
vn 0.303531 -0.187597 -0.934171
vn 0.024747 -0.330386 -0.943521
vn 0.574602 0.330387 0.748784
vn 0.794656 0.187595 0.577348
vn 0.889697 0.330385 0.315095
vn -0.534576 0.330386 0.777864
vn -0.303531 0.187597 0.934171
vn -0.024747 0.330386 0.943521
vn -0.904989 0.330385 -0.268031
vn -0.982246 0.187599 0.000000
vn -0.904989 0.330384 0.268031
vn -0.024747 0.330386 -0.943521
vn -0.303531 0.187597 -0.934171
vn -0.534576 0.330386 -0.777865
vn 0.889697 0.330385 -0.315095
vn 0.794655 0.187595 -0.577348
vn 0.574602 0.330387 -0.748784
vn 0.268034 0.943523 0.194737
vn 0.491120 0.794657 0.356821
vn 0.724042 0.661695 0.194736
vn -0.102381 0.943523 0.315090
vn -0.187594 0.794658 0.577345
vn 0.038530 0.661699 0.748779
vn -0.331304 0.943524 0.000000
vn -0.607060 0.794656 0.000000
vn -0.700224 0.661699 0.268032
vn -0.102381 0.943524 -0.315090
vn -0.187594 0.794658 -0.577345
vn -0.471300 0.661699 -0.583122
vn 0.268034 0.943523 -0.194736
vn 0.491120 0.794657 -0.356821
vn 0.408947 0.661699 -0.628425
usemtl Material.001
s off
f 1/1/1 14/2/1 13/3/1
f 2/1/2 14/2/2 16/3/2
f 1/1/3 13/2/3 18/3/3
f 1/1/4 18/2/4 20/3/4
f 1/1/5 20/2/5 17/3/5
f 2/1/6 16/2/6 23/3/6
f 3/1/7 15/2/7 25/3/7
f 4/1/8 19/2/8 27/3/8
f 5/1/9 21/2/9 29/3/9
f 6/1/10 22/2/10 31/3/10
f 2/1/11 23/2/11 26/3/11
f 3/1/12 25/2/12 28/3/12
f 4/1/13 27/2/13 30/3/13
f 5/1/14 29/2/14 32/3/14
f 6/1/15 31/2/15 24/3/15
f 7/1/16 33/2/16 38/3/16
f 8/1/17 34/2/17 40/3/17
f 9/1/18 35/2/18 41/3/18
f 10/1/19 36/2/19 42/3/19
f 11/1/20 37/2/20 39/3/20
f 13/1/21 15/2/21 3/3/21
f 13/1/22 14/2/22 15/3/22
f 14/1/23 2/2/23 15/3/23
f 16/1/24 17/2/24 6/3/24
f 16/1/25 14/2/25 17/3/25
f 14/1/26 1/2/26 17/3/26
f 18/1/27 19/2/27 4/3/27
f 18/1/28 13/2/28 19/3/28
f 13/1/29 3/2/29 19/3/29
f 20/1/30 21/2/30 5/3/30
f 20/1/31 18/2/31 21/3/31
f 18/1/32 4/2/32 21/3/32
f 17/1/33 22/2/33 6/3/33
f 17/1/34 20/2/34 22/3/34
f 20/1/35 5/2/35 22/3/35
f 23/1/36 24/2/36 11/3/36
f 23/1/37 16/2/37 24/3/37
f 16/1/38 6/2/38 24/3/38
f 25/1/39 26/2/39 7/3/39
f 25/1/40 15/2/40 26/3/40
f 15/1/41 2/2/41 26/3/41
f 27/1/42 28/2/42 8/3/42
f 27/1/43 19/2/43 28/3/43
f 19/1/44 3/2/44 28/3/44
f 29/1/45 30/2/45 9/3/45
f 29/1/46 21/2/46 30/3/46
f 21/1/47 4/2/47 30/3/47
f 31/1/48 32/2/48 10/3/48
f 31/1/49 22/2/49 32/3/49
f 22/1/50 5/2/50 32/3/50
f 26/1/51 33/2/51 7/3/51
f 26/1/52 23/2/52 33/3/52
f 23/1/53 11/2/53 33/3/53
f 28/1/54 34/2/54 8/3/54
f 28/1/55 25/2/55 34/3/55
f 25/1/56 7/2/56 34/3/56
f 30/1/57 35/2/57 9/3/57
f 30/1/58 27/2/58 35/3/58
f 27/1/59 8/2/59 35/3/59
f 32/1/60 36/2/60 10/3/60
f 32/1/61 29/2/61 36/3/61
f 29/1/62 9/2/62 36/3/62
f 24/1/63 37/2/63 11/3/63
f 24/1/64 31/2/64 37/3/64
f 31/1/65 10/2/65 37/3/65
f 38/1/66 39/2/66 12/3/66
f 38/1/67 33/2/67 39/3/67
f 33/1/68 11/2/68 39/3/68
f 40/1/69 38/2/69 12/3/69
f 40/1/70 34/2/70 38/3/70
f 34/1/71 7/2/71 38/3/71
f 41/1/72 40/2/72 12/3/72
f 41/1/73 35/2/73 40/3/73
f 35/1/74 8/2/74 40/3/74
f 42/1/75 41/2/75 12/3/75
f 42/1/76 36/2/76 41/3/76
f 36/1/77 9/2/77 41/3/77
f 39/1/78 42/2/78 12/3/78
f 39/1/79 37/2/79 42/3/79
f 37/1/80 10/2/80 42/3/80
-115
View File
@@ -1,115 +0,0 @@
# Max2Mtl Version 4.0 Mar 10th, 2001
#
# Multi/Sub Material__10791 (9) to come
#
newmtl Material__46
Ka 0.1 0.1 0.1
Kd 0.5 0.5 0.5
Ks 0.9 0.9 0.9
d 1.0
Ns 0.5
illum 2
#
newmtl Material__47
Ka 0.1 0.1 0.1
Kd 0.5 0.5 0.5
Ks 0.9 0.9 0.9
d 1.0
Ns 0.5
illum 2
#
newmtl Material__48
Ka 0.1 0.1 0.1
Kd 0.5 0.5 0.5
Ks 0.9 0.9 0.9
d 1.0
Ns 0.5
illum 2
#
newmtl Material__49
Ka 0.1 0.1 0.1
Kd 0.5 0.5 0.5
Ks 0.9 0.9 0.9
d 1.0
Ns 0.5
illum 2
#
newmtl Material__50
Ka 0.1 0.1 0.1
Kd 0.5 0.5 0.5
Ks 0.9 0.9 0.9
d 1.0
Ns 0.5
illum 2
#
newmtl Material__51
Ka 0.1 0.1 0.1
Kd 0.5 0.5 0.5
Ks 0.9 0.9 0.9
d 1.0
Ns 0.5
illum 2
#
newmtl Material__52
Ka 0.1 0.1 0.1
Kd 0.5 0.5 0.5
Ks 0.9 0.9 0.9
d 1.0
Ns 0.5
illum 2
#
newmtl Material__10657
Ka 0.6 0.6 0.6
Kd 0.6 0.6 0.6
Ks 0.9 0.9 0.9
d 1.0
Ns 0.0
illum 2
#
newmtl Material__10658
Ka 0.6 0.6 0.6
Kd 0.6 0.6 0.6
Ks 0.9 0.9 0.9
d 1.0
Ns 0.0
illum 2
#
# Multi/Sub Material__10791 done
#
# Multi/Sub Material__10737 (3) to come
#
newmtl Material__10678
Ka 1.0 1.0 1.0
Kd 1.0 1.0 1.0
Ks 0.9 0.9 0.9
d 1.0
Ns 0.0
illum 2
#
newmtl Material__69
Ka 0.6 0.6 0.6
Kd 0.6 0.6 0.6
Ks 0.9 0.9 0.9
d 1.0
Ns 0.0
illum 2
#
newmtl Material__10677
Ka 0.6 0.6 0.6
Kd 0.6 0.6 0.6
Ks 0.9 0.9 0.9
d 1.0
Ns 0.0
illum 2
#
# Multi/Sub Material__10737 done
#
newmtl 03_-_Default
Ka 0.5 0.5 0.5
Kd 0.5 0.5 0.5
Ks 0.9 0.9 0.9
d 1.0
Ns 0.0
illum 2
#
# EOF
File diff suppressed because it is too large Load Diff