Author SHA1 Message Date
Dofensmirtsz c3b9e23f3d last stuff 2016-06-09 12:43:17 +02:00
kennyboy55 87e94056cc Merge remote-tracking branch 'origin/heightmapTrees' into heightmapTrees
# Conflicts:
#	HeightMap.cpp
2016-06-03 11:40:52 +02:00
kennyboy55 c43718f8fa Merge branch 'developer' into heightmapTrees
# Conflicts:
#	CrystalPoint.cpp
#	HeightMap.cpp
2016-06-03 11:39:19 +02:00
Dofensmirtsz 23f1ca4f34 fix 2016-06-03 11:34:19 +02:00
kennyboy55 95febc136f Merge pull request #9 from CrystalPointA4/feature/interface
Feature/interface
2016-06-03 11:14:46 +02:00
Dofensmirtsz e2f13cd311 Rocky places 2016-06-03 11:13:01 +02:00
kennyboy55 b4a2da4b88 Merge pull request #8 from CrystalPointA4/worldLoading
Added world loading and other various improvements
2016-06-03 11:12:23 +02:00
Dofensmirtsz ba9f15ee5c SJ:Dgbkjzdfxgbdzfjkgbkjfdg 2016-06-02 13:45:45 +02:00
Dofensmirtsz 644437a5f0 Draak shit 2016-06-01 02:06:22 +02:00
Dofensmirtsz 353efb38c5 Begin wereld 2016-05-31 13:05:37 +02:00
Dofensmirtsz ae5a28f273 Spikey path fixed 2016-05-31 08:46:33 +02:00
kennyboy55 1ade6002c1 Bugfix/performance improvement 2016-05-30 13:12:51 +02:00
Dofensmirtsz 6f28527be4 Stoneworld 2016-05-29 15:10:16 +02:00
Dofensmirtsz f6f6889c63 Jannick is fag 2016-05-29 14:45:04 +02:00
Dofensmirtsz 638c507276 Maze init 2016-05-28 17:36:04 +02:00
kennyboy55 ae80c7a5bf Add health/xp/level interface 2016-05-28 16:04:44 +02:00
kennyboy55 34ea491f39 Remove scale 2016-05-28 13:11:11 +02:00
Dofensmirtsz 88685c6366 Merge branch 'worldLoading' into heightmapTrees
# Conflicts:
#	CrystalPoint.vcxproj
#	CrystalPoint.vcxproj.filters
2016-05-27 11:26:47 +02:00
Dofensmirtsz cc75cb631a fix 2016-05-27 11:23:43 +02:00
Dofensmirtsz 9fccd71521 maze? 2016-05-27 10:57:44 +02:00
kennyboy55 d83cc6403c Spawn objects from file 2016-05-27 10:56:24 +02:00
kennyboy55 1c59a3bc6f Fix player height (not working with scale) 2016-05-26 18:53:36 +02:00
kennyboy55 2b0e22d4c9 Added height at location 2016-05-26 17:06:34 +02:00
kennyboy55 4c613b606a Implemented getHeight 2016-05-26 13:21:14 +02:00
kennyboy55 56e174ae2f Lord and Savior Johan 2016-05-26 12:53:22 +02:00
kennyboy55 908786897f Added world loading and other various improvements 2016-05-25 22:29:18 +02:00
kennyboy55 33a61ca2ed Merge pull request #7 from CrystalPointA4/enemy
Enemy collision and tracking
2016-05-25 13:44:26 +02:00
Remco b2fa0bc028 Merge branch 'developer' into enemy
# Conflicts:
#	World.h
#	worlds/world1.json
2016-05-25 13:42:02 +02:00
Remco cf124b3f38 enemy collison added, no jittering anymore 2016-05-25 13:38:13 +02:00
kennyboy55 0b6096d3e8 Merge pull request #6 from CrystalPointA4/array-rendering
Implement optimised array rendering
2016-05-25 12:56:17 +02:00
kennyboy55 84fcc346a9 Implement optimised array rendering 2016-05-25 12:44:24 +02:00
kennyboy55 fe1aa7220e Merge pull request #5 from CrystalPointA4/heightmap
Heightmap implemented
2016-05-25 11:53:02 +02:00
Remco d739141b25 enemys always looking at you when you are the target 2016-05-25 11:46:22 +02:00
kennyboy55 2a6cc0fd87 Fix missing Vertex 2016-05-25 11:44:13 +02:00
kennyboy55 965b54c901 Added heightmap 2016-05-25 11:31:37 +02:00
jancoow e7a7cc5588 Fixed capital letters and string return error.. 2016-05-23 12:34:55 +02:00
Remco 9d3cfa7e2a Merge branch 'developer' into johan
# Conflicts:
#	World.cpp
#	worlds/world1.json
2016-05-23 10:34:21 +02:00
Janco Kock 47c228205a Merge pull request #3 from CrystalPointA4/johan_linuxrefactor
Johan linuxrefactor
2016-05-23 10:00:59 +02:00
kennyboy55 b1aa61d5f0 Fix cmath issue 2016-05-23 10:00:31 +02:00
jancoow 5ca5ca194b Fixed capital letters... 2016-05-23 09:46:36 +02:00
jancoow e75f624935 Fixed cmath problem 2016-05-23 08:53:03 +02:00
Remco d01efecb0e enemy comes to you when in his radius 2016-05-23 08:48:23 +02:00
jancoow 7d13269480 Refactor johan branch for compiling with g++ 2016-05-22 23:19:05 +02:00
kennyboy55 a8415db4ac Added new Johan Code 2016-05-20 13:00:04 +02:00
kennyboy55 1120a3e144 Removed gitignore files 2016-05-20 12:40:54 +02:00
kennyboy55 f2af3a7324 Added gitignore 2016-05-20 10:51:23 +02:00
kennyboy55 7c4ee37867 Johan is love, Johan is life 2016-05-19 14:25:03 +02:00
127 changed files with 15329 additions and 945 deletions
+6
View File
@@ -0,0 +1,6 @@
/workspace.xml
/vcs.xml
/modules.xml
/misc.xml
/encodings.xml
/CrystalPoint.iml
+15
View File
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.5)
project(CrystalPoint)
file(GLOB SOURCE_FILES
"*.h"
"*.cpp"
)
add_executable(CrystalPoint ${SOURCE_FILES})
find_package(OpenGL REQUIRED)
find_package(GLUT REQUIRED)
include_directories( ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} )
target_link_libraries(CrystalPoint ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall ")
-12
View File
@@ -1,12 +0,0 @@
#include "Controller.h"
Controller::Controller()
{
}
Controller::~Controller()
{
}
-10
View File
@@ -1,10 +0,0 @@
#pragma once
#include "Header.h"
class Controller
{
public:
Controller();
~Controller();
};
BIN
View File
Binary file not shown.
+9 -9
View File
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14 # Visual Studio 14
VisualStudioVersion = 14.0.24720.0 VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrystalPoint", "CrystalPoint.vcxproj", "{4986BEC0-4362-46E4-A18D-65587FA97967}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrystalPoint", "CrystalPoint.vcxproj", "{F82158C7-7345-4CB0-9F90-3AB49A071904}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -13,14 +13,14 @@ Global
Release|x86 = Release|x86 Release|x86 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4986BEC0-4362-46E4-A18D-65587FA97967}.Debug|x64.ActiveCfg = Debug|x64 {F82158C7-7345-4CB0-9F90-3AB49A071904}.Debug|x64.ActiveCfg = Debug|x64
{4986BEC0-4362-46E4-A18D-65587FA97967}.Debug|x64.Build.0 = Debug|x64 {F82158C7-7345-4CB0-9F90-3AB49A071904}.Debug|x64.Build.0 = Debug|x64
{4986BEC0-4362-46E4-A18D-65587FA97967}.Debug|x86.ActiveCfg = Debug|Win32 {F82158C7-7345-4CB0-9F90-3AB49A071904}.Debug|x86.ActiveCfg = Debug|Win32
{4986BEC0-4362-46E4-A18D-65587FA97967}.Debug|x86.Build.0 = Debug|Win32 {F82158C7-7345-4CB0-9F90-3AB49A071904}.Debug|x86.Build.0 = Debug|Win32
{4986BEC0-4362-46E4-A18D-65587FA97967}.Release|x64.ActiveCfg = Release|x64 {F82158C7-7345-4CB0-9F90-3AB49A071904}.Release|x64.ActiveCfg = Release|x64
{4986BEC0-4362-46E4-A18D-65587FA97967}.Release|x64.Build.0 = Release|x64 {F82158C7-7345-4CB0-9F90-3AB49A071904}.Release|x64.Build.0 = Release|x64
{4986BEC0-4362-46E4-A18D-65587FA97967}.Release|x86.ActiveCfg = Release|Win32 {F82158C7-7345-4CB0-9F90-3AB49A071904}.Release|x86.ActiveCfg = Release|Win32
{4986BEC0-4362-46E4-A18D-65587FA97967}.Release|x86.Build.0 = Release|Win32 {F82158C7-7345-4CB0-9F90-3AB49A071904}.Release|x86.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
+102
View File
@@ -0,0 +1,102 @@
#include "CrystalPoint.h"
#include <GL/freeglut.h>
#include <cmath>
#include <cstring>
#include "WorldHandler.h"
#include "Player.h"
int CrystalPoint::width = 0;
int CrystalPoint::height = 0;
void CrystalPoint::init()
{
player = Player::getInstance();
worldhandler = WorldHandler::getInstance();
//cursor = Cursor::getInstance();
lastFrameTime = 0;
glClearColor(0.7, 0.7, 1.0, 1.0);
mousePosition = Vec2f(width / 2, height / 2);
}
void CrystalPoint::draw()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
//Draw world
glEnable(GL_LIGHTING);
glEnable(GL_DEPTH_TEST);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(70, width / (float)height, 0.1f, 15000);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
worldhandler->draw();
//cursor->draw();
glutSwapBuffers();
}
void CrystalPoint::update()
{
float frameTime = glutGet(GLUT_ELAPSED_TIME) / 1000.0f;
float deltaTime = frameTime - lastFrameTime;
lastFrameTime = frameTime;
if (keyboardState.special[GLUT_KEY_LEFT] && !prevKeyboardState.special[GLUT_KEY_LEFT])
worldhandler->PreviousWorld();
if (keyboardState.special[GLUT_KEY_RIGHT] && !prevKeyboardState.special[GLUT_KEY_RIGHT])
worldhandler->NextWorld();
if (keyboardState.keys[27])
exit(0);
Player* player = Player::getInstance();
player->rotation.y += mouseOffset.x / 10.0f;
player->rotation.x += mouseOffset.y / 10.0f;
if (player->rotation.x > 90)
player->rotation.x = 90;
if (player->rotation.x < -90)
player->rotation.x = -90;
float speed = 1;
Vec3f oldPosition = player->position;
if (keyboardState.keys['a']) player->setPosition(0, deltaTime*speed, false);
if (keyboardState.keys['d']) player->setPosition(180, deltaTime*speed, false);
if (keyboardState.keys['w']) player->setPosition(90, deltaTime*speed, false);
if (keyboardState.keys['s']) player->setPosition(270, deltaTime*speed, false);
//if (keyboardState.keys['q']) player->setPosition(1, deltaTime*speed, true);
//if (keyboardState.keys['e']) player->setPosition(-1, deltaTime*speed, true);
if (!worldhandler->isPlayerPositionValid())
player->position = oldPosition;
player->position.y = worldhandler->getHeight(player->position.x, player->position.z) + 1.7f;
worldhandler->update(deltaTime);
mousePosition = mousePosition + mouseOffset;
//cursor->update(mousePosition);
mouseOffset = Vec2f(0, 0);
prevKeyboardState = keyboardState;
glutPostRedisplay();
}
KeyboardState::KeyboardState()
{
memset(keys, 0, sizeof(keys));
memset(special, 0, sizeof(special));
}
+36
View File
@@ -0,0 +1,36 @@
#pragma once
class WorldHandler;
class Player;
#include "Vector.h"
class KeyboardState
{
public:
bool keys[256];
bool special[256];
bool control, shift, alt;
KeyboardState();
};
class CrystalPoint
{
public:
void init();
void draw();
void update();
WorldHandler* worldhandler;
Player* player;
static int width, height;
KeyboardState keyboardState;
KeyboardState prevKeyboardState;
Vec2f mouseOffset;
Vec2f mousePosition;
float lastFrameTime;
};
+48 -48
View File
@@ -19,9 +19,9 @@
</ProjectConfiguration> </ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>{4986BEC0-4362-46E4-A18D-65587FA97967}</ProjectGuid> <ProjectGuid>{F82158C7-7345-4CB0-9F90-3AB49A071904}</ProjectGuid>
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<RootNamespace>CrystalPoint</RootNamespace> <RootNamespace>CrystalJohan</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<ProjectName>CrystalPoint</ProjectName> <ProjectName>CrystalPoint</ProjectName>
</PropertyGroup> </PropertyGroup>
@@ -84,11 +84,11 @@
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile />
<AdditionalIncludeDirectories>freeglut/include</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>freeglut/include</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -99,11 +99,11 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile> <ClCompile>
<PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile />
<AdditionalIncludeDirectories>freeglut/include</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>freeglut/include</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -115,12 +115,12 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile />
<AdditionalIncludeDirectories>freeglut/include</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>freeglut/include</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -134,12 +134,12 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeaderFile />
<AdditionalIncludeDirectories>freeglut/include</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>freeglut/include</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
@@ -151,46 +151,46 @@
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="Controller.h" /> <ClCompile Include="CrystalPoint.cpp" />
<ClInclude Include="Enemy.h" /> <ClCompile Include="Cursor.cpp" />
<ClInclude Include="Header.h" /> <ClCompile Include="Enemy.cpp" />
<ClInclude Include="InitState.h" /> <ClCompile Include="Entity.cpp" />
<ClInclude Include="Keyboard.h" /> <ClCompile Include="HeightMap.cpp" />
<ClInclude Include="LoadingState.h" /> <ClCompile Include="Interface.cpp" />
<ClInclude Include="MenuState.h" /> <ClCompile Include="json.cpp" />
<ClInclude Include="Model.h" /> <ClCompile Include="LevelObject.cpp" />
<ClInclude Include="ModelHandler.h" /> <ClCompile Include="Main.cpp" />
<ClInclude Include="ModelInstance.h" /> <ClCompile Include="Model.cpp" />
<ClInclude Include="Mouse.h" /> <ClCompile Include="Player.cpp" />
<ClInclude Include="Player.h" /> <ClCompile Include="Vector.cpp" />
<ClInclude Include="SettingsState.h" /> <ClCompile Include="Vertex.cpp" />
<ClInclude Include="State.h" /> <ClCompile Include="World.cpp" />
<ClInclude Include="StateHandler.h" /> <ClCompile Include="WorldHandler.cpp" />
<ClInclude Include="Vector.h" />
<ClInclude Include="Weapon.h" />
<ClInclude Include="WorldModel.h" />
<ClInclude Include="WorldState.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="Controller.cpp" /> <ClInclude Include="CrystalPoint.h" />
<ClCompile Include="Enemy.cpp" /> <ClInclude Include="Cursor.h" />
<ClCompile Include="InitState.cpp" /> <ClInclude Include="Enemy.h" />
<ClCompile Include="Keyboard.cpp" /> <ClInclude Include="Entity.h" />
<ClCompile Include="LoadingState.cpp" /> <ClInclude Include="HeightMap.h" />
<ClCompile Include="Main.cpp" /> <ClInclude Include="Interface.h" />
<ClCompile Include="MenuState.cpp" /> <ClInclude Include="json.h" />
<ClCompile Include="Model.cpp" /> <ClInclude Include="LevelObject.h" />
<ClCompile Include="ModelHandler.cpp" /> <ClInclude Include="Main.h" />
<ClCompile Include="ModelInstance.cpp" /> <ClInclude Include="Model.h" />
<ClCompile Include="Mouse.cpp" /> <ClInclude Include="Player.h" />
<ClCompile Include="Player.cpp" /> <ClInclude Include="stb_image.h" />
<ClCompile Include="SettingsState.cpp" /> <ClInclude Include="vector.h" />
<ClCompile Include="State.cpp" /> <ClInclude Include="Vertex.h" />
<ClCompile Include="StateHandler.cpp" /> <ClInclude Include="World.h" />
<ClCompile Include="Vector.cpp" /> <ClInclude Include="WorldHandler.h" />
<ClCompile Include="Weapon.cpp" /> </ItemGroup>
<ClCompile Include="WorldModel.cpp" /> <ItemGroup>
<ClCompile Include="WorldState.cpp" /> <None Include="worlds\fire.json" />
<None Include="worlds\ice.json" />
<None Include="worlds\rock.json" />
<None Include="worlds\small.json" />
<None Include="worlds\worlds.json" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
+105 -115
View File
@@ -13,138 +13,128 @@
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter> </Filter>
<Filter Include="Source Files\State"> <Filter Include="Source Files\Object">
<UniqueIdentifier>{6c99658e-2c17-469b-a3d1-2c4d3d61d440}</UniqueIdentifier> <UniqueIdentifier>{1e464995-b141-43fd-9e25-16d6ac47176b}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Source Files\Control"> <Filter Include="Source Files\World">
<UniqueIdentifier>{e444364a-17f6-4464-a98c-6bd34d3e6263}</UniqueIdentifier> <UniqueIdentifier>{0de1a037-e536-40df-a0d0-0d929f2fe752}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Source Files\Model"> <Filter Include="Source Files\json">
<UniqueIdentifier>{842778c9-ff0f-4a6d-9c86-0a178ad40fcc}</UniqueIdentifier> <UniqueIdentifier>{9c655946-3f99-44ea-bc97-2817656954e0}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Source Files\Model\Enemy">
<UniqueIdentifier>{1be14b84-6fa7-4cfb-94b9-666f3ee14198}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\Handler">
<UniqueIdentifier>{1b39afb7-b64b-458a-bba3-755631986211}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Model.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Header.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="StateHandler.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="State.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="MenuState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="LoadingState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Keyboard.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Mouse.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Controller.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="WorldModel.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="WorldState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Enemy.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Player.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Weapon.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Vector.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ModelInstance.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ModelHandler.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="SettingsState.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="InitState.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="Main.cpp"> <ClCompile Include="Main.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="State.cpp">
<Filter>Source Files\State</Filter>
</ClCompile>
<ClCompile Include="MenuState.cpp">
<Filter>Source Files\State</Filter>
</ClCompile>
<ClCompile Include="Keyboard.cpp">
<Filter>Source Files\Control</Filter>
</ClCompile>
<ClCompile Include="Mouse.cpp">
<Filter>Source Files\Control</Filter>
</ClCompile>
<ClCompile Include="Controller.cpp">
<Filter>Source Files\Control</Filter>
</ClCompile>
<ClCompile Include="LoadingState.cpp">
<Filter>Source Files\State</Filter>
</ClCompile>
<ClCompile Include="Model.cpp">
<Filter>Source Files\Model</Filter>
</ClCompile>
<ClCompile Include="WorldModel.cpp">
<Filter>Source Files\Model</Filter>
</ClCompile>
<ClCompile Include="WorldState.cpp">
<Filter>Source Files\State</Filter>
</ClCompile>
<ClCompile Include="Enemy.cpp">
<Filter>Source Files\Model\Enemy</Filter>
</ClCompile>
<ClCompile Include="Player.cpp"> <ClCompile Include="Player.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="Weapon.cpp"> <ClCompile Include="json.cpp">
<Filter>Source Files\Model</Filter>
</ClCompile>
<ClCompile Include="Vector.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="ModelInstance.cpp"> <ClCompile Include="WorldHandler.cpp">
<Filter>Source Files\Model</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="StateHandler.cpp"> <ClCompile Include="Entity.cpp">
<Filter>Source Files\Handler</Filter> <Filter>Source Files\Object</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="ModelHandler.cpp"> <ClCompile Include="Model.cpp">
<Filter>Source Files\Handler</Filter> <Filter>Source Files\Object</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="SettingsState.cpp"> <ClCompile Include="Vertex.cpp">
<Filter>Source Files\State</Filter> <Filter>Source Files\Object</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="InitState.cpp"> <ClCompile Include="Vector.cpp">
<Filter>Source Files\State</Filter> <Filter>Source Files\Object</Filter>
</ClCompile>
<ClCompile Include="World.cpp">
<Filter>Source Files\World</Filter>
</ClCompile>
<ClCompile Include="HeightMap.cpp">
<Filter>Source Files\World</Filter>
</ClCompile>
<ClCompile Include="LevelObject.cpp">
<Filter>Source Files\World</Filter>
</ClCompile>
<ClCompile Include="Enemy.cpp">
<Filter>Source Files\Object</Filter>
</ClCompile>
<ClCompile Include="CrystalPoint.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Cursor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Interface.cpp">
<Filter>Source Files\World</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ClInclude Include="World.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Entity.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Enemy.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="LevelObject.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Model.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="stb_image.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Player.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Main.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="json.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="HeightMap.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Vertex.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="WorldHandler.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CrystalPoint.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Interface.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Cursor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="vector.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="worlds\worlds.json">
<Filter>Source Files\json</Filter>
</None>
<None Include="worlds\fire.json">
<Filter>Source Files\json</Filter>
</None>
<None Include="worlds\ice.json">
<Filter>Source Files\json</Filter>
</None>
<None Include="worlds\small.json">
<Filter>Source Files\json</Filter>
</None>
<None Include="worlds\rock.json">
<Filter>Source Files\json</Filter>
</None>
</ItemGroup>
</Project> </Project>
+58
View File
@@ -0,0 +1,58 @@
#include "Cursor.h"
#include <GL\freeglut.h>
#include <cmath>
#include "CrystalPoint.h"
Cursor* Cursor::instance = NULL;
Cursor::Cursor()
{
enabled = false;
}
Cursor::~Cursor()
{
}
Cursor* Cursor::getInstance(void)
{
if (instance == nullptr)
instance = new Cursor();
return instance;
}
void Cursor::enable(bool enable)
{
enabled = enable;
}
bool Cursor::isEnabled(void)
{
return enabled;
}
void Cursor::draw(void)
{
//Draw Cursor
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, CrystalPoint::width, CrystalPoint::height, 0, -10, 10);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glDisable(GL_LIGHTING);
glDisable(GL_DEPTH_TEST);
glColor4f(1, cos(glutGet(GLUT_ELAPSED_TIME) / 1000.0f), sin(glutGet(GLUT_ELAPSED_TIME) / 1000.0f), 1);
glBegin(GL_TRIANGLES);
glVertex2f(mousePosition.x, mousePosition.y);
glVertex2f(mousePosition.x + 15, mousePosition.y + 15);
glVertex2f(mousePosition.x + 5, mousePosition.y + 20);
glEnd();
}
void Cursor::update(Vec2f newPosition)
{
mousePosition = newPosition;
}
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include "Vector.h"
class Cursor
{
private:
Cursor();
static Cursor* instance;
bool enabled;
Vec2f mousePosition;
public:
~Cursor();
static Cursor* getInstance(void);
void enable(bool enable);
bool isEnabled(void);
void draw(void);
void update(Vec2f newPosition);
};
+65 -2
View File
@@ -1,12 +1,75 @@
#define _USE_MATH_DEFINES
#include <cmath>
#include "Enemy.h" #include "Enemy.h"
#include "Model.h"
#include <iostream>
Enemy::Enemy(const std::string &fileName,
Enemy::Enemy() const Vec3f &position,
Vec3f &rotation,
const float &scale)
{ {
model = Model::load(fileName);
this->position = position;
this->rotation = rotation;
this->scale = scale;
this->canCollide = true;
target = position;
speed = 1;
radius = 20;
hasTarget = false;
} }
Enemy::~Enemy() Enemy::~Enemy()
{ {
if (model)
Model::unload(model);
}
void Enemy::draw()
{
Entity::draw();
glPushMatrix();
glTranslatef(position.x, position.y, position.z);
glBegin(GL_LINE_LOOP);
for (int i = 0; i < 360; i++)
{
//convert degrees into radians
float degInRad = i*(M_PI / 180.0);
glVertex3f(cos(degInRad)*radius, 1*scale,sin(degInRad)*radius);
}
glEnd();
glPopMatrix();
}
void Enemy::update(float delta)
{
if (hasTarget)
{
//just 2d walking
float dx, dz, length;
dx = target.x - position.x;
dz = target.z - position.z;
length = sqrt(dx*dx + dz*dz);
if (length > 0.03)
{
dx /= length;
dz /= length;
dx *= speed*delta;
dz *= speed*delta;
position.x += dx;
position.z += dz;
}
rotation.y = atan2f(dx, dz) * 180 / M_PI;
}
} }
+13 -3
View File
@@ -1,10 +1,20 @@
#pragma once #pragma once
#include "Header.h"
class Enemy #include "Entity.h"
#include <string>
#include "Vector.h"
class Enemy : public Entity
{ {
public: public:
Enemy(); Enemy(const std::string &fileName,const Vec3f &position,Vec3f &rotation,const float &scale);
~Enemy(); ~Enemy();
bool hasTarget;
Vec3f target;
float speed,radius;
void update(float);
void draw();
}; };
+58
View File
@@ -0,0 +1,58 @@
#include "Entity.h"
#include "cmath"
#include <GL/freeglut.h>
#include "Model.h"
Entity::Entity()
{
model = NULL;
scale = 1;
canCollide = true;
}
Entity::~Entity()
{
if(model)
Model::unload(model);
}
void Entity::draw()
{
if (model)
{
glPushMatrix();
glTranslatef(position.x, position.y, position.z);
glRotatef(rotation.x, 1, 0, 0);
glRotatef(rotation.y, 0, 1, 0);
glRotatef(rotation.z, 0, 0, 1);
glScalef(scale, scale, scale);
//collision gaat hierdoor kapot glTranslatef(-model->center.x, 0, -model->center.z);
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
model->draw();
glCullFace(GL_FRONT);
model->draw();
glDisable(GL_CULL_FACE);
glPopMatrix();
}
}
bool Entity::inObject(const Vec3f & point)
{
if (!model)
return false;
Vec3f center = position + model->center;
float distance = ((point.x - center.x) * (point.x - center.x) + (point.z - center.z)*(point.z - center.z));
if (distance < model->radius*scale*model->radius*scale)
return true;
return false;
}
+23
View File
@@ -0,0 +1,23 @@
#pragma once
#include "Vector.h"
class Model;
class Entity
{
public:
Entity();
~Entity();
Model* model;
virtual void draw();
virtual void update(float elapsedTime) {};
Vec3f position;
Vec3f rotation;
float scale;
bool canCollide;
bool inObject(const Vec3f &position);
};
-22
View File
@@ -1,22 +0,0 @@
#pragma once
#include <GL/freeglut.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include <math.h>
#include <string>
#include <vector>
#include <list>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <vector>
#include <windows.h>
#include <gl/GL.h>
#include "Vector.h"
using namespace std;
+155
View File
@@ -0,0 +1,155 @@
#include "HeightMap.h"
#include "stb_image.h"
#include "vector.h"
#include "LevelObject.h"
#include <GL/freeglut.h>
#include <iostream>
#include <string>
#include "World.h"
#define RED 0
#define GREEN 1
#define BLUE 2
#define ALPHA 3
HeightMap::HeightMap(const std::string &file, World* world)
{
int bpp;
unsigned char* imgData = stbi_load(file.c_str(), &width, &height, &bpp, 4);
auto heightAt = [&](int x, int y)
{
return (imgData[(x + y * width) * 4 ] / 256.0f) * 50.0f;
};
auto valueAt = [&](int x, int y, int offset = 0)
{
return imgData[(x + y * width) * 4 + offset];
};
for (int y = 0; y < height-1; y++)
{
for (int x = 0; x < width-1; x++)
{
int offsets[4][2] = { { 0, 0 },{ 1, 0 },{ 1, 1 },{ 0, 1 } };
Vec3f ca(0, heightAt(x, y + 1) - heightAt(x, y), 1);
Vec3f ba(1, heightAt(x + 1, y) - heightAt(x, y), 0);
if (valueAt(x, y, GREEN) > 0)
{
world->addLevelObject(new LevelObject(world->getObjectFromValue(valueAt(x, y, GREEN)).first, Vec3f(x, heightAt(x, y), y), Vec3f(0, 0, 0), 1, world->getObjectFromValue(valueAt(x, y, GREEN)).second));
}
Vec3f normal = ca.cross(ba);
normal.Normalize();
for (int i = 0; i < 4; i++)
{
float h = heightAt(x + offsets[i][0], y + offsets[i][1]);
vertices.push_back(Vertex{ (float)(x + offsets[i][0]), h, (float)(y + offsets[i][1]),
normal.x, normal.y, normal.z,
(x + offsets[i][0]) / (float)height, (y + offsets[i][1]) / (float)width } );
}
}
}
glGenTextures(1, &imageIndex);
glBindTexture(GL_TEXTURE_2D, imageIndex);
glTexImage2D(GL_TEXTURE_2D,
0, //level
GL_RGBA, //internal format
width, //width
height, //height
0, //border
GL_RGBA, //data format
GL_UNSIGNED_BYTE, //data type
imgData); //data
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
stbi_image_free(imgData);
}
HeightMap::~HeightMap()
{
glDeleteTextures(1, &imageIndex);
}
void HeightMap::Draw()
{
glEnable(GL_LIGHTING);
float color[] = { 0.7f, 0.7f, 0.7f, 1 };
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, color);
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, color);
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, imageIndex);
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
//glEnableClientState(GL_COLOR_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
glVertexPointer(3, GL_FLOAT, sizeof(Vertex), ((float*)vertices.data()) + 0);
glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), ((float*)vertices.data()) + 6);
glNormalPointer(GL_FLOAT, sizeof(Vertex), ((float*)vertices.data()) + 3);
glDrawArrays(GL_QUADS, 0, vertices.size());
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
//glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
}
float HeightMap::GetHeight(float x, float y)
{
int ix = x;
int iy = y;
int index = (ix + (width - 1) * iy) * 4;
if (index + 3 >= vertices.size())
index = vertices.size() - 4;
if (index < 0)
index = 0;
Vertex& a = vertices[index];
Vertex& b = vertices[index+1];
Vertex& c = vertices[index+3];
float lowervalue = ((b.z - c.z)*(a.x - c.x) + (c.x - b.x)*(a.z - c.z));
float labda1 = ((b.z - c.z)*(x - c.x) + (c.x - b.x)*(y - c.z)) / lowervalue;
float labda2 = ((c.y - a.y)*(x - c.x) + (a.x - c.x)*(y - c.y)) / lowervalue;
float labda3 = 1 - labda1 - labda2;
Vertex z = a * labda1 + b * labda2 + c * labda3;
return z.y;
}
void HeightMap::SetTexture(const std::string &file)
{
int bpp, width2, height2;
unsigned char* imgData = stbi_load(file.c_str(), &width2, &height2, &bpp, 4);
glBindTexture(GL_TEXTURE_2D, imageIndex);
glTexImage2D(GL_TEXTURE_2D,
0, //level
GL_RGBA, //internal format
width2, //width
height2, //height
0, //border
GL_RGBA, //data format
GL_UNSIGNED_BYTE, //data type
imgData); //data
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
stbi_image_free(imgData);
}
+27
View File
@@ -0,0 +1,27 @@
#pragma once
#include "Vertex.h"
#include <string>
#include <vector>
#include <GL/freeglut.h>
class World;
class HeightMap
{
private:
int height;
int width;
GLuint imageIndex;
public:
HeightMap(const std::string &file, World* world);
~HeightMap();
void Draw();
float GetHeight(float x, float y);
void SetTexture(const std::string &file);
std::vector<Vertex> vertices;
};
-12
View File
@@ -1,12 +0,0 @@
#include "InitState.h"
InitState::InitState()
{
}
InitState::~InitState()
{
}
-11
View File
@@ -1,11 +0,0 @@
#pragma once
#include "Header.h"
#include "State.h"
class InitState : public State
{
public:
InitState();
~InitState();
};
+94
View File
@@ -0,0 +1,94 @@
#include "Interface.h"
#include <GL\freeglut.h>
#include "CrystalPoint.h"
#include <string>
#include "Player.h"
//Prototype
void glutBitmapString(std::string str, int x, int y);
Interface::Interface()
{
}
Interface::~Interface()
{
}
void Interface::draw()
{
Player* player = Player::getInstance();
//Switch view to Ortho
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0, 1000, 1000, 0, -10, 10);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glDisable(GL_LIGHTING);
glDisable(GL_DEPTH_TEST);
glDisable(GL_TEXTURE_2D);
//Draw interface
//Health bar
glBegin(GL_QUADS);
glColor4f(0,0,0, 1.0);
glVertex2f(250, 980);
glVertex2f(250, 965);
glVertex2f(750, 965);
glVertex2f(750, 980);
glEnd();
glBegin(GL_QUADS);
glColor4f(1.0f, 0.1f, 0.1f, 1.0);
glVertex2f(250, 980);
glVertex2f(250, 965);
glColor4f(1.0f, 0.5f, 0.5f, 1.0);
glVertex2f(250 + (player->health / 100 * 500), 965);
glVertex2f(250 + (player->health / 100 * 500), 980);
glEnd();
//XP bar
glBegin(GL_QUADS);
glColor4f(0, 0, 0, 1.0);
glVertex2f(250, 950);
glVertex2f(250, 935);
glVertex2f(750, 935);
glVertex2f(750, 950);
glEnd();
glBegin(GL_QUADS);
glColor4f(1.0f, 1.0f, 0.1f, 1.0);
glVertex2f(250, 950);
glVertex2f(250, 935);
glColor4f(1.0f, 1.0f, 0.5f, 1.0);
glVertex2f(250 + (player->xp / 100 * 500), 935);
glVertex2f(250 + (player->xp / 100 * 500), 950);
glEnd();
//Text: level
glColor4f(1.0f, 1.0f, 0.1f, 1.0);
glutBitmapString("Level: " + std::to_string(player->level), 490, 900);
}
void Interface::update(float deltaTime)
{
}
void glutBitmapString(std::string str, int x, int y)
{
glRasterPos2f(x, y);
for (int i = 0; i < str.size(); i++)
{
glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, str[i]);
}
}
+11
View File
@@ -0,0 +1,11 @@
#pragma once
class Interface
{
public:
Interface();
~Interface();
void draw(void);
void update(float deltaTime);
};
-12
View File
@@ -1,12 +0,0 @@
#include "Keyboard.h"
Keyboard::Keyboard()
{
}
Keyboard::~Keyboard()
{
}
-10
View File
@@ -1,10 +0,0 @@
#pragma once
#include "Header.h"
class Keyboard
{
public:
Keyboard();
~Keyboard();
};
+20
View File
@@ -0,0 +1,20 @@
#include "LevelObject.h"
#include "Model.h"
LevelObject::LevelObject(const std::string &fileName, const Vec3f &position, const Vec3f &rotation, const float &scale, const bool &hasCollision)
{
model = Model::load(fileName);
this->position = position;
this->rotation = rotation;
this->scale = scale;
this->canCollide = hasCollision;
}
LevelObject::~LevelObject()
{
if (model)
Model::unload(model);
}
+17
View File
@@ -0,0 +1,17 @@
#pragma once
#include "Entity.h"
#include <string>
class LevelObject : public Entity
{
public:
LevelObject(const std::string &fileName,
const Vec3f &position,
const Vec3f &rotation,
const float &scale,
const bool &hasCollision);
~LevelObject();
};
-12
View File
@@ -1,12 +0,0 @@
#include "LoadingState.h"
LoadingState::LoadingState()
{
}
LoadingState::~LoadingState()
{
}
-11
View File
@@ -1,11 +0,0 @@
#pragma once
#include "Header.h"
#include "State.h"
class LoadingState : public State
{
public:
LoadingState();
~LoadingState();
};
+50 -141
View File
@@ -1,138 +1,60 @@
#include "Header.h" #include <GL/freeglut.h>
#include "Model.h"
#include "Player.h" #include "CrystalPoint.h"
#include "StateHandler.h" #include <stdio.h>
#include "State.h" #include "Vector.h"
//Prototypes
void bindFuncOpenGL(void);
void configureOpenGL(void); void configureOpenGL(void);
void loadModels(void);
static int Width; CrystalPoint* app;
static int Height;
float lastFrameTime = 0; bool justMoved = false;
bool keys[255];
//vector<Model*> models;
//int currentModel = 0;
StateHandler *statehandler;
void display()
{
glClearColor(0.6f, 0.6f, 1, 1);
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(60.0f, (float)Width / Height, 0.5, 300);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
/*glRotatef(player.eyes.rotX, 1, 0, 0);
glRotatef(player.eyes.rotY, 0, 1, 0);
glTranslatef(player.eyes.posX, player.eyes.posY, player.eyes.posZ);
glPushMatrix();
glScalef(0.5f, 0.5f, 0.5f);
glRotatef(180, 1, 0, 0);
glRotatef(45, 0, 0, 1);
glRotatef(90, 0, 1, 0);
models[currentModel]->draw();
glPopMatrix();*/
//Draw here
statehandler->GetCurrentState()->Display();
//player->Display();
//glutSolidCube(10.0);
glDisable(GL_TEXTURE_2D);
glutSwapBuffers();
}
void idle()
{
float frameTime = glutGet(GLUT_ELAPSED_TIME) / 1000.0f;
float deltaTime = frameTime - lastFrameTime;
lastFrameTime = frameTime;
statehandler->GetCurrentState()->Keyboard(keys,deltaTime);
statehandler->GetCurrentState()->Idle(deltaTime);
glutPostRedisplay();
}
void mousemotion(int x, int y)
{
int dx = x - Width / 2;
int dy = y - Height / 2;
if ((dx != 0 || dy != 0) && abs(dx) < 400 && abs(dy) < 400)
{
statehandler->GetCurrentState()->MouseMove(x, y, dx, dy);
glutWarpPointer(Width / 2, Height / 2);
}
}
void mouse(int button, int type, int x, int y)
{
statehandler->GetCurrentState()->MouseClick(button, type, x, y);
}
void keyboard(unsigned char key, int, int)
{
if (key == 27)
exit(0);
//std::cout << key << std::endl;
keys[key] = true;
}
void keyboardup(unsigned char key, int, int)
{
keys[key] = false;
}
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
//Init GLUT app = new CrystalPoint();
glutInit(&argc, argv); glutInit(&argc, argv);
//Configre OpenGL and FreeGLut
configureOpenGL(); configureOpenGL();
//Bind functions app->init();
bindFuncOpenGL();
//Init models glutDisplayFunc([]() { app->draw(); } );
loadModels(); glutIdleFunc([]() { app->update(); } );
glutReshapeFunc([](int w, int h) { CrystalPoint::width = w; CrystalPoint::height = h; glViewport(0, 0, w, h); });
//Start the main loop
glutMainLoop();
return 0;
}
void bindFuncOpenGL()
{
glutDisplayFunc(display);
glutIdleFunc(idle);
glutReshapeFunc([](int w, int h) { Width = w; Height= h; glViewport(0, 0, w, h); });
//Keyboard //Keyboard
glutKeyboardFunc(keyboard); glutKeyboardFunc([](unsigned char c, int, int) { app->keyboardState.keys[c] = true; });
glutKeyboardUpFunc(keyboardup); glutKeyboardUpFunc([](unsigned char c, int, int) { app->keyboardState.keys[c] = false; });
glutSpecialFunc([](int c, int, int) { app->keyboardState.special[c] = true; });
glutSpecialUpFunc([](int c, int, int) { app->keyboardState.special[c] = false; });
auto mousemotion = [](int x, int y)
{
if (justMoved)
{
justMoved = false;
return;
}
int dx = x - app->width / 2;
int dy = y - app->height / 2;
if ((dx != 0 || dy != 0) && abs(dx) < 400 && abs(dy) < 400)
{
app->mouseOffset = app->mouseOffset + Vec2f(dx, dy);
glutWarpPointer(app->width / 2, app->height / 2);
justMoved = true;
}
};
//Mouse //Mouse
glutMouseFunc(mouse);
glutPassiveMotionFunc(mousemotion); glutPassiveMotionFunc(mousemotion);
glutMotionFunc(mousemotion);
CrystalPoint::height = GLUT_WINDOW_HEIGHT;
CrystalPoint::width = GLUT_WINDOW_WIDTH;
glutMainLoop();
return 0;
} }
void configureOpenGL() void configureOpenGL()
@@ -142,7 +64,6 @@ void configureOpenGL()
glutInitWindowSize(800, 600); glutInitWindowSize(800, 600);
glutCreateWindow("Crystal Point"); glutCreateWindow("Crystal Point");
glutFullScreen(); glutFullScreen();
//glutPositionWindow((glutGet(GLUT_SCREEN_WIDTH) / 2) - (glutGet(GLUT_WINDOW_WIDTH) / 2), (glutGet(GLUT_SCREEN_HEIGHT) / 2) - (glutGet(GLUT_WINDOW_HEIGHT) / 2));
//Depth testing //Depth testing
glEnable(GL_DEPTH_TEST); glEnable(GL_DEPTH_TEST);
@@ -156,32 +77,20 @@ void configureOpenGL()
glAlphaFunc(GL_GREATER, 0.01f); glAlphaFunc(GL_GREATER, 0.01f);
//Lighting //Lighting
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 }; GLfloat mat_specular[] = { 0.2, 0.2, 0.2, 0 };
GLfloat mat_shininess[] = { 20.0 }; //GLfloat mat_shininess[] = { 5.0 };
GLfloat light_position[] = { 30.0, 30.0, 30.0, 1.0 }; GLfloat light_position[] = { 0.0, 2.0, 1.0, 0 };
GLfloat light_diffuse[] = { 2.0, 2.0, 2.0, 1.0 }; GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 0 };
GLfloat light_ambient[] = { 2.0, 2.0, 2.0, 1.0 }; GLfloat light_ambient[] = { 0.3, 0.3, 0.3, 0 };
glClearColor(0.0, 0.0, 0.0, 0.0); glClearColor(0.7, 0.7, 1.0, 1.0);
glShadeModel(GL_SMOOTH);
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular); //glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess); //glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
glLightfv(GL_LIGHT0, GL_POSITION, light_position); //glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse); //glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
glEnable(GL_LIGHTING); glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0); glEnable(GL_LIGHT0);
//Cursor glutSetCursor(GLUT_CURSOR_NONE);
glutWarpPointer(Width / 2, Height / 2);
glutSetCursor(GLUT_CURSOR_CROSSHAIR);
}
void loadModels()
{
statehandler = new StateHandler();
statehandler->Navigate(statehandler->WORLD_STATE);
//models.push_back(new Model("models/weapons/ZwaardMetTextures/TextureZwaard.obj"));
} }
View File
-12
View File
@@ -1,12 +0,0 @@
#include "MenuState.h"
MenuState::MenuState()
{
}
MenuState::~MenuState()
{
}
-10
View File
@@ -1,10 +0,0 @@
#pragma once
#include "Header.h"
#include "State.h"
class MenuState : public State
{
public:
MenuState();
~MenuState();
};
+96 -43
View File
@@ -3,12 +3,18 @@
#define STB_IMAGE_IMPLEMENTATION #define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h" #include "stb_image.h"
//Prototypes #include <iostream>
vector<string> split(string str, string sep); #include <fstream>
string replace(string str, string toReplace, string replacement); #include <string>
string toLower(string data); #include <algorithm>
#include <cmath>
Model::Model(string fileName) //Prototypes
std::vector<std::string> split(std::string str, std::string sep);
std::string replace(std::string str, std::string toReplace, std::string replacement);
std::string toLower(std::string data);
Model::Model(std::string fileName)
{ {
std::string dirName = fileName; std::string dirName = fileName;
if (dirName.rfind("/") != std::string::npos) if (dirName.rfind("/") != std::string::npos)
@@ -70,7 +76,7 @@ Model::Model(string fileName)
for (size_t i = ii - 3; i < ii; i++) //magische forlus om van quads triangles te maken ;) for (size_t i = ii - 3; i < ii; i++) //magische forlus om van quads triangles te maken ;)
{ {
Vertex vertex; VertexIndex vertex;
std::vector<std::string> indices = split(params[i == (ii - 3) ? 1 : i], "/"); std::vector<std::string> indices = split(params[i == (ii - 3) ? 1 : i], "/");
if (indices.size() >= 1) //er is een positie if (indices.size() >= 1) //er is een positie
vertex.position = atoi(indices[0].c_str()) - 1; vertex.position = atoi(indices[0].c_str()) - 1;
@@ -115,24 +121,48 @@ Model::Model(string fileName)
} }
} }
groups.push_back(currentGroup); groups.push_back(currentGroup);
minVertex = vertices[0];
maxVertex = vertices[0];
for (auto v : vertices)
{
for (int i = 0; i < 3; i++)
{
minVertex[i] = fmin(minVertex[i], v[i]);
maxVertex[i] = fmax(maxVertex[i], v[i]);
}
}
center = (minVertex + maxVertex) / 2.0f;
radius = 0;
for (auto v : vertices)
radius = fmax(radius, (center.x - v.x) * (center.x - v.x) + (center.z - v.z) * (center.z - v.z));
radius = sqrt(radius);
for each(ObjGroup *group in groups)
{
Optimise(group);
}
} }
Model::Model(void) void Model::Optimise(ObjGroup *t)
{ {
Model("models/TextureZwaard.obj"); for (Face &face : t->faces)
} {
for each(auto &vertex in face.vertices)
{
t->VertexArray.push_back(Vertex(vertices[vertex.position].x, vertices[vertex.position].y, vertices[vertex.position].z,
normals[vertex.normal].x, normals[vertex.normal].y, normals[vertex.normal].z,
texcoords[vertex.texcoord].x, texcoords[vertex.texcoord].y));
Model::~Model(void) }
{ }
}
void Model::AddInstance(ModelInstance* inst)
{
instances.push_back(inst);
} }
void Model::draw() void Model::draw()
{ {
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_NORMAL_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
for (auto &g : groups) for (auto &g : groups)
{ {
if (materials[g->materialIndex]->hasTexture) if (materials[g->materialIndex]->hasTexture)
@@ -163,31 +193,14 @@ void Model::draw()
} }
} }
for (auto &instance : instances) glVertexPointer(3, GL_FLOAT, sizeof(Vertex), ((float*)g->VertexArray.data()) + 0);
{ glNormalPointer(GL_FLOAT, sizeof(Vertex), ((float*)g->VertexArray.data()) + 3);
glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), ((float*)g->VertexArray.data()) + 6);
glBegin(GL_TRIANGLES); glDrawArrays(GL_TRIANGLES, 0, g->VertexArray.size());
for (auto &f : g->faces)
{
for (auto &v : f.vertices)
{
glPushMatrix();
glTranslatef(instance->translation.x, instance->translation.y, instance->translation.z);
glRotatef(instance->rotation.x, 1, 0, 0);
glRotatef(instance->rotation.y, 0, 1, 0);
glRotatef(instance->rotation.z, 0, 0, 1);
glScalef(instance->scale.x, instance->scale.y, instance->scale.z);
glNormal3f(normals[v.normal].x, normals[v.normal].y, normals[v.normal].z);
glTexCoord2f(texcoords[v.texcoord].x, texcoords[v.texcoord].y);
glVertex3f(vertices[v.position].x, vertices[v.position].y, vertices[v.position].z);
}
}
glEnd();
}
} }
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_NORMAL_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
} }
void Model::loadMaterialFile(std::string fileName, std::string dirName) void Model::loadMaterialFile(std::string fileName, std::string dirName)
@@ -287,6 +300,9 @@ Model::Texture::Texture(const std::string & fileName)
imgData); //data imgData); //data
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
stbi_image_free(imgData); stbi_image_free(imgData);
} }
@@ -295,7 +311,7 @@ void Model::Texture::bind()
glBindTexture(GL_TEXTURE_2D, index); glBindTexture(GL_TEXTURE_2D, index);
} }
string replace(string str, string toReplace, string replacement) std::string replace(std::string str, std::string toReplace, std::string replacement)
{ {
size_t index = 0; size_t index = 0;
while (true) while (true)
@@ -309,7 +325,7 @@ string replace(string str, string toReplace, string replacement)
return str; return str;
} }
vector<string> split(string str, string sep) std::vector<std::string> split(std::string str, std::string sep)
{ {
std::vector<std::string> ret; std::vector<std::string> ret;
size_t index; size_t index;
@@ -325,8 +341,45 @@ vector<string> split(string str, string sep)
return ret; return ret;
} }
inline string toLower(string data) inline std::string toLower(std::string data)
{ {
std::transform(data.begin(), data.end(), data.begin(), ::tolower); std::transform(data.begin(), data.end(), data.begin(), ::tolower);
return data; return data;
} }
std::map<std::string, std::pair<Model*, int>> Model::cache;
Model* Model::load(const std::string &fileName)
{
if (cache.find(fileName) == cache.end())
cache[fileName] = std::pair<Model*, int>(new Model(fileName), 0);
cache[fileName].second++;
return cache[fileName].first;
}
void Model::unload(Model* model)
{
for (auto m : cache)
{
if (m.second.first == model)
{
m.second.second--;
if (m.second.second == 0)
{
delete m.second.first;
cache.erase(cache.find(m.first));
}
}
}
}
Model::~Model(void)
{
for (auto m : cache)
{
delete m.second.first;
}
}
+25 -10
View File
@@ -1,11 +1,17 @@
#pragma once #pragma once
#include "Header.h"
#include "ModelInstance.h" #include <GL/freeglut.h>
#include <list>
#include <vector>
#include <map>
#include "Vector.h"
#include "Vertex.h"
class Model class Model
{ {
private: private:
class Vertex
class VertexIndex
{ {
public: public:
int position; int position;
@@ -16,7 +22,7 @@ private:
class Face class Face
{ {
public: public:
list<Vertex> vertices; std::list<VertexIndex> vertices;
}; };
class Texture class Texture
@@ -49,7 +55,8 @@ private:
public: public:
std::string name; std::string name;
int materialIndex; int materialIndex;
list<Face> faces; std::list<Face> faces;
std::vector<Vertex> VertexArray;
}; };
std::vector<Vec3f> vertices; std::vector<Vec3f> vertices;
@@ -58,15 +65,23 @@ private:
std::vector<ObjGroup*> groups; std::vector<ObjGroup*> groups;
std::vector<MaterialInfo*> materials; std::vector<MaterialInfo*> materials;
std::vector<ModelInstance*> instances;
void loadMaterialFile(std::string fileName, std::string dirName); void loadMaterialFile(std::string fileName, std::string dirName);
public:
Model(std::string filename); Model(std::string filename);
Model(void);
~Model(void); ~Model(void);
void AddInstance(ModelInstance* inst); public:
static std::map<std::string, std::pair<Model*, int> > cache;
static Model* load(const std::string &fileName);
static void unload(Model* model);
void draw(); void draw();
void Optimise(ObjGroup *t);
Vec3f minVertex;
Vec3f maxVertex;
Vec3f center;
float radius;
}; };
-12
View File
@@ -1,12 +0,0 @@
#include "ModelHandler.h"
ModelHandler::ModelHandler()
{
}
ModelHandler::~ModelHandler()
{
}
-8
View File
@@ -1,8 +0,0 @@
#pragma once
class ModelHandler
{
public:
ModelHandler();
~ModelHandler();
};
-10
View File
@@ -1,10 +0,0 @@
#include "ModelInstance.h"
ModelInstance::ModelInstance()
{
}
ModelInstance::~ModelInstance()
{
}
-16
View File
@@ -1,16 +0,0 @@
#pragma once
#include "Header.h"
class ModelInstance
{
private:
public:
ModelInstance();
~ModelInstance();
Vec3f translation;
Vec3f rotation;
Vec3f scale;
};
-12
View File
@@ -1,12 +0,0 @@
#include "Mouse.h"
Mouse::Mouse()
{
}
Mouse::~Mouse()
{
}
-10
View File
@@ -1,10 +0,0 @@
#pragma once
#include "Header.h"
class Mouse
{
public:
Mouse();
~Mouse();
};
+39 -60
View File
@@ -1,77 +1,56 @@
#define _USE_MATH_DEFINES
#include <cmath>
#include "Player.h" #include "Player.h"
#include <GL/freeglut.h>
Player* Player::instance = NULL;
Player::Player() Player::Player()
{ {
speed = 10;
health = 50;
xp = 75;
level = 10;
} }
Player* Player::getInstance()
Player::~Player()
{ {
if(right != nullptr) if (instance == nullptr)
delete right; instance = new Player();
if(left != nullptr)
delete left;
/*if (player != nullptr)
delete player;*/
}
void Player::Display(void)
{
if (right != nullptr)
{
right->draw_weapon();
}
if (left != nullptr)
{
left->draw_weapon();
}
/*glRotatef(player->eyes.rotX, 1, 0, 0);
glRotatef(player->eyes.rotY, 0, 1, 0);
glTranslatef(player->eyes.posX, player->eyes.posY, player->eyes.posZ);*/
glRotatef(eyes.rotX, 1, 0, 0);
glRotatef(eyes.rotY, 0, 1, 0);
glTranslatef(eyes.posX, eyes.posY, eyes.posZ);
}
Player & Player::GetInstance(void)
{
static Player instance;
return instance; return instance;
} }
//Player * Player::GetInstance(void) void Player::init()
//{
// if (player == nullptr)
// player = new Player();
// return player;
//}
void Player::PlayerMoveEyes(float angle, float fac, bool heigth)
{ {
//player movement instance = new Player();
}
/*if (heigth) Player::~Player()
player->eyes.posY += angle*fac; {
if (leftWeapon)
delete leftWeapon;
if (rightWeapon)
delete rightWeapon;
}
void Player::setCamera()
{
glRotatef(rotation.x, 1, 0, 0);
glRotatef(rotation.y, 0, 1, 0);
glTranslatef(-position.x, -position.y, -position.z);
}
void Player::setPosition(float angle, float fac, bool height)
{
fac *= speed;
if (height)
position.y += angle*fac;
else else
{ {
player->eyes.posX += (float)cos((player->eyes.rotY + angle) / 180 * M_PI) * fac; position.x -= (float)cos((rotation.y + angle) / 180 * M_PI) * fac;
player->eyes.posZ += (float)sin((player->eyes.rotY + angle) / 180 * M_PI) * fac; position.z -= (float)sin((rotation.y + angle) / 180 * M_PI) * fac;
}*/
if (heigth)
eyes.posY += angle*fac;
else
{
eyes.posX += (float)cos((eyes.rotY + angle) / 180 * M_PI) * fac;
eyes.posZ += (float)sin((eyes.rotY + angle) / 180 * M_PI) * fac;
} }
} }
void Player::PlayerRotateEyes(int dx, int dy)
{
eyes.rotY += dx / 10.0f;
eyes.rotX += dy / 10.0f;
}
+18 -25
View File
@@ -1,38 +1,31 @@
#pragma once #pragma once
#include "Header.h" #include "Vector.h"
#include "Weapon.h"
class Model;
class Player class Player
{ {
private:
static Player* instance;
public: public:
Player();
~Player(); ~Player();
struct Eyes void setCamera();
{ void setPosition(float angle, float fac, bool height);
float posX = 0;
float posY = 0;
float posZ = 0;
float rotX = 0;
float rotY = 0;
} eyes;
void Display(void); static Player* getInstance(void);
//static Player* GetInstance(void); static void init(void);
static Player& GetInstance(void);
Vec3f position;
Vec2f rotation;
void PlayerMoveEyes(const float angle, const float fac, const bool heigth); Model* leftWeapon;
void PlayerRotateEyes(const int dx, const int dy); Model* rightWeapon;
private:
float health;
float xp;
int level; int level;
int xp;
Weapon* right = nullptr;
Weapon* left = nullptr;
vector<Weapon> weapons;
Player();
Player(Player const&);
void operator=(Player const&);
//static Player* player; float speed;
}; };
-2
View File
@@ -1,2 +0,0 @@
# CrystalPoint
Crystal Point: The Elemental Labyrinth
+40
View File
@@ -0,0 +1,40 @@
========================================================================
CONSOLE APPLICATION : CrystalPoint Project Overview
========================================================================
AppWizard has created this CrystalPoint application for you.
This file contains a summary of what you will find in each of the files that
make up your CrystalPoint application.
CrystalPoint.vcxproj
This is the main project file for VC++ projects generated using an Application Wizard.
It contains information about the version of Visual C++ that generated the file, and
information about the platforms, configurations, and project features selected with the
Application Wizard.
CrystalPoint.vcxproj.filters
This is the filters file for VC++ projects generated using an Application Wizard.
It contains information about the association between the files in your project
and the filters. This association is used in the IDE to show grouping of files with
similar extensions under a specific node (for e.g. ".cpp" files are associated with the
"Source Files" filter).
CrystalPoint.cpp
This is the main application source file.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named CrystalPoint.pch and a precompiled types file named StdAfx.obj.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" comments to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////
-12
View File
@@ -1,12 +0,0 @@
#include "SettingsState.h"
SettingsState::SettingsState()
{
}
SettingsState::~SettingsState()
{
}
-11
View File
@@ -1,11 +0,0 @@
#pragma once
#include "Header.h"
#include "State.h"
class SettingsState : public State
{
public:
SettingsState();
~SettingsState();
};
-40
View File
@@ -1,40 +0,0 @@
#include "State.h"
State::State()
{
}
State::~State()
{
}
void State::Entry()
{
}
void State::Exit()
{
}
void State::Idle(float delta)
{
}
void State::Display()
{
}
void State::Keyboard(bool keys[255],float deltaTime)
{
}
void State::MouseMove(int x, int y, int dx, int dy)
{
}
void State::MouseClick(int button, int type, int x, int y)
{
}
-26
View File
@@ -1,26 +0,0 @@
#pragma once
#include "Header.h"
class State
{
public:
State();
~State();
virtual void Entry();
virtual void Exit();
virtual void Idle(float delta);
virtual void Display();
virtual void Keyboard(bool keys[255],float deltaTime);
virtual void MouseMove(int x, int y, int dx, int dy);
virtual void MouseClick(int button, int type, int x, int y);
};
#include "InitState.h"
#include "LoadingState.h"
#include "MenuState.h"
#include "SettingsState.h"
#include "WorldState.h"
-33
View File
@@ -1,33 +0,0 @@
#include "StateHandler.h"
StateHandler::StateHandler()
{
StateList.push_back(new InitState()); //INIT_STATE
StateList.push_back(new LoadingState()); //LOADING_STATE
StateList.push_back(new MenuState()); //MENU_STATE
StateList.push_back(new SettingsState()); //SETTINGS_STATE
StateList.push_back(new WorldState()); //WORLD_STATE
//CurrentState = INIT_STATE;
CurrentState = WORLD_STATE;
}
StateHandler::~StateHandler()
{
}
void StateHandler::Navigate(EState state)
{
if (CurrentState == state)
return;
StateList.at(CurrentState)->Exit();
CurrentState = state;
StateList.at(CurrentState)->Entry();
}
State* StateHandler::GetCurrentState()
{
return StateList.at(CurrentState);
}
-19
View File
@@ -1,19 +0,0 @@
#pragma once
#include "Header.h"
#include "State.h"
class StateHandler
{
public:
enum EState { INIT_STATE = 0, LOADING_STATE = 1, MENU_STATE = 2, SETTINGS_STATE = 3, WORLD_STATE = 4 };
StateHandler();
~StateHandler();
void Navigate(EState state);
State* GetCurrentState();
private:
EState CurrentState;
vector<State*> StateList;
};
+83 -2
View File
@@ -1,3 +1,5 @@
#define _USE_MATH_DEFINES
#include <cmath>
#include "Vector.h" #include "Vector.h"
Vec3f::Vec3f(float x, float y, float z) Vec3f::Vec3f(float x, float y, float z)
@@ -6,13 +8,36 @@ Vec3f::Vec3f(float x, float y, float z)
this->y = y; this->y = y;
this->z = z; this->z = z;
} }
/*The length of the vector*/
float Vec3f::Length()
{
return (float)sqrt(x*x+y*y+z*z);
}
void Vec3f::Normalize()
{
float length = this->Length();
if (length != 0)
{
x = x / length;
y = y / length;
z = z / length;
}
}
float Vec3f::Distance(const Vec3f &other)
{
return (float)sqrt(pow(other.x - x, 2)+pow(other.y - y, 2)+pow(other.z - z, 2));
}
Vec3f::Vec3f() Vec3f::Vec3f()
{ {
this->x = 0; this->x = 0;
this->y = 0; this->y = 0;
this->z = 0; this->z = 0;
} }
Vec3f::Vec3f(Vec3f &other) Vec3f::Vec3f(const Vec3f &other)
{ {
this->x = other.x; this->x = other.x;
this->y = other.y; this->y = other.y;
@@ -24,6 +49,51 @@ float& Vec3f::operator [](int index)
return v[index]; return v[index];
} }
Vec3f Vec3f::operator+(const Vec3f & other)
{
return Vec3f(x + other.x, y + other.y, z + other.z);
}
Vec3f Vec3f::operator-(const Vec3f & other)
{
return Vec3f(x - other.x, y - other.y, z - other.z);
}
Vec3f Vec3f::operator/(float value)
{
return Vec3f(x / value, y / value, z / value);
}
bool Vec3f::operator==(const Vec3f & other)
{
/*bool xb, yb,zb;
xb = x == other.x;
yb = y == other.y;
zb = z == other.z;
if (xb & yb & zb)
return true;*/
return x == other.x & y == other.y & z == other.z;
}
bool Vec3f::operator!=(const Vec3f & other)
{
return x != other.x & y != other.y & z != other.z;
}
Vec3f Vec3f::operator*(const float & other)
{
return Vec3f(x*other, y*other, z*other);
}
Vec3f Vec3f::cross(const Vec3f & other)
{
return Vec3f(
y*other.z - other.y*z,
z*other.x - other.z*x,
x*other.y - other.x*y
);
}
Vec2f::Vec2f(float x, float y) Vec2f::Vec2f(float x, float y)
@@ -36,7 +106,7 @@ Vec2f::Vec2f()
this->x = 0; this->x = 0;
this->y = 0; this->y = 0;
} }
Vec2f::Vec2f(Vec2f &other) Vec2f::Vec2f(const Vec2f &other)
{ {
this->x = other.x; this->x = other.x;
this->y = other.y; this->y = other.y;
@@ -46,3 +116,14 @@ float& Vec2f::operator [](int index)
{ {
return v[index]; return v[index];
} }
Vec2f Vec2f::operator+(const Vec2f & other)
{
return Vec2f(x + other.x, y+other.y);
}
float Vec2f::length()
{
return (float)sqrt(x*x + y*y);
}
+16 -3
View File
@@ -1,5 +1,4 @@
#pragma once #pragma once
#include "Header.h"
class Vec3f class Vec3f
{ {
@@ -13,9 +12,21 @@ public:
float v[3]; float v[3];
}; };
Vec3f(); Vec3f();
Vec3f(Vec3f &other); Vec3f(const Vec3f &other);
Vec3f(float x, float y, float z); Vec3f(float x, float y, float z);
float Length();
void Normalize();
float Distance(const Vec3f &);
float& operator [](int); float& operator [](int);
Vec3f operator + (const Vec3f &other);
Vec3f operator -(const Vec3f &other);
Vec3f operator / (float value);
bool operator ==(const Vec3f &other);
bool operator !=(const Vec3f &other);
Vec3f operator *(const float &other);
Vec3f cross(const Vec3f &other);
}; };
class Vec2f class Vec2f
@@ -31,7 +42,9 @@ public:
}; };
Vec2f(); Vec2f();
Vec2f(float x, float y); Vec2f(float x, float y);
Vec2f(Vec2f &other); Vec2f(const Vec2f &other);
float& operator [](int); float& operator [](int);
Vec2f operator + (const Vec2f &other);
float length();
}; };
+39
View File
@@ -0,0 +1,39 @@
#include "Vertex.h"
Vertex::Vertex(float x, float y, float z, float nx, float ny, float nz, float tx, float ty)
{
this->x = x;
this->y = y;
this->z = z;
this->normalX = nx;
this->normalY = ny;
this->normalZ = nz;
this->texX = tx;
this->texY = ty;
}
Vertex::~Vertex()
{
}
Vertex Vertex::operator/(float &other)
{
return Vertex(x / other, y / other, z / other, normalX, normalY, normalZ, texX, texY);
}
Vertex Vertex::operator*(Vertex & other)
{
return Vertex(x*other.x, y*other.y, z*other.z, normalX, normalY, normalZ, texX, texY);
}
Vertex Vertex::operator*(float & other)
{
return Vertex(x*other, y*other, z*other, normalX, normalY, normalZ, texX, texY);
}
Vertex Vertex::operator+(Vertex & other)
{
return Vertex(x+other.x, y+other.y, z+other.z, normalX, normalY, normalZ, texX, texY);
}
+24
View File
@@ -0,0 +1,24 @@
#pragma once
class Vertex
{
public:
Vertex(float x, float y, float z, float nx, float ny, float nz, float tx, float ty);
~Vertex();
float x;
float y;
float z;
float normalX;
float normalY;
float normalZ;
float texX;
float texY;
Vertex operator/(float &other);
Vertex operator*(Vertex &other);
Vertex operator*(float &other);
Vertex operator+(Vertex &other);
};
-28
View File
@@ -1,28 +0,0 @@
#include "Weapon.h"
Weapon::Weapon(const string &filename)
{
weaponModel = new Model(filename);
}
Weapon::Weapon()
{
}
Weapon::~Weapon()
{
}
void Weapon::draw_weapon(void)
{
if (weaponModel != nullptr)
{
glScalef(scale,scale,scale);
glRotatef(135, 1, 0, 0);
weaponModel->draw();
}
}
-16
View File
@@ -1,16 +0,0 @@
#pragma once
#include "Header.h"
#include "Model.h"
class Weapon
{
public:
Weapon(const string &filename);
Weapon();
~Weapon();
void draw_weapon(void);
private:
Model *weaponModel = nullptr;
float scale = 0.5f;
};
+211
View File
@@ -0,0 +1,211 @@
#include "World.h"
#include <GL/freeglut.h>
#include "Entity.h"
#include "json.h"
#include "Model.h"
#include "CrystalPoint.h"
#include <fstream>
#include <iostream>
World::World(const std::string &fileName)
{
//Store player instance
player = Player::getInstance();
//Create the interface
interface = new Interface();
//Open world json file
std::ifstream file(fileName);
if(!file.is_open())
std::cout<<"Error, can't open world file - " << fileName << "\n";
json::Value v = json::readJson(file);
file.close();
//Check file
if(v["world"].isNull() || v["world"]["heightmap"].isNull())
std::cout << "Invalid world file: world - " << fileName << "\n";
if (v["player"].isNull() || v["player"]["startposition"].isNull())
std::cout << "Invalid world file: player - " << fileName << "\n";
if (v["objects"].isNull())
std::cout << "Invalid world file: objects - " << fileName << "\n";
if (v["world"]["object-templates"].isNull())
std::cout << "Invalid world file: object templates - " << fileName << "\n";
//Load object templates
for (auto objt : v["world"]["object-templates"])
{
//collision
bool cancollide = true;
if (!objt["collision"].isNull())
cancollide = objt["collision"].asBool();
objecttemplates.push_back(std::pair<int, std::pair<std::string, bool>>(objt["color"], std::pair<std::string, bool>(objt["file"], cancollide)));
}
//Generate heightmap for this world
heightmap = new HeightMap(v["world"]["heightmap"].asString(), this);
//Map different texture to heightmap if available
if(!v["world"]["texture"].isNull())
heightmap->SetTexture(v["world"]["texture"].asString());
//Set player starting position
player->position.x = v["player"]["startposition"][0].asFloat();
player->position.y = v["player"]["startposition"][1].asFloat();
player->position.z = v["player"]["startposition"][2].asFloat();
//Load and place objects into world
for (auto object : v["objects"])
{
//Collision
bool hasCollision = true;
if (!object["collide"].isNull())
hasCollision = object["collide"].asBool();
//Rotation
Vec3f rotation(0, 0, 0);
if(!object["rot"].isNull())
rotation = Vec3f(object["rot"][0].asFloat(), object["rot"][1].asFloat(), object["rot"][2].asFloat());
//Scale
float scale = 1;
if (!object["scale"].isNull())
scale = object["scale"].asFloat();
//Position
if (object["pos"].isNull())
std::cout << "Invalid world file: objects pos - " << fileName << "\n";
//File
if (object["file"].isNull())
std::cout << "Invalid world file: objects file - " << fileName << "\n";
//Create
Vec3f position(object["pos"][0].asFloat(), object["pos"][1].asFloat(), object["pos"][2].asFloat());
entities.push_back(new LevelObject(object["file"].asString(), position, rotation, scale, hasCollision));
}
//Load and place enemies into world
for (auto e : v["enemies"])
{
//Rotation
Vec3f rotation(0, 0, 0);
if (!e["rot"].isNull())
rotation = Vec3f(e["rot"][0].asFloat(), e["rot"][1].asFloat(), e["rot"][2].asFloat());
//Scale
float scale = 1.0f;
if (!e["scale"].isNull())
scale = e["scale"].asFloat();
//Position
if (e["pos"].isNull())
std::cout << "Invalid world file: enemies pos - " << fileName << "\n";
//File
if (e["file"].isNull())
std::cout << "Invalid world file: enemies file - " << fileName << "\n";
//Create
Vec3f position(e["pos"][0].asFloat(), e["pos"][1].asFloat(), e["pos"][2].asFloat());
enemies.push_back(new Enemy(e["file"].asString(), position, rotation, scale));
}
}
World::~World()
{
delete heightmap;
}
std::pair<std::string, bool> World::getObjectFromValue(int val)
{
for (auto i : objecttemplates)
{
if (i.first == val)
return i.second;
}
return objecttemplates[0].second;
}
float World::getHeight(float x, float y)
{
return heightmap->GetHeight(x, y);
}
void World::draw()
{
player->setCamera();
float lightPosition[4] = { 0, 2, 1, 0 };
glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
float lightAmbient[4] = { 0.2, 0.2, 0.2, 1 };
glLightfv(GL_LIGHT0, GL_AMBIENT, lightAmbient);
heightmap->Draw();
for (auto &enemy : enemies)
enemy->draw();
for (auto &entity : entities)
entity->draw();
interface->draw();
}
void World::update(float elapsedTime)
{
for (auto &entity : entities)
entity->update(elapsedTime);
for (auto &enemy : enemies)
{
//Al deze code zou in enemy moeten staan
if (enemy->position.Distance(player->position) <= enemy->radius)
{
enemy->hasTarget = true;
enemy->target.x = player->position.x;
enemy->target.z = player->position.z;
}
else
enemy->hasTarget = false;
Vec3f oldpos = enemy->position;
enemy->update(elapsedTime);
if (enemy->hasTarget)
{
for (auto e : entities)
{
if (e->canCollide && e->inObject(enemy->position))
{
Vec3f difference = e->position - enemy->position; //zou misschien omgedraait moeten worden
difference.Normalize();
difference = difference * (e->model->radius + 0.01f);
enemy->position = e->position + difference;
break;
}
}
}
//tot hier
}
}
void World::addLevelObject(LevelObject* obj)
{
entities.push_back(obj);
}
bool World::isPlayerPositionValid()
{
for (auto e : entities)
{
if (e->canCollide && e->inObject(player->position))
return false;
}
return true;
}
+34
View File
@@ -0,0 +1,34 @@
#pragma once
#include <vector>
#include "HeightMap.h"
#include "Player.h"
#include "Enemy.h"
#include "LevelObject.h"
#include "Interface.h"
class Entity;
class World
{
private:
std::vector<std::pair<int, std::pair<std::string, bool>>> objecttemplates;
Player* player;
HeightMap* heightmap;
Interface* interface;
std::vector<Entity*> entities;
std::vector<Enemy*> enemies;
public:
World(const std::string &fileName);
~World();
void draw();
void update(float elapsedTime);
bool isPlayerPositionValid();
float getHeight(float x, float y);
void addLevelObject(LevelObject* obj);
std::pair<std::string, bool> getObjectFromValue(int i);
};
+137
View File
@@ -0,0 +1,137 @@
#include "WorldHandler.h"
#include "World.h"
#include "json.h"
#include <fstream>
#include <iostream>
#include <string>
WorldHandler* WorldHandler::instance = nullptr;
void WorldHandler::ChangeWorld(int i)
{
if (i < 0)
i = worldfiles.size() - 1;
else if (i >= worldfiles.size())
i = 0;
if (i != worldIndex)
{
loadingWorld = true;
if(worldIndex != -1)
delete world;
world = new World(worldfiles[i]);
worldIndex = i;
loadingWorld = false;
}
}
WorldHandler::WorldHandler()
{
loadingWorld = true;
worldIndex = -1;
//Find worlds.json
std::ifstream file("worlds/worlds.json");
if (!file.is_open())
std::cout << "Error, can't open worlds overview file\n";
json::Value v = json::readJson(file);
file.close();
//Load file names into vector
if (v["worlds"].isNull() || !v["worlds"].isArray())
std::cout << "Error, no content in worlds overview file\n";
for (auto line : v["worlds"])
{
std::cout << "Found world: " << line << "\n";
worldfiles.push_back(line);
}
if (worldfiles.size() > 0)
{
ChangeWorld(0);
}
}
WorldHandler::~WorldHandler()
{
worldIndex = -1;
delete world;
}
WorldHandler* WorldHandler::getInstance()
{
if (instance == nullptr)
instance = new WorldHandler();
return instance;
}
void WorldHandler::init()
{
instance = new WorldHandler();
}
void WorldHandler::draw(void)
{
if(!loadingWorld)
world->draw();
else
{
//Draw Loading screen
}
}
void WorldHandler::update(float deltaTime)
{
if(!loadingWorld)
world->update(deltaTime);
}
bool WorldHandler::isPlayerPositionValid(void)
{
if(!loadingWorld)
return world->isPlayerPositionValid();
}
float WorldHandler::getHeight(float x, float y)
{
if (!loadingWorld)
return world->getHeight(x, y);
else
return 0.0f;
}
void WorldHandler::Navigate(const std::string &fileName)
{
if (!loadingWorld)
{
for (int i = 0; i < worldfiles.size(); i++)
{
if (worldfiles[i] == fileName)
ChangeWorld(i);
}
}
}
void WorldHandler::NextWorld()
{
if (!loadingWorld)
{
ChangeWorld(worldIndex + 1);
}
}
void WorldHandler::PreviousWorld()
{
if (!loadingWorld)
{
ChangeWorld(worldIndex - 1);
}
}
+36
View File
@@ -0,0 +1,36 @@
#pragma once
#include <string>
#include <vector>
class World;
class WorldHandler
{
private:
WorldHandler();
static WorldHandler* instance;
bool loadingWorld;
World* world;
int worldIndex;
void ChangeWorld(int i);
public:
~WorldHandler();
static WorldHandler* getInstance(void);
static void init();
void draw(void);
void update(float deltaTime);
bool isPlayerPositionValid(void);
float getHeight(float x, float y);
void Navigate(const std::string &fileName);
void NextWorld();
void PreviousWorld();
std::vector<std::string> worldfiles;
};
-12
View File
@@ -1,12 +0,0 @@
#include "WorldModel.h"
WorldModel::WorldModel()
{
}
WorldModel::~WorldModel()
{
}
-10
View File
@@ -1,10 +0,0 @@
#pragma once
#include "Header.h"
class WorldModel
{
public:
WorldModel();
~WorldModel();
};
-49
View File
@@ -1,49 +0,0 @@
#include "WorldState.h"
#include "Player.h"
WorldState::WorldState()
{
/*player = Player::GetInstance();*/
}
WorldState::~WorldState()
{
//if (player != nullptr)
//delete player;
}
void WorldState::Keyboard(bool keys[255],float deltaTime)
{
float speed = 10;
std::cout << "Keyboard doet het in de world state" << std::endl;
/*if (keys['a']) player->PlayerMoveEyes(0, deltaTime*speed, false);
if (keys['d']) player->PlayerMoveEyes(180, deltaTime*speed, false);
if (keys['w']) player->PlayerMoveEyes(90, deltaTime*speed, false);
if (keys['s']) player->PlayerMoveEyes(270, deltaTime*speed, false);
if (keys['q']) player->PlayerMoveEyes(1, deltaTime*speed, true);
if (keys['e']) player->PlayerMoveEyes(-1, deltaTime*speed, true); */
if (keys['a']) Player::GetInstance().PlayerMoveEyes(0, deltaTime*speed, false);
if (keys['d']) Player::GetInstance().PlayerMoveEyes(180, deltaTime*speed, false);
if (keys['w']) Player::GetInstance().PlayerMoveEyes(90, deltaTime*speed, false);
if (keys['s']) Player::GetInstance().PlayerMoveEyes(270, deltaTime*speed, false);
if (keys['q']) Player::GetInstance().PlayerMoveEyes(1, deltaTime*speed, true);
if (keys['e']) Player::GetInstance().PlayerMoveEyes(-1, deltaTime*speed, true);
}
void WorldState::MouseMove(int x, int y, int dx, int dy)
{
//player->PlayerRotateEyes(dx, dy);
Player::GetInstance().PlayerRotateEyes(dx, dy);
}
void WorldState::Display()
{
Player::GetInstance().Display();
glutSolidCube(10.0);
}
-18
View File
@@ -1,18 +0,0 @@
#pragma once
#include "Header.h"
#include "State.h"
#include "Player.h"
class WorldState : public State
{
public:
WorldState();
~WorldState();
void Keyboard(bool keys[255],float deltaTime);
void MouseMove(int x, int y, int dx, int dy);
void Display();
private:
//Player* player;
};
+730
View File
@@ -0,0 +1,730 @@
#include "json.h"
#include <iomanip>
#include <sstream>
#include <iostream>
#include <cmath>
#include <cfloat>
#include <set>
#include <cstdlib>
#include <math.h>
#include <stdlib.h>
namespace json
{
Value Value::null;
//constructors
Value::Value()
{
type = Type::nullValue;
value.objectValue = NULL;
}
Value::Value(Type type)
{
this->type = type;
if (type == Type::stringValue)
value.stringValue = new std::string();
if (type == Type::arrayValue)
value.arrayValue = new std::vector<Value>();
if (type == Type::objectValue)
value.objectValue = new std::map<std::string, Value>();
}
Value::Value(int value)
{
type = Type::intValue;
this->value.intValue = value;
}
Value::Value(float value)
{
type = Type::floatValue;
this->value.floatValue = value;
}
Value::Value(bool value)
{
type = Type::boolValue;
this->value.boolValue = value;
}
Value::Value(const std::string &value)
{
type = Type::stringValue;
this->value.stringValue = new std::string();
this->value.stringValue->assign(value);
}
Value::Value(const char* value)
{
type = Type::stringValue;
this->value.stringValue = new std::string();
this->value.stringValue->assign(value);
}
Value::Value(const Value& other) : Value(other.type)
{
if (type == Type::objectValue)
*this->value.objectValue = *other.value.objectValue;
else if (type == Type::arrayValue)
*this->value.arrayValue = *other.value.arrayValue;
else if (type == Type::stringValue)
this->value.stringValue->assign(*other.value.stringValue);
else
this->value = other.value;
}
void Value::operator=(const Value& other)
{
if (type != other.type)
{
if (type == Type::stringValue)
delete value.stringValue;
if (type == Type::arrayValue)
delete value.arrayValue;
if (type == Type::objectValue)
delete value.objectValue;
this->type = other.type;
if (type == Type::stringValue)
value.stringValue = new std::string();
if (type == Type::arrayValue)
value.arrayValue = new std::vector<Value>();
if (type == Type::objectValue)
value.objectValue = new std::map<std::string, Value>();
}
if (type == Type::objectValue)
*this->value.objectValue = *other.value.objectValue;
else if (type == Type::arrayValue)
*this->value.arrayValue = *other.value.arrayValue;
else if (type == Type::stringValue)
this->value.stringValue->assign(*other.value.stringValue);
else
this->value = other.value;
}
Value::~Value()
{
if (type == Type::stringValue)
delete value.stringValue;
else if (type == Type::arrayValue)
delete value.arrayValue;
else if (type == Type::objectValue)
delete value.objectValue;
}
size_t Value::size() const
{
assert(type == Type::arrayValue || type == Type::objectValue);
if (type == Type::arrayValue)
return value.arrayValue->size();
else if (type == Type::objectValue)
return value.objectValue->size();
throw "Unsupported";
}
void Value::push_back(const Value& value)
{
assert(type == Type::arrayValue || type == Type::nullValue);
if (type == Type::nullValue)
{
type = Type::arrayValue;
this->value.arrayValue = new std::vector<Value>();
}
this->value.arrayValue->push_back(value);
}
Value& Value::operator[](const std::string &key)
{
assert(type == Type::objectValue);
return (*value.objectValue)[key];
}
Value& Value::operator[](const std::string &key) const
{
assert(type == Type::objectValue);
return (*value.objectValue)[key];
}
Value& Value::operator[](const char* key)
{
assert(type == Type::objectValue || type == Type::nullValue);
if (type == Type::nullValue)
{
type = Type::objectValue;
value.objectValue = new std::map<std::string, Value>();
}
return (*value.objectValue)[std::string(key)];
}
Value& Value::operator[](const char* key) const
{
assert(type == Type::objectValue);
return (*value.objectValue)[std::string(key)];
}
Value& Value::operator[](size_t index)
{
assert(type == Type::arrayValue);
return (*value.arrayValue)[index];
}
Value& Value::operator[](size_t index) const
{
assert(type == Type::arrayValue);
return (*value.arrayValue)[index];
}
Value& Value::operator[](int index)
{
assert(type == Type::arrayValue);
return (*value.arrayValue)[index];
}
Value& Value::operator[](int index) const
{
assert(type == Type::arrayValue);
return (*value.arrayValue)[index];
}
void Value::erase(size_t index)
{
throw "Cannot cast";
}
Value::Iterator Value::end() const
{
if (type == Type::objectValue)
return Iterator(value.objectValue->end());
else if (type == Type::arrayValue)
return Iterator(value.arrayValue->end());
throw "oops";
}
Value::Iterator Value::begin() const
{
if (type == Type::objectValue)
return Iterator(value.objectValue->begin());
else if (type == Type::arrayValue)
return Iterator(value.arrayValue->begin());
throw "oops";
}
///iterator stuff
Value Value::Iterator::operator*()
{
if (type == Type::objectValue)
return this->objectIterator->second;
else if (type == Type::arrayValue)
return *arrayIterator;
throw "Oops";
}
bool Value::Iterator::operator!=(const Iterator &other)
{
if (type == Type::objectValue)
return this->objectIterator != other.objectIterator;
else if (type == Type::arrayValue)
return this->arrayIterator != other.arrayIterator;
throw "Oops";
}
void Value::Iterator::operator++()
{
if (type == Type::objectValue)
this->objectIterator++;
else if (type == Type::arrayValue)
this->arrayIterator++;
}
void Value::Iterator::operator++(int)
{
if (type == Type::objectValue)
this->objectIterator++;
else if (type == Type::arrayValue)
this->arrayIterator++;
}
Value::Iterator::Iterator(const std::vector<Value>::iterator& arrayIterator)
{
type = Type::arrayValue;
this->arrayIterator = arrayIterator;
}
Value::Iterator::Iterator(const std::map<std::string, Value>::iterator& objectIterator)
{
type = Type::objectValue;
this->objectIterator = objectIterator;
}
std::string Value::Iterator::key()
{
assert(type == Type::objectValue);
return this->objectIterator->first;
}
Value& Value::Iterator::value()
{
assert(type == Type::objectValue);
return this->objectIterator->second;
}
static void ltrim(std::istream& stream);
static void eatComment(std::istream& stream);
static Value eatString(std::istream& stream);
static Value eatObject(std::istream& stream);
static Value eatArray(std::istream& stream);
static Value eatNumeric(std::istream& stream, char firstChar);
static Value eatBool(std::istream& stream);
static Value eatNull(std::istream& stream);
static Value eatValue(std::istream& stream);
//reading
static void ltrim(std::istream& stream)
{
char c = stream.peek();
while (c == ' ' || c == '\t' || c == '\n' || c == '\r')
{
stream.get();
c = stream.peek();
}
};
static Value eatString(std::istream& stream)
{
std::string value = "";
bool escaped = false;
while (!stream.eof())
{
char c = stream.get();
if (c == '\\' && !escaped)
escaped = !escaped;
else if (c == '\"' && !escaped)
return Value(value);
else
{
value += c;
escaped = false;
}
}
return Value(value);
};
static Value eatObject(std::istream& stream)
{
Value obj(Type::objectValue);
while (!stream.eof())
{
ltrim(stream);
char token = stream.get();
if (token == '}')
break; //empty object
if (token == '/')
{
eatComment(stream);
token = stream.get();
}
assert(token == '"');
Value key = eatString(stream);
ltrim(stream);
token = stream.get();
assert(token == ':');
ltrim(stream);
Value val = eatValue(stream);
obj[key.asString()] = val;
ltrim(stream);
token = stream.get();
if (token == '}')
break;
assert(token == ',');
}
return obj;
};
static Value eatArray(std::istream& stream)
{
Value obj(Type::arrayValue);
while (!stream.eof())
{
ltrim(stream);
if (stream.peek() == ']')
{
stream.get();
break;
}
obj.push_back(eatValue(stream));
ltrim(stream);
char token = stream.get();
if (token == '/')
{
eatComment(stream);
token = stream.get();
}
if (token == ']')
break;
assert(token == ',');
}
return obj;
};
static Value eatNumeric(std::istream& stream, char firstChar)
{
std::string numeric(1, firstChar);
while (!stream.eof())
{
char token = stream.peek();
if ((token >= '0' && token <= '9') || token == '.' || token == '-')
numeric += stream.get();
else
break;
}
if (numeric.find('.') == std::string::npos)
return Value(atoi(numeric.c_str()));
else
return Value((float)atof(numeric.c_str()));
};
static Value eatBool(std::istream& stream)
{
char token = stream.get();
if (token == 'a') //fAlse
{
stream.get(); //l
stream.get(); //s
stream.get(); //e
return false;
}
else if (token == 'r') //tRue
{
stream.get(); // u
stream.get(); // e
return true;
}
return Value(Type::nullValue);
};
static Value eatNull(std::istream& stream)
{
return Value(Type::nullValue);
};
//precondition: / is already eaten
static void eatComment(std::istream& stream)
{
char token = stream.get();
assert(token == '/' || token == '*');
if (token == '*')
{
char last = token;
while ((last != '*' || token != '/') && !stream.eof())
{
last = token;
token = stream.get();
}
}
else if (token == '/')
while (token != '\n' && !stream.eof())
token = stream.get();
ltrim(stream);
}
static Value eatValue(std::istream& stream)
{
ltrim(stream);
char token = stream.get();
if (token == '{')
return eatObject(stream);
if (token == '[')
return eatArray(stream);
if ((token >= '0' && token <= '9') || token == '.' || token == '-')
return eatNumeric(stream, token);
if (token == '"')
return eatString(stream);
if (token == 't' || token == 'f')
return eatBool(stream);
if (token == 'n')
return eatNull(stream);
if (token == '/')
{
eatComment(stream);
return eatValue(stream);
}
throw "Unable to parse json";
};
Value readJson(const std::string &data)
{
std::stringstream stream;
stream << data;
printf("%s", "test");
return eatValue(stream);
}
Value readJson(std::istream &stream)
{
return eatValue(stream);
}
std::ostream& indent(std::ostream& stream, int level)
{
for (int i = 0; i < level; i++)
stream << '\t';
return stream;
}
std::ostream& Value::prettyPrint(std::ostream& stream, json::Value& printConfig, int level) const
{
stream << std::fixed << std::setprecision(6);
switch (type)
{
case Type::intValue:
stream << value.intValue;
break;
case Type::floatValue:
assert(!isnan(value.floatValue));
//assert(isnormal(value.floatValue));
if (value.floatValue >= 0)
stream << " ";
stream << value.floatValue;
break;
case Type::boolValue:
stream << (value.boolValue ? "true" : "false");
break;
case Type::stringValue:
stream << "\"" << *value.stringValue << "\""; //TODO: escape \'s
break;
case Type::arrayValue:
{
stream << "[";
int wrap = 99999;
if (value.arrayValue->size() > 10)
wrap = 1;
if (value.arrayValue->at(0).isArray() || value.arrayValue->at(0).isObject())
wrap = 1;
else
wrap = 3;
std::string seperator = " ";
if (!printConfig.isNull() && printConfig.isMember("wrap"))
wrap = printConfig["wrap"];
if (!printConfig.isNull() && printConfig.isMember("seperator"))
seperator = printConfig["seperator"].asString();
int index = 0;
if ((long)size() > wrap)
{
stream << "\n";
indent(stream, level + 1);
}
for (auto v : *this)
{
if (index > 0)
{
stream << "," << seperator;
if (index % wrap == 0)
{
stream << "\n";
indent(stream, level + 1);
}
}
json::Value childPrintConfig = json::Value::null;
if (!printConfig.isNull())
{
if (printConfig.isMember("elements"))
childPrintConfig = printConfig["elements"];
else if (printConfig.isMember("recursive") && printConfig["recursive"].asBool() == true)
childPrintConfig = printConfig;
}
v.prettyPrint(stream, childPrintConfig, level + 1);
index++;
}
if ((long)size() > wrap)
{
stream << "\n";
indent(stream, level);
}
stream << "]";
break;
}
case Type::objectValue:
{
stream << "{\n";
int wrap = 99999;
if (value.arrayValue->size() > 10)
wrap = 1;
if (value.arrayValue->at(0).isArray() || value.arrayValue->at(0).isObject())
wrap = 1;
else
wrap = 3;
std::string seperator = " ";
if (!printConfig.isNull() && printConfig.isMember("wrap"))
wrap = printConfig["wrap"];
if (!printConfig.isNull() && printConfig.isMember("seperator"))
seperator = printConfig["seperator"].asString();
int index = 0;
indent(stream, level + 1);
//for (auto v : *value.objectValue)
auto printEl = [&](const std::pair<const std::string&, const Value&> v)
{
if (index > 0)
{
stream << "," << seperator;
if (index % wrap == 0)
{
stream << "\n";
indent(stream, level + 1);
}
}
stream << "\"" << v.first << "\" : ";
if (
(v.second.isArray() || v.second.isObject()) &&
(printConfig.isNull() ||
(
printConfig.isMember(v.first) &&
printConfig[v.first].isObject() &&
printConfig[v.first].isMember("wrap") &&
printConfig[v.first]["wrap"].asInt() < (int)v.second.size())
)
)
{
stream << "\n";
indent(stream, level + 1);
}
json::Value childPrintConfig = json::Value::null;
if (!printConfig.isNull())
{
if (printConfig.isMember(v.first))
childPrintConfig = printConfig[v.first];
else if (printConfig.isMember("recursive") && printConfig["recursive"].asBool() == true)
childPrintConfig = printConfig;
}
v.second.prettyPrint(stream, childPrintConfig, level + 1);;
index++;
};
std::set<std::string> printed;
if (!printConfig.isNull())
{
if (printConfig.isMember("sort"))
{
for (std::string el : printConfig["sort"])
{
if (isMember(el))
{
printEl(std::pair<const std::string&, const Value&>(el, (*value.objectValue)[el]));
printed.insert(el);
}
}
}
}
for (auto v : *value.objectValue)
if (printed.find(v.first) == printed.end())
printEl(v);
stream << "\n";
indent(stream, level);
stream << "}";
break;
}
case Type::nullValue:
stream << "null";
break;
}
return stream;
}
std::ostream & operator<<(std::ostream &stream, const Value& value)
{
stream << std::fixed<< std::setprecision(6);
switch (value.type)
{
case Type::intValue:
stream << value.value.intValue;
break;
case Type::floatValue:
assert(!isnan(value.value.floatValue));
//assert(isnormal(value.value.floatValue));
stream << value.value.floatValue;
break;
case Type::boolValue:
stream << (value.value.boolValue ? "true" : "false");
break;
case Type::stringValue:
stream << "\"" << *value.value.stringValue << "\""; //TODO: escape \'s
break;
case Type::arrayValue:
{
stream << "[";
bool first = true;
for (auto v : value)
{
if (!first)
stream << ", ";
stream << v;
first = false;
}
stream << "]";
break;
}
case Type::objectValue:
{
stream << "{";
bool first = true;
for (auto v : *value.value.objectValue)
{
if (!first)
stream << ", ";
stream << "\"" << v.first << "\" : " << v.second << std::endl;
first = false;
}
stream << "}";
break;
}
case Type::nullValue:
stream << "null";
break;
}
return stream;
}
}
+124
View File
@@ -0,0 +1,124 @@
#pragma once
#include <string>
#include <map>
#include <vector>
#include <assert.h>
namespace json
{
enum class Type
{
intValue,
floatValue,
boolValue,
stringValue,
arrayValue,
objectValue,
nullValue
};
class Value
{
public:
Type type;
union ValueHolder
{
int intValue;
float floatValue;
bool boolValue;
std::string* stringValue;
std::vector<Value>* arrayValue;
std::map<std::string, Value>* objectValue;
} value;
static Value null;
Value();
Value(Type type);
Value(int value);
Value(float value);
Value(bool value);
Value(const std::string &value);
Value(const char* value);
Value(const Value& other);
virtual ~Value();
void operator = (const Value& other);
inline operator int() const { return asInt(); }
inline operator float() const { return asFloat(); }
inline operator bool() const { return asBool(); }
inline operator const std::string&() const { return asString(); }
inline int asInt() const { assert(type == Type::intValue); return value.intValue; }
inline float asFloat() const { assert(type == Type::floatValue || type == Type::intValue); return type == Type::floatValue ? value.floatValue : value.intValue; }
inline bool asBool() const { assert(type == Type::boolValue); return value.boolValue; }
inline const std::string& asString() const { assert(type == Type::stringValue); return *value.stringValue; }
inline bool isNull() const { return type == Type::nullValue; }
inline bool isString() const { return type == Type::stringValue; }
inline bool isInt() const { return type == Type::intValue; }
inline bool isBool() const { return type == Type::boolValue; }
inline bool isFloat() const { return type == Type::floatValue; }
inline bool isObject() const { return type == Type::objectValue; }
inline bool isArray() const { return type == Type::arrayValue; }
inline bool isMember(const std::string &name) const { assert(type == Type::objectValue); return value.objectValue->find(name) != value.objectValue->end(); }
//array/object
virtual size_t size() const;
//array
virtual void push_back(const Value& value);
virtual void erase(size_t index);
virtual Value& operator [] (size_t index);
virtual Value& operator [] (int index);
virtual Value& operator [] (size_t index) const;
virtual Value& operator [] (int index) const;
virtual Value& operator [] (const std::string &key);
virtual Value& operator [] (const char* key);
virtual Value& operator [] (const std::string &key) const;
virtual Value& operator [] (const char* key) const;
virtual bool operator == (const std::string &other) { return asString() == other; }
virtual bool operator == (const int other) { return asInt() == other; }
virtual bool operator == (const float other) { return asFloat() == other; }
std::ostream& prettyPrint(std::ostream& stream, json::Value& printConfig = null, int level = 0) const;
class Iterator;
Iterator begin() const;
Iterator end() const;
};
class Value::Iterator
{
private:
Type type;
std::map<std::string, Value>::iterator objectIterator;
std::vector<Value>::iterator arrayIterator;
public:
Iterator(const std::map<std::string, Value>::iterator& objectIterator);
Iterator(const std::vector<Value>::iterator& arrayIterator);
void operator ++();
void operator ++(int);
bool operator != (const Iterator &other);
Value operator*();
std::string key();
Value& value();
};
Value readJson(const std::string &data);
Value readJson(std::istream &stream);
std::ostream &operator << (std::ostream &stream, const Value& value); //serializes json data
}
+100
View File
@@ -0,0 +1,100 @@
newmtl SpringIsComing:Material_007
illum 4
Kd 0.75 0.80 0.80
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
Ns 96.08
newmtl Tree01:Material_001
illum 4
Kd 0.01 0.00 0.00
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
Ns 96.08
newmtl Tree01:Material_004
illum 4
Kd 0.60 0.20 0.30
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
Ns 96.08
newmtl Tree02:Material_001
illum 4
Kd 0.01 0.00 0.00
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
Ns 96.08
newmtl Tree02:Material_004
illum 4
Kd 0.60 0.20 0.30
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
Ns 96.08
newmtl Tree03:Material_001
illum 4
Kd 0.01 0.00 0.00
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
Ns 96.08
newmtl Tree03:Material_004
illum 4
Kd 0.60 0.20 0.30
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
Ns 96.08
newmtl Tree04:Material_001
illum 4
Kd 0.01 0.00 0.00
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
Ns 96.08
newmtl Tree04:Material_004
illum 4
Kd 0.60 0.20 0.30
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
Ns 96.08
newmtl initialShadingGroup
illum 4
Kd 0.34 0.34 0.34
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl rock1:Material_001
illum 4
Kd 0.64 0.64 0.64
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
Ns 96.08
newmtl rock3:Material_016
illum 4
Kd 0.64 0.64 0.64
Ka 1.00 1.00 1.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
Ns 96.08
+113
View File
@@ -0,0 +1,113 @@
newmtl bob1:initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.67 0.67 0.67
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.20 0.32 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 1.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert7SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert8SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert10SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert12SG
illum 4
Kd 0.58 0.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert13SG
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert14SG
illum 4
Kd 1.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert15SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd TheThing2.png
Ni 1.00
newmtl lambert16SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd SkateboardwielThing.png
Ni 1.00
newmtl lambert17SG
illum 4
Kd 0.25 0.25 0.25
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
newmtl lambert18SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Bobhelemaal2.png
Ni 1.00
Ks 0.50 0.50 0.50
newmtl pasted__lambert2SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.50 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert5SG
illum 4
Kd 0.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

+61
View File
@@ -0,0 +1,61 @@
newmtl Engine_Thomas:Eyes
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Eye_01.png
Ni 1.00
Ks 0.37 0.37 0.37
Ns 96.08
newmtl Engine_Thomas:Page_01
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd engine_thomas_page1.png
Ni 1.00
Ks 0.37 0.37 0.37
Ns 96.08
newmtl Engine_Thomas:Page_02
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd engine_thomas_page2.png
Ni 1.00
Ks 0.37 0.37 0.37
Ns 96.08
newmtl Engine_Thomas:Page_05
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 0.00 0.00 0.00
map_Kd Engine_Thomas_Page3.png
Ni 1.00
Ks 0.37 0.37 0.37
Ns 96.08
newmtl Engine_Thomas:Shadow
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 0.00 0.00 0.00
map_Kd Thomas_Shadow.png
Ni 1.00
Ks 0.37 0.37 0.37
Ns 96.08
newmtl initialShadingGroup
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd tex_wendy.jpg
Ni 1.00
newmtl wooper:wooper
illum 4
Kd 0.00 0.00 0.00
Ka 0.20 0.20 0.20
Tf 1.00 1.00 1.00
map_Kd wooper.png
Ni 1.00
Ks 0.00 0.00 0.00
Ns 0.00
+113
View File
@@ -0,0 +1,113 @@
newmtl bob1:initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.67 0.67 0.67
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.20 0.32 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 1.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert7SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert8SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert10SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert12SG
illum 4
Kd 0.58 0.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert13SG
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert14SG
illum 4
Kd 1.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert15SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd TheThing2.png
Ni 1.00
newmtl lambert16SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd SkateboardwielThing.png
Ni 1.00
newmtl lambert17SG
illum 4
Kd 0.25 0.25 0.25
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
newmtl lambert18SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Bobhelemaal2.png
Ni 1.00
Ks 0.50 0.50 0.50
newmtl pasted__lambert2SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.50 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert5SG
illum 4
Kd 0.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Binary file not shown.

After

Width:  |  Height:  |  Size: 580 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 KiB

+116
View File
@@ -0,0 +1,116 @@
newmtl bob1:initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.67 0.67 0.67
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.20 0.32 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 1.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert7SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl lambert8SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl lambert10SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert12SG
illum 4
Kd 0.58 0.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert13SG
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert14SG
illum 4
Kd 1.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert15SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd TheThing2.png
Ni 1.00
newmtl lambert16SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd SkateboardwielThing.png
Ni 1.00
newmtl lambert17SG
illum 4
Kd 0.25 0.25 0.25
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
newmtl lambert18SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Bobhelemaal2.png
Ni 1.00
Ks 0.50 0.50 0.50
newmtl pasted__lambert2SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.50 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert5SG
illum 4
Kd 0.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

+6
View File
@@ -0,0 +1,6 @@
newmtl Cave1:pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+6
View File
@@ -0,0 +1,6 @@
newmtl lambert2SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+13
View File
@@ -0,0 +1,13 @@
newmtl Cave1:pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd DragonWallAwesome.png
Ni 1.00
Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

+12
View File
@@ -0,0 +1,12 @@
newmtl Cave1:pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 0.00 0.00 0.00
Ni 1.00
+43
View File
@@ -0,0 +1,43 @@
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.11 0.07 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.50 0.35 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Naamloos.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+73
View File
@@ -0,0 +1,73 @@
newmtl Rock1:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock2:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock3:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock4:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.11 0.07 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.50 0.35 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Naamloos.png
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.89 0.89 0.89
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+43
View File
@@ -0,0 +1,43 @@
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.11 0.07 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.50 0.35 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Naamloos.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+43
View File
@@ -0,0 +1,43 @@
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.11 0.07 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.50 0.35 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Naamloos.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+43
View File
@@ -0,0 +1,43 @@
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.11 0.07 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.50 0.35 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Naamloos.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+67
View File
@@ -0,0 +1,67 @@
newmtl Rock1:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock2:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock3:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock4:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.11 0.07 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.50 0.35 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Naamloos.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+67
View File
@@ -0,0 +1,67 @@
newmtl Rock1:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock2:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock3:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock4:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.11 0.07 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.50 0.35 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Naamloos.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+67
View File
@@ -0,0 +1,67 @@
newmtl Rock1:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock2:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock3:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock4:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.11 0.07 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.50 0.35 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Naamloos.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+73
View File
@@ -0,0 +1,73 @@
newmtl Rock1:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock2:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock3:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock4:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.11 0.07 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.50 0.35 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Naamloos.png
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.89 0.89 0.89
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+73
View File
@@ -0,0 +1,73 @@
newmtl Rock1:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock2:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock3:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Rock4:pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.11 0.07 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.50 0.35 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Naamloos.png
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.89 0.89 0.89
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.13 0.14 0.16
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__pasted__lambert3SG1
illum 4
Kd 0.45 0.45 0.45
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+122
View File
@@ -0,0 +1,122 @@
newmtl SpikeRock1:lambert4SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl bob1:initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.67 0.67 0.67
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.20 0.32 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 1.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert7SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl lambert8SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl lambert10SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert12SG
illum 4
Kd 0.58 0.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert13SG
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert14SG
illum 4
Kd 1.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert15SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd TheThing2.png
Ni 1.00
newmtl lambert16SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd SkateboardwielThing.png
Ni 1.00
newmtl lambert17SG
illum 4
Kd 0.25 0.25 0.25
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
newmtl lambert18SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Bobhelemaal2.png
Ni 1.00
Ks 0.50 0.50 0.50
newmtl pasted__lambert2SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.50 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert5SG
illum 4
Kd 0.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+122
View File
@@ -0,0 +1,122 @@
newmtl SpikeRock2:lambert4SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl bob1:initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.67 0.67 0.67
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.20 0.32 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 1.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert7SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl lambert8SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl lambert10SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert12SG
illum 4
Kd 0.58 0.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert13SG
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert14SG
illum 4
Kd 1.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert15SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd TheThing2.png
Ni 1.00
newmtl lambert16SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd SkateboardwielThing.png
Ni 1.00
newmtl lambert17SG
illum 4
Kd 0.25 0.25 0.25
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
newmtl lambert18SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Bobhelemaal2.png
Ni 1.00
Ks 0.50 0.50 0.50
newmtl pasted__lambert2SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.50 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert5SG
illum 4
Kd 0.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+122
View File
@@ -0,0 +1,122 @@
newmtl SpikeRock3:lambert4SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl bob1:initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.67 0.67 0.67
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.20 0.32 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 1.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert7SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl lambert8SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl lambert10SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert12SG
illum 4
Kd 0.58 0.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert13SG
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert14SG
illum 4
Kd 1.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert15SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd TheThing2.png
Ni 1.00
newmtl lambert16SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd SkateboardwielThing.png
Ni 1.00
newmtl lambert17SG
illum 4
Kd 0.25 0.25 0.25
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
newmtl lambert18SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Bobhelemaal2.png
Ni 1.00
Ks 0.50 0.50 0.50
newmtl pasted__lambert2SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.50 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert5SG
illum 4
Kd 0.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+122
View File
@@ -0,0 +1,122 @@
newmtl SpikeRock4:lambert4SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl bob1:initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.67 0.67 0.67
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.20 0.32 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 1.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert7SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl lambert8SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl lambert10SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert12SG
illum 4
Kd 0.58 0.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert13SG
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert14SG
illum 4
Kd 1.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert15SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd TheThing2.png
Ni 1.00
newmtl lambert16SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd SkateboardwielThing.png
Ni 1.00
newmtl lambert17SG
illum 4
Kd 0.25 0.25 0.25
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
newmtl lambert18SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Bobhelemaal2.png
Ni 1.00
Ks 0.50 0.50 0.50
newmtl pasted__lambert2SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.50 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert5SG
illum 4
Kd 0.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+122
View File
@@ -0,0 +1,122 @@
newmtl SpikeRock5:lambert4SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl bob1:initialShadingGroup
illum 4
Kd 0.50 0.50 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl initialShadingGroup
illum 4
Kd 0.67 0.67 0.67
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.20 0.32 0.50
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 1.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert7SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl lambert8SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl lambert10SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert12SG
illum 4
Kd 0.58 0.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert13SG
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert14SG
illum 4
Kd 1.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert15SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd TheThing2.png
Ni 1.00
newmtl lambert16SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd SkateboardwielThing.png
Ni 1.00
newmtl lambert17SG
illum 4
Kd 0.25 0.25 0.25
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
Ks 0.50 0.50 0.50
newmtl lambert18SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Bobhelemaal2.png
Ni 1.00
Ks 0.50 0.50 0.50
newmtl pasted__lambert2SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd Screenshot_1.png
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.50 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert5SG
illum 4
Kd 0.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
+19
View File
@@ -0,0 +1,19 @@
newmtl CylinderSG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd ^D70CEF585F0EAF59BA1D4FC14B4011137E15ED44D07FA7B93F^pimgpsh_fullsize_distr.png
Ni 1.00
newmtl Oil_TankSG
illum 4
Kd 0.00 0.00 0.80
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl Oil_TankSG1
illum 4
Kd 0.43 0.63 0.80
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

+192
View File
@@ -0,0 +1,192 @@
newmtl initialShadingGroup
illum 4
Kd 0.21 0.09 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert2SG
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert3SG
illum 4
Kd 0.50 0.21 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert4SG
illum 4
Kd 0.50 0.21 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert5SG
illum 4
Kd 0.00 0.16 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert6SG
illum 4
Kd 0.00 0.16 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert8SG
illum 4
Kd 0.00 0.16 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert9SG
illum 4
Kd 1.00 1.00 1.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert10SG
illum 4
Kd 0.12 0.28 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl lambert11SG
illum 4
Kd 0.50 0.21 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert2SG
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert2SG1
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert2SG2
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert2SG3
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert2SG4
illum 4
Kd 0.00 1.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert3SG
illum 4
Kd 0.50 0.21 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert3SG1
illum 4
Kd 0.50 0.21 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert3SG2
illum 4
Kd 0.50 0.21 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert3SG3
illum 4
Kd 0.50 0.21 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert3SG4
illum 4
Kd 0.50 0.21 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert4SG
illum 4
Kd 0.50 0.21 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert4SG1
illum 4
Kd 0.50 0.21 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert4SG2
illum 4
Kd 0.50 0.21 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert5SG
illum 4
Kd 0.00 0.16 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert5SG1
illum 4
Kd 0.00 0.16 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert5SG2
illum 4
Kd 0.00 0.16 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert6SG
illum 4
Kd 0.00 0.16 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert6SG1
illum 4
Kd 0.00 0.16 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert6SG2
illum 4
Kd 0.00 0.16 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert8SG
illum 4
Kd 0.00 0.16 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert8SG1
illum 4
Kd 0.00 0.16 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl pasted__lambert8SG2
illum 4
Kd 0.00 0.16 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

Some files were not shown because too many files have changed in this diff Show More