Compare commits
117
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6732a55097 | ||
|
|
6f8c2955eb | ||
|
|
ec83d31065 | ||
|
|
e69008b083 | ||
|
|
ddadafecff | ||
|
|
eaeff6ed7d | ||
|
|
6096e53d94 | ||
|
|
8700aa90af | ||
|
|
7c4805d899 | ||
|
|
e42779f6c7 | ||
|
|
ce2f658b61 | ||
|
|
3701918ac9 | ||
|
|
d887328907 | ||
|
|
8cf1b02cf7 | ||
|
|
779cf5cb91 | ||
|
|
030a136e8b | ||
|
|
f93c09a999 | ||
|
|
587b79044b | ||
|
|
dba9c581b1 | ||
|
|
d5406120c6 | ||
|
|
e081373a45 | ||
|
|
98f3645b6b | ||
|
|
5c776e3d3a | ||
|
|
03c06e0974 | ||
|
|
b7d73c9abe | ||
|
|
7758f2c294 | ||
|
|
2e50d11e07 | ||
|
|
1ec3c8f346 | ||
|
|
8dcee70324 | ||
|
|
6cf9437620 | ||
|
|
f84fcfa4e2 | ||
|
|
ad30824057 | ||
|
|
04fd3ac0e3 | ||
|
|
31c11f3e1f | ||
|
|
656a904a4b | ||
|
|
348b53c027 | ||
|
|
71801a30f2 | ||
|
|
0ca94aef4d | ||
|
|
ced3ff4462 | ||
|
|
912a2234a3 | ||
|
|
0209c8b4e2 | ||
|
|
6bcd9b1426 | ||
|
|
579e02728a | ||
|
|
af681b0223 | ||
|
|
3ed5331437 | ||
|
|
0aad7262d6 | ||
|
|
9cfaf07eba | ||
|
|
9659caa1d8 | ||
|
|
a4373adc25 | ||
|
|
1f3188376a | ||
|
|
69561794d8 | ||
|
|
5c24a34202 | ||
|
|
1164501158 | ||
|
|
593b9547cf | ||
|
|
1a4339b49d | ||
|
|
2c624ac4c7 | ||
|
|
881b58138c | ||
|
|
bba0a2e2a0 | ||
|
|
117010b9fe | ||
|
|
47b4d9570d | ||
|
|
0f8fd67dd3 | ||
|
|
0afbca8ffc | ||
|
|
293ceb0b9f | ||
|
|
b827885f40 | ||
|
|
527394f635 | ||
|
|
95ab1879b4 | ||
|
|
95febc136f | ||
|
|
b4a2da4b88 | ||
|
|
c3fe041eb1 | ||
|
|
1ade6002c1 | ||
|
|
f0a8330819 | ||
|
|
a80fc69043 | ||
|
|
0c73b5a586 | ||
|
|
b53bcac528 | ||
|
|
ae80c7a5bf | ||
|
|
34ea491f39 | ||
|
|
d83cc6403c | ||
|
|
1c59a3bc6f | ||
|
|
2b0e22d4c9 | ||
|
|
4c613b606a | ||
|
|
56e174ae2f | ||
|
|
908786897f | ||
|
|
33a61ca2ed | ||
|
|
b2fa0bc028 | ||
|
|
cf124b3f38 | ||
|
|
0b6096d3e8 | ||
|
|
84fcc346a9 | ||
|
|
fe1aa7220e | ||
|
|
d739141b25 | ||
|
|
2a6cc0fd87 | ||
|
|
965b54c901 | ||
|
|
e7a7cc5588 | ||
|
|
9d3cfa7e2a | ||
|
|
47c228205a | ||
|
|
b1aa61d5f0 | ||
|
|
5ca5ca194b | ||
|
|
e75f624935 | ||
|
|
d01efecb0e | ||
|
|
7d13269480 | ||
|
|
a8415db4ac | ||
|
|
1120a3e144 | ||
|
|
f2af3a7324 | ||
|
|
7c4ee37867 | ||
|
|
a38a6d3c5f | ||
|
|
876ec56780 | ||
|
|
5df4a1d8d0 | ||
|
|
d7f74212f0 | ||
|
|
3a4d11d46d | ||
|
|
e5664e207d | ||
|
|
cda6e2c822 | ||
|
|
3d97ade42e | ||
|
|
1693c74a6a | ||
|
|
11f07b154b | ||
|
|
049fb28ffc | ||
|
|
9769b88156 | ||
|
|
d032021cde | ||
|
|
77ac841b8b |
@@ -48,7 +48,6 @@ artifacts/
|
|||||||
*_i.h
|
*_i.h
|
||||||
*.ilk
|
*.ilk
|
||||||
*.meta
|
*.meta
|
||||||
*.obj
|
|
||||||
*.pch
|
*.pch
|
||||||
*.pdb
|
*.pdb
|
||||||
*.pgc
|
*.pgc
|
||||||
|
|||||||
Generated
+6
@@ -0,0 +1,6 @@
|
|||||||
|
/workspace.xml
|
||||||
|
/vcs.xml
|
||||||
|
/modules.xml
|
||||||
|
/misc.xml
|
||||||
|
/encodings.xml
|
||||||
|
/CrystalPoint.iml
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
+76
@@ -0,0 +1,76 @@
|
|||||||
|
#include "Button.h"
|
||||||
|
#include <string>
|
||||||
|
#include "Util.h"
|
||||||
|
#include "Vector.h"
|
||||||
|
#include "Cursor.h"
|
||||||
|
|
||||||
|
Button::Button(const std::string & text, Vec2f position, float width, float height) : Text(text,position)
|
||||||
|
{
|
||||||
|
this->width = width;
|
||||||
|
this->height = height;
|
||||||
|
this->planePosition = position;
|
||||||
|
|
||||||
|
cursorOnButton = false;
|
||||||
|
alfa = 0.5f;
|
||||||
|
background = Vec3f(10, 10, 10);
|
||||||
|
//foreground = Vec3f(255, 255, 255);
|
||||||
|
this->setColor(Vec3f(255, 255, 255));
|
||||||
|
|
||||||
|
this->position.x += width / 2 - textWidth / 2;
|
||||||
|
this->position.y += height / 2 - textHeight / 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
Button::~Button()
|
||||||
|
{
|
||||||
|
/*if (action != nullptr)
|
||||||
|
delete action;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
void Button::draw(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
glColor4f(background.x/255.0f, background.y / 255.0f, background.z / 255.0f, alfa);
|
||||||
|
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
glVertex2f(planePosition.x, planePosition.y);
|
||||||
|
glVertex2f(planePosition.x, planePosition.y + height);
|
||||||
|
glVertex2f(planePosition.x + width, planePosition.y + height);
|
||||||
|
glVertex2f(planePosition.x + width, planePosition.y);
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
/*glColor4f(foreground.x / 255.0f, foreground.y / 255.0f, foreground.z / 255.0f, 1.0f);
|
||||||
|
Util::glutBitmapString(text, position.x, position.y+height/2+14/2);*/
|
||||||
|
Text::draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Button::update(int x, int y)
|
||||||
|
{
|
||||||
|
cursorOnButton =
|
||||||
|
(x > planePosition.x && x < planePosition.x + width) &&
|
||||||
|
y > planePosition.y && y < planePosition.y + height;
|
||||||
|
|
||||||
|
|
||||||
|
if (cursorOnButton)
|
||||||
|
alfa = 1.0f;
|
||||||
|
else
|
||||||
|
alfa = 0.5f;
|
||||||
|
|
||||||
|
if (cursorOnButton && Cursor::getInstance()->clicked)
|
||||||
|
if(action != nullptr)
|
||||||
|
action(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Button::addAction(action_function action)
|
||||||
|
{
|
||||||
|
this->action = action;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Button::setForeground(Vec3f color)
|
||||||
|
{
|
||||||
|
this->setColor(color);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Button::setBackground(Vec3f color)
|
||||||
|
{
|
||||||
|
background = color;
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Text.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Button : public Text
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
typedef void(*action_function)(Button* b);
|
||||||
|
float width, height;
|
||||||
|
Vec3f background;
|
||||||
|
Vec2f planePosition;
|
||||||
|
bool cursorOnButton;
|
||||||
|
float alfa;
|
||||||
|
action_function action = nullptr;
|
||||||
|
public:
|
||||||
|
Button(const std::string &text, Vec2f position, float width, float height);
|
||||||
|
~Button();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void draw();
|
||||||
|
void update(int x, int y);
|
||||||
|
|
||||||
|
void addAction(action_function action);
|
||||||
|
|
||||||
|
void setForeground(Vec3f color);
|
||||||
|
void setBackground(Vec3f color);
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
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)
|
||||||
|
find_package(OpenAL REQUIRED)
|
||||||
|
include_directories( ${OPENGL_INCLUDE_DIRS} ${GLUT_INCLUDE_DIRS} ${OPENAL_INCLUDE_DIRS} )
|
||||||
|
target_link_libraries(CrystalPoint ${OPENGL_LIBRARIES} ${GLUT_LIBRARY} ${OPENAL_LIBRARY} )
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -lpthread")
|
||||||
+48
@@ -0,0 +1,48 @@
|
|||||||
|
#include "Crystal.h"
|
||||||
|
#include "Model.h"
|
||||||
|
#include "Player.h"
|
||||||
|
|
||||||
|
|
||||||
|
Crystal::Crystal(const std::string & filled, const std::string & empty, const Vec3f & position, Vec3f & rotation, const float & scale)
|
||||||
|
{
|
||||||
|
this->filled = Model::load(filled);
|
||||||
|
this->empty = Model::load(empty);
|
||||||
|
model = this->filled;
|
||||||
|
|
||||||
|
|
||||||
|
this->position = position;
|
||||||
|
this->rotation = rotation;
|
||||||
|
this->scale = scale;
|
||||||
|
this->canCollide = true;
|
||||||
|
isFilled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Crystal::~Crystal()
|
||||||
|
{
|
||||||
|
if (model)
|
||||||
|
Model::unload(model);
|
||||||
|
|
||||||
|
//if isfilled, means model is model filled, so model empty has to been deleted.
|
||||||
|
//if is not filled, means model is model empty, so model filled has to been deleted.
|
||||||
|
if (isFilled)
|
||||||
|
if(empty)
|
||||||
|
Model::unload(empty);
|
||||||
|
else
|
||||||
|
if(filled)
|
||||||
|
Model::unload(filled);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Crystal::draw()
|
||||||
|
{
|
||||||
|
Entity::draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Crystal::collide()
|
||||||
|
{
|
||||||
|
if (isFilled)
|
||||||
|
{
|
||||||
|
Player::getInstance()->crystals++;
|
||||||
|
isFilled = false;
|
||||||
|
model = empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Entity.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class Crystal :
|
||||||
|
public Entity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Crystal(const std::string &filled, const std::string &empty,
|
||||||
|
const Vec3f &position, Vec3f &rotation, const float &scale);
|
||||||
|
~Crystal();
|
||||||
|
|
||||||
|
bool isFilled;
|
||||||
|
void draw();
|
||||||
|
void collide();
|
||||||
|
private:
|
||||||
|
Model* filled;
|
||||||
|
Model* empty;
|
||||||
|
};
|
||||||
|
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 14
|
||||||
|
VisualStudioVersion = 14.0.24720.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CrystalPoint", "CrystalPoint.vcxproj", "{F82158C7-7345-4CB0-9F90-3AB49A071904}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|x64 = Debug|x64
|
||||||
|
Debug|x86 = Debug|x86
|
||||||
|
Release|x64 = Release|x64
|
||||||
|
Release|x86 = Release|x86
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{F82158C7-7345-4CB0-9F90-3AB49A071904}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{F82158C7-7345-4CB0-9F90-3AB49A071904}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{F82158C7-7345-4CB0-9F90-3AB49A071904}.Debug|x86.ActiveCfg = Debug|Win32
|
||||||
|
{F82158C7-7345-4CB0-9F90-3AB49A071904}.Debug|x86.Build.0 = Debug|Win32
|
||||||
|
{F82158C7-7345-4CB0-9F90-3AB49A071904}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{F82158C7-7345-4CB0-9F90-3AB49A071904}.Release|x64.Build.0 = Release|x64
|
||||||
|
{F82158C7-7345-4CB0-9F90-3AB49A071904}.Release|x86.ActiveCfg = Release|Win32
|
||||||
|
{F82158C7-7345-4CB0-9F90-3AB49A071904}.Release|x86.Build.0 = Release|Win32
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -0,0 +1,141 @@
|
|||||||
|
|
||||||
|
#include "CrystalPoint.h"
|
||||||
|
#include <GL/freeglut.h>
|
||||||
|
#include <cmath>
|
||||||
|
#include <cstring>
|
||||||
|
#include "WorldHandler.h"
|
||||||
|
#include "Player.h"
|
||||||
|
#include "Cursor.h"
|
||||||
|
#include "Menu.h"
|
||||||
|
#include "Text.h"
|
||||||
|
#include "Vector.h"
|
||||||
|
#include "Button.h"
|
||||||
|
|
||||||
|
int CrystalPoint::width = 0;
|
||||||
|
int CrystalPoint::height = 0;
|
||||||
|
|
||||||
|
SoundSystem CrystalPoint::sound_system;
|
||||||
|
bool state = false;
|
||||||
|
|
||||||
|
void CrystalPoint::init()
|
||||||
|
{
|
||||||
|
player = Player::getInstance();
|
||||||
|
worldhandler = WorldHandler::getInstance();
|
||||||
|
cursor = Cursor::getInstance();
|
||||||
|
|
||||||
|
menu = new Menu();
|
||||||
|
buildMenu();
|
||||||
|
|
||||||
|
lastFrameTime = 0;
|
||||||
|
state = true;
|
||||||
|
|
||||||
|
glClearColor(0.7f, 0.7f, 1.0f, 1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
if(!state)
|
||||||
|
menu->draw();
|
||||||
|
glutSwapBuffers();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CrystalPoint::update()
|
||||||
|
{
|
||||||
|
float frameTime = glutGet(GLUT_ELAPSED_TIME) / 1000.0f;
|
||||||
|
float deltaTime = frameTime - lastFrameTime;
|
||||||
|
lastFrameTime = frameTime;
|
||||||
|
|
||||||
|
if (keyboardState.keys[27] && !prevKeyboardState.keys[27])
|
||||||
|
state = !state;
|
||||||
|
|
||||||
|
if (state)
|
||||||
|
{
|
||||||
|
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();
|
||||||
|
|
||||||
|
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 = 10;
|
||||||
|
|
||||||
|
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) + 2.5f;
|
||||||
|
worldhandler->update(deltaTime);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
menu->update();
|
||||||
|
cursor->update(cursor->mousePosition + mouseOffset);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
mouseOffset = Vec2f(0, 0);
|
||||||
|
prevKeyboardState = keyboardState;
|
||||||
|
glutPostRedisplay();
|
||||||
|
|
||||||
|
sound_system.SetListener(player->position, Vec3f(), Vec3f());
|
||||||
|
}
|
||||||
|
|
||||||
|
void CrystalPoint::buildMenu()
|
||||||
|
{
|
||||||
|
Button* start = new Button("Resume", Vec2f(1920 / 2 - 50, 1080 / 2 - 30), 100, 50);
|
||||||
|
auto toWorld = [](Button* b)
|
||||||
|
{
|
||||||
|
state = true;
|
||||||
|
};
|
||||||
|
start->addAction(toWorld);
|
||||||
|
menu->AddMenuElement(start);
|
||||||
|
|
||||||
|
|
||||||
|
Button* test = new Button("Exit", Vec2f(1920 / 2 - 50, 1080 / 2 + 30), 100, 50);
|
||||||
|
test->addAction([](Button* b)
|
||||||
|
{
|
||||||
|
exit(0);
|
||||||
|
});
|
||||||
|
menu->AddMenuElement(test);
|
||||||
|
Text* t = new Text("Pause", Vec2f(1920 / 2 - Util::glutTextWidth("Pause") / 2, 1080 / 2 - 75));
|
||||||
|
t->setColor(Vec3f(255, 255, 0));
|
||||||
|
menu->AddMenuElement(t);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
KeyboardState::KeyboardState()
|
||||||
|
{
|
||||||
|
memset(keys, 0, sizeof(keys));
|
||||||
|
memset(special, 0, sizeof(special));
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class WorldHandler;
|
||||||
|
class SoundSystem;
|
||||||
|
class Player;
|
||||||
|
class Cursor;
|
||||||
|
class Menu;
|
||||||
|
#include "Vector.h"
|
||||||
|
#include "SoundSystem.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;
|
||||||
|
Cursor* cursor;
|
||||||
|
|
||||||
|
Menu* menu;
|
||||||
|
|
||||||
|
static int width, height;
|
||||||
|
KeyboardState keyboardState;
|
||||||
|
KeyboardState prevKeyboardState;
|
||||||
|
|
||||||
|
Vec2f mouseOffset;
|
||||||
|
Vec2f mousePosition;
|
||||||
|
|
||||||
|
float lastFrameTime;
|
||||||
|
|
||||||
|
static SoundSystem& GetSoundSystem() { return sound_system; }
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
static SoundSystem sound_system;
|
||||||
|
void buildMenu();
|
||||||
|
};
|
||||||
@@ -0,0 +1,225 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Win32</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<ProjectGuid>{F82158C7-7345-4CB0-9F90-3AB49A071904}</ProjectGuid>
|
||||||
|
<Keyword>Win32Proj</Keyword>
|
||||||
|
<RootNamespace>CrystalJohan</RootNamespace>
|
||||||
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
|
<ProjectName>CrystalPoint</ProjectName>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||||
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
|
<PlatformToolset>v140</PlatformToolset>
|
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="Shared">
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
|
</ImportGroup>
|
||||||
|
<PropertyGroup Label="UserMacros" />
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeaderFile />
|
||||||
|
<AdditionalIncludeDirectories>freeglut/include; openAL/include</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>freeglut/lib; openAL/libs/Win32</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;OpenAL32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<Optimization>Disabled</Optimization>
|
||||||
|
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeaderFile />
|
||||||
|
<AdditionalIncludeDirectories>freeglut/include;C:\Program Files (x86)\OpenAL 1.1 SDK\include</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>freeglut/lib;C:\Program Files (x86)\OpenAL 1.1 SDK\libs\Win32</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;OpenAL32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeaderFile />
|
||||||
|
<AdditionalIncludeDirectories>freeglut/include; openAL/include</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>freeglut/lib; openAL/libs/Win32</AdditionalLibraryDirectories>
|
||||||
|
<AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;OpenAL32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<ClCompile>
|
||||||
|
<WarningLevel>Level3</WarningLevel>
|
||||||
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
|
<Optimization>MaxSpeed</Optimization>
|
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
<PrecompiledHeaderFile />
|
||||||
|
<AdditionalIncludeDirectories>freeglut/include</AdditionalIncludeDirectories>
|
||||||
|
</ClCompile>
|
||||||
|
<Link>
|
||||||
|
<SubSystem>Console</SubSystem>
|
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
<AdditionalLibraryDirectories>freeglut/lib</AdditionalLibraryDirectories>
|
||||||
|
</Link>
|
||||||
|
</ItemDefinitionGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="Button.cpp" />
|
||||||
|
<ClCompile Include="Crystal.cpp" />
|
||||||
|
<ClCompile Include="CrystalPoint.cpp" />
|
||||||
|
<ClCompile Include="Cursor.cpp" />
|
||||||
|
<ClCompile Include="Enemy.cpp" />
|
||||||
|
<ClCompile Include="Entity.cpp" />
|
||||||
|
<ClCompile Include="HeightMap.cpp" />
|
||||||
|
<ClCompile Include="Interface.cpp" />
|
||||||
|
<ClCompile Include="json.cpp" />
|
||||||
|
<ClCompile Include="LevelObject.cpp" />
|
||||||
|
<ClCompile Include="Main.cpp" />
|
||||||
|
<ClCompile Include="Menu.cpp" />
|
||||||
|
<ClCompile Include="MenuElement.cpp" />
|
||||||
|
<ClCompile Include="Model.cpp" />
|
||||||
|
<ClCompile Include="Portal.cpp" />
|
||||||
|
<ClCompile Include="Sound.cpp" />
|
||||||
|
<ClCompile Include="SoundSystem.cpp" />
|
||||||
|
<ClCompile Include="Player.cpp" />
|
||||||
|
<ClCompile Include="Skybox.cpp" />
|
||||||
|
<ClCompile Include="Text.cpp" />
|
||||||
|
<ClCompile Include="Util.cpp" />
|
||||||
|
<ClCompile Include="Vector.cpp" />
|
||||||
|
<ClCompile Include="Vertex.cpp" />
|
||||||
|
<ClCompile Include="World.cpp" />
|
||||||
|
<ClCompile Include="WorldHandler.cpp" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClInclude Include="Button.h" />
|
||||||
|
<ClInclude Include="Crystal.h" />
|
||||||
|
<ClInclude Include="CrystalPoint.h" />
|
||||||
|
<ClInclude Include="Cursor.h" />
|
||||||
|
<ClInclude Include="Enemy.h" />
|
||||||
|
<ClInclude Include="Entity.h" />
|
||||||
|
<ClInclude Include="HeightMap.h" />
|
||||||
|
<ClInclude Include="Interface.h" />
|
||||||
|
<ClInclude Include="json.h" />
|
||||||
|
<ClInclude Include="LevelObject.h" />
|
||||||
|
<ClInclude Include="Main.h" />
|
||||||
|
<ClInclude Include="Menu.h" />
|
||||||
|
<ClInclude Include="MenuElement.h" />
|
||||||
|
<ClInclude Include="Model.h" />
|
||||||
|
<ClInclude Include="Portal.h" />
|
||||||
|
<ClInclude Include="Sound.h" />
|
||||||
|
<ClInclude Include="SoundSystem.h" />
|
||||||
|
<ClInclude Include="Player.h" />
|
||||||
|
<ClInclude Include="Skybox.h" />
|
||||||
|
<ClInclude Include="stb_image.h" />
|
||||||
|
<ClInclude Include="Text.h" />
|
||||||
|
<ClInclude Include="Util.h" />
|
||||||
|
<ClInclude Include="vector.h" />
|
||||||
|
<ClInclude Include="Vertex.h" />
|
||||||
|
<ClInclude Include="World.h" />
|
||||||
|
<ClInclude Include="WorldHandler.h" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<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>
|
||||||
|
<Media Include="WAVE\bond.wav" />
|
||||||
|
<Media Include="WAVE\Sound.wav" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
</ImportGroup>
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,214 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<ItemGroup>
|
||||||
|
<Filter Include="Source Files">
|
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Header Files">
|
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
|
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Resource Files">
|
||||||
|
<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>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Source Files\Object">
|
||||||
|
<UniqueIdentifier>{1e464995-b141-43fd-9e25-16d6ac47176b}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Source Files\World">
|
||||||
|
<UniqueIdentifier>{0de1a037-e536-40df-a0d0-0d929f2fe752}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Source Files\json">
|
||||||
|
<UniqueIdentifier>{9c655946-3f99-44ea-bc97-2817656954e0}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Source Files\Menu">
|
||||||
|
<UniqueIdentifier>{e7a88896-78e1-4544-bfc8-cfd55323728e}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ClCompile Include="Main.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Player.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="json.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="WorldHandler.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Entity.cpp">
|
||||||
|
<Filter>Source Files\Object</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Model.cpp">
|
||||||
|
<Filter>Source Files\Object</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Vertex.cpp">
|
||||||
|
<Filter>Source Files\Object</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Vector.cpp">
|
||||||
|
<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 Include="Skybox.cpp">
|
||||||
|
<Filter>Source Files\World</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Crystal.cpp">
|
||||||
|
<Filter>Source Files\Object</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="SoundSystem.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Sound.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Crystal.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Portal.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Button.cpp">
|
||||||
|
<Filter>Source Files\Menu</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Menu.cpp">
|
||||||
|
<Filter>Source Files\Menu</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="MenuElement.cpp">
|
||||||
|
<Filter>Source Files\Menu</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Text.cpp">
|
||||||
|
<Filter>Source Files\Menu</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Util.cpp">
|
||||||
|
<Filter>Source Files\Menu</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
</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>
|
||||||
|
<ClInclude Include="SoundSystem.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Sound.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Crystal.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Skybox.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Portal.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Text.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Util.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="MenuElement.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Menu.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="Button.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>
|
||||||
|
<ItemGroup>
|
||||||
|
<Media Include="WAVE\Sound.wav">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
|
</Media>
|
||||||
|
<Media Include="WAVE\bond.wav">
|
||||||
|
<Filter>Resource Files</Filter>
|
||||||
|
</Media>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
+80
@@ -0,0 +1,80 @@
|
|||||||
|
#include "Cursor.h"
|
||||||
|
#include <GL/freeglut.h>
|
||||||
|
#include <cmath>
|
||||||
|
#include "CrystalPoint.h"
|
||||||
|
|
||||||
|
Cursor* Cursor::instance = NULL;
|
||||||
|
|
||||||
|
Cursor::Cursor()
|
||||||
|
{
|
||||||
|
enabled = false;
|
||||||
|
mousePosition = Vec2f(CrystalPoint::width / 2, CrystalPoint::height / 2);
|
||||||
|
clicked = 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)
|
||||||
|
{
|
||||||
|
if (newPosition.x < 0)
|
||||||
|
newPosition.x = 0;
|
||||||
|
|
||||||
|
if (newPosition.y < 0)
|
||||||
|
newPosition.y = 0;
|
||||||
|
|
||||||
|
if (newPosition.x > CrystalPoint::width)
|
||||||
|
newPosition.x = CrystalPoint::width;
|
||||||
|
|
||||||
|
if (newPosition.y > CrystalPoint::height)
|
||||||
|
newPosition.y = CrystalPoint::height;
|
||||||
|
|
||||||
|
mousePosition = newPosition;
|
||||||
|
|
||||||
|
if (clicked)
|
||||||
|
clicked = !clicked;
|
||||||
|
if (state != prev)
|
||||||
|
if(state == GLUT_UP)
|
||||||
|
clicked = true;
|
||||||
|
prev = state;
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Vector.h"
|
||||||
|
|
||||||
|
class Cursor
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
Cursor();
|
||||||
|
|
||||||
|
static Cursor* instance;
|
||||||
|
bool enabled;
|
||||||
|
|
||||||
|
public:
|
||||||
|
Vec2f mousePosition;
|
||||||
|
~Cursor();
|
||||||
|
|
||||||
|
static Cursor* getInstance(void);
|
||||||
|
|
||||||
|
void enable(bool enable);
|
||||||
|
bool isEnabled(void);
|
||||||
|
|
||||||
|
bool clicked;
|
||||||
|
int state, prev;
|
||||||
|
|
||||||
|
|
||||||
|
void draw(void);
|
||||||
|
void update(Vec2f newPosition);
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include <cmath>
|
||||||
|
#include "Enemy.h"
|
||||||
|
#include "Model.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
Enemy::Enemy(const std::string &fileName,
|
||||||
|
const std::string &fileMusic,
|
||||||
|
const Vec3f &position,
|
||||||
|
const 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 = 10;
|
||||||
|
hasTarget = false;
|
||||||
|
hit_sound_id = CrystalPoint::GetSoundSystem().LoadSound(fileMusic.c_str(), false);
|
||||||
|
music = CrystalPoint::GetSoundSystem().GetSound(hit_sound_id);
|
||||||
|
attack = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Enemy::~Enemy()
|
||||||
|
{
|
||||||
|
if (model)
|
||||||
|
Model::unload(model);
|
||||||
|
|
||||||
|
delete music;
|
||||||
|
}
|
||||||
|
|
||||||
|
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::inEyeSight(Vec3f & TargetPosition)
|
||||||
|
{
|
||||||
|
if (position.Distance(TargetPosition) <= radius)
|
||||||
|
{
|
||||||
|
hasTarget = true;
|
||||||
|
target = TargetPosition;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
hasTarget = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Enemy::collide(const Entity * entity)
|
||||||
|
{
|
||||||
|
Vec3f difference = position - entity->position; //zou misschien omgedraait moeten worden
|
||||||
|
difference.y = 0;
|
||||||
|
difference.Normalize();
|
||||||
|
difference = difference * (entity->model->radius + 0.01f);
|
||||||
|
position.x = difference.x + entity->position.x;
|
||||||
|
position.z = difference.z + entity->position.z;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Enemy::update(float delta)
|
||||||
|
{
|
||||||
|
music->SetPos(position, Vec3f());
|
||||||
|
|
||||||
|
if (hasTarget)
|
||||||
|
{
|
||||||
|
if (music->IsPlaying() == false)
|
||||||
|
{
|
||||||
|
music->Play();
|
||||||
|
}
|
||||||
|
//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 > 1)
|
||||||
|
{
|
||||||
|
attack = false;
|
||||||
|
|
||||||
|
dx /= length;
|
||||||
|
dz /= length;
|
||||||
|
|
||||||
|
dx *= speed*delta;
|
||||||
|
dz *= speed*delta;
|
||||||
|
|
||||||
|
position.x += dx;
|
||||||
|
position.z += dz;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
attack = true;
|
||||||
|
if (music->IsPlaying() == true)
|
||||||
|
{
|
||||||
|
// music->Pause();
|
||||||
|
music->Stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rotation.y = atan2f(dx, dz) * 180 / M_PI;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Entity.h"
|
||||||
|
#include <string>
|
||||||
|
#include "Vector.h"
|
||||||
|
#include "CrystalPoint.h"
|
||||||
|
|
||||||
|
class Enemy : public Entity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Enemy(const std::string &fileName, const std::string &fileMusic, const Vec3f &position, const Vec3f &rotation, const float &scale);
|
||||||
|
~Enemy();
|
||||||
|
|
||||||
|
Sound* music;
|
||||||
|
|
||||||
|
bool hasTarget;
|
||||||
|
Vec3f target;
|
||||||
|
float speed,radius;
|
||||||
|
bool attack;
|
||||||
|
|
||||||
|
void update(float);
|
||||||
|
void draw();
|
||||||
|
|
||||||
|
void inEyeSight(Vec3f &);
|
||||||
|
void collide(const Entity *entity);
|
||||||
|
private:
|
||||||
|
int hit_sound_id;
|
||||||
|
};
|
||||||
|
|
||||||
+56
@@ -0,0 +1,56 @@
|
|||||||
|
#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);
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Vector.h"
|
||||||
|
class Model;
|
||||||
|
|
||||||
|
class Entity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Entity();
|
||||||
|
~Entity();
|
||||||
|
|
||||||
|
Model* model;
|
||||||
|
|
||||||
|
virtual void draw();
|
||||||
|
virtual void update(float elapsedTime) {};
|
||||||
|
virtual void collide() {};
|
||||||
|
|
||||||
|
Vec3f position;
|
||||||
|
Vec3f rotation;
|
||||||
|
float scale;
|
||||||
|
|
||||||
|
bool canCollide;
|
||||||
|
bool inObject(const Vec3f &position);
|
||||||
|
};
|
||||||
|
|
||||||
+184
@@ -0,0 +1,184 @@
|
|||||||
|
#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];
|
||||||
|
};
|
||||||
|
|
||||||
|
std::vector<std::vector<Vec3f>> faceNormals(width-1, std::vector<Vec3f>(height-1, Vec3f(0,1,0)));
|
||||||
|
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);
|
||||||
|
Vec3f normal = ca.cross(ba);
|
||||||
|
normal.Normalize();
|
||||||
|
faceNormals[x][y] = normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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 } };
|
||||||
|
|
||||||
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
int xx = x + offsets[i][0];
|
||||||
|
int yy = y + offsets[i][1];
|
||||||
|
|
||||||
|
Vec3f normal(0, 0, 0);
|
||||||
|
if(xx < width-1 && yy < height-1)
|
||||||
|
normal = normal + faceNormals[xx][yy];
|
||||||
|
if(xx > 0 && yy < height-1)
|
||||||
|
normal = normal + faceNormals[xx-1][yy];
|
||||||
|
if (xx > 0 && yy > 0)
|
||||||
|
normal = normal + faceNormals[xx-1][yy-1];
|
||||||
|
if (yy > 0 && xx < width-1)
|
||||||
|
normal = normal + faceNormals[xx][yy-1];
|
||||||
|
normal.Normalize();
|
||||||
|
|
||||||
|
float h = heightAt(xx, yy);
|
||||||
|
vertices.push_back(Vertex{ (float)(xx), h, (float)(yy),
|
||||||
|
normal.x, normal.y, normal.z,
|
||||||
|
(xx) / (float)height, (yy) / (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;
|
||||||
|
// Vertex z = (a * labda1) + (b * labda2) ;
|
||||||
|
|
||||||
|
return z.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int HeightMap::GetSize()
|
||||||
|
{
|
||||||
|
return height >= width ? height : width;
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
#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);
|
||||||
|
int GetSize();
|
||||||
|
void SetTexture(const std::string &file);
|
||||||
|
|
||||||
|
std::vector<Vertex> vertices;
|
||||||
|
};
|
||||||
|
|
||||||
+119
@@ -0,0 +1,119 @@
|
|||||||
|
#include "Interface.h"
|
||||||
|
#include <GL/freeglut.h>
|
||||||
|
#include "CrystalPoint.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "Player.h"
|
||||||
|
#include "Util.h"
|
||||||
|
|
||||||
|
Interface::Interface()
|
||||||
|
{
|
||||||
|
crystalWidth = 20;
|
||||||
|
crystalHeight = 50;
|
||||||
|
crystalOffset = 5;
|
||||||
|
maxCrystals = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Interface::Interface(int maxCrystal)
|
||||||
|
{
|
||||||
|
crystalWidth = 20;
|
||||||
|
crystalHeight = 50;
|
||||||
|
crystalOffset = 5;
|
||||||
|
maxCrystals = maxCrystal;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
Util::glutBitmapString("Level: " + std::to_string(player->level), 490, 900);
|
||||||
|
|
||||||
|
for (int i = 0; i < maxCrystals; i++)
|
||||||
|
{
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
|
||||||
|
if(i < player->crystals)
|
||||||
|
glColor4f(0, 1.0f, 1.0f, 1.0f);
|
||||||
|
else
|
||||||
|
glColor4f(0, 0.4f, 0.4f, 1.0f);
|
||||||
|
|
||||||
|
glVertex2f(975 - crystalWidth / 2 , crystalOffset*i + crystalHeight*i);
|
||||||
|
glVertex2f(975 - crystalWidth , crystalHeight / 2 + crystalOffset*i + crystalHeight*i);
|
||||||
|
|
||||||
|
if (i < player->crystals)
|
||||||
|
glColor4f(0, 0.7f, 0.7f, 1.0f);
|
||||||
|
else
|
||||||
|
glColor4f(0, 0.2f, 0.2f, 1.0f);
|
||||||
|
|
||||||
|
glVertex2f(975 - crystalWidth / 2 , crystalHeight + crystalOffset*i + crystalHeight*i);
|
||||||
|
glVertex2f(975 , crystalHeight / 2 + crystalOffset*i + crystalHeight*i);
|
||||||
|
glEnd();
|
||||||
|
}
|
||||||
|
|
||||||
|
glEnable(GL_LIGHTING);
|
||||||
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Interface::update(float deltaTime)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
+15
@@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
class Interface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Interface();
|
||||||
|
Interface(int);
|
||||||
|
~Interface();
|
||||||
|
|
||||||
|
void draw(void);
|
||||||
|
void update(float deltaTime);
|
||||||
|
|
||||||
|
int crystalWidth, crystalHeight, crystalOffset;
|
||||||
|
int maxCrystals;
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#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->position.x -= model->center.x;
|
||||||
|
this->position.z -= model->center.z;
|
||||||
|
this->rotation = rotation;
|
||||||
|
this->scale = scale;
|
||||||
|
this->canCollide = hasCollision;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LevelObject::~LevelObject()
|
||||||
|
{
|
||||||
|
if (model)
|
||||||
|
Model::unload(model);
|
||||||
|
}
|
||||||
@@ -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();
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
#include <GL/freeglut.h>
|
||||||
|
|
||||||
|
#include "CrystalPoint.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "Vector.h"
|
||||||
|
|
||||||
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
|
#include "stb_image.h"
|
||||||
|
|
||||||
|
#include "Cursor.h"
|
||||||
|
|
||||||
|
void configureOpenGL(void);
|
||||||
|
|
||||||
|
CrystalPoint* app;
|
||||||
|
|
||||||
|
bool justMoved = false;
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
app = new CrystalPoint();
|
||||||
|
glutInit(&argc, argv);
|
||||||
|
|
||||||
|
configureOpenGL();
|
||||||
|
|
||||||
|
app->init();
|
||||||
|
|
||||||
|
glutDisplayFunc([]() { app->draw(); } );
|
||||||
|
glutIdleFunc([]() { app->update(); } );
|
||||||
|
glutReshapeFunc([](int w, int h) { CrystalPoint::width = w; CrystalPoint::height = h; glViewport(0, 0, w, h); });
|
||||||
|
|
||||||
|
//Keyboard
|
||||||
|
glutKeyboardFunc([](unsigned char c, int, int) { app->keyboardState.keys[c] = true; });
|
||||||
|
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
|
||||||
|
glutPassiveMotionFunc(mousemotion);
|
||||||
|
glutMotionFunc(mousemotion);
|
||||||
|
|
||||||
|
auto mouseclick = [](int button, int state,
|
||||||
|
int x, int y)
|
||||||
|
{
|
||||||
|
if (button == GLUT_LEFT_BUTTON)
|
||||||
|
Cursor::getInstance()->state = state;
|
||||||
|
|
||||||
|
//std::cout << "Left button is down" << std::endl;
|
||||||
|
};
|
||||||
|
|
||||||
|
glutMouseFunc(mouseclick);
|
||||||
|
|
||||||
|
CrystalPoint::height = GLUT_WINDOW_HEIGHT;
|
||||||
|
CrystalPoint::width = GLUT_WINDOW_WIDTH;
|
||||||
|
|
||||||
|
glutMainLoop();
|
||||||
|
|
||||||
|
delete app;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void configureOpenGL()
|
||||||
|
{
|
||||||
|
//Init window and glut display mode
|
||||||
|
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
|
||||||
|
glutInitWindowSize(800, 600);
|
||||||
|
//glutInitWindowPosition(glutGet(GLUT_WINDOW_WIDTH) / 2 - 800/2, glutGet(GLUT_WINDOW_HEIGHT) / 2 - 600/2);
|
||||||
|
glutCreateWindow("Crystal Point");
|
||||||
|
//glutFullScreen();
|
||||||
|
|
||||||
|
|
||||||
|
//Depth testing
|
||||||
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
|
||||||
|
//Alpha blending
|
||||||
|
glEnable(GL_BLEND);
|
||||||
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
|
||||||
|
//Alpha testing
|
||||||
|
glEnable(GL_ALPHA_TEST);
|
||||||
|
glAlphaFunc(GL_GREATER, 0.01f);
|
||||||
|
|
||||||
|
//Lighting
|
||||||
|
GLfloat mat_specular[] = { 0.2, 0.2, 0.2, 0 };
|
||||||
|
//GLfloat mat_shininess[] = { 5.0 };
|
||||||
|
GLfloat light_position[] = { 0.0, 2.0, 1.0, 0 };
|
||||||
|
GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 0 };
|
||||||
|
GLfloat light_ambient[] = { 0.3, 0.3, 0.3, 0 };
|
||||||
|
glClearColor(0.7, 0.7, 1.0, 1.0);
|
||||||
|
|
||||||
|
//glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
|
||||||
|
//glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
|
||||||
|
//glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
|
||||||
|
//glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
|
||||||
|
|
||||||
|
glEnable(GL_LIGHTING);
|
||||||
|
glEnable(GL_LIGHT0);
|
||||||
|
//glEnable(GL_COLOR_MATERIAL);
|
||||||
|
|
||||||
|
glutSetCursor(GLUT_CURSOR_NONE);
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
#include <GL\freeglut.h>
|
||||||
|
#include "Menu.h"
|
||||||
|
#include "CrystalPoint.h"
|
||||||
|
|
||||||
|
Menu::Menu()
|
||||||
|
{
|
||||||
|
cursor = Cursor::getInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Menu::~Menu()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Menu::draw(void)
|
||||||
|
{
|
||||||
|
//Switch view to Ortho
|
||||||
|
glMatrixMode(GL_PROJECTION);
|
||||||
|
glLoadIdentity();
|
||||||
|
glOrtho(0, CrystalPoint::width, CrystalPoint::height, 0, -10, 10);
|
||||||
|
glMatrixMode(GL_MODELVIEW);
|
||||||
|
glLoadIdentity();
|
||||||
|
|
||||||
|
glDisable(GL_LIGHTING);
|
||||||
|
glDisable(GL_DEPTH_TEST);
|
||||||
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
|
glColor4f(60/255.0f, 60/255.0f, 60/255.0f, 0.8f);
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
glVertex2f(0,0);
|
||||||
|
glVertex2f(0, CrystalPoint::height);
|
||||||
|
glVertex2f(CrystalPoint::width, CrystalPoint::height);
|
||||||
|
glVertex2f(CrystalPoint::width, 0);
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
|
||||||
|
for (MenuElement* e : elements)
|
||||||
|
{
|
||||||
|
e->draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
cursor->draw();
|
||||||
|
|
||||||
|
glEnable(GL_LIGHTING);
|
||||||
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Menu::update()
|
||||||
|
{
|
||||||
|
for (MenuElement* e : elements)
|
||||||
|
{
|
||||||
|
e->update(cursor->mousePosition.x, cursor->mousePosition.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Menu::AddMenuElement(MenuElement * e)
|
||||||
|
{
|
||||||
|
elements.push_back(e);
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <vector>
|
||||||
|
#include "MenuElement.h"
|
||||||
|
#include "Cursor.h"
|
||||||
|
|
||||||
|
class Menu
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
std::vector<MenuElement*> elements;
|
||||||
|
Cursor* cursor;
|
||||||
|
public:
|
||||||
|
Menu();
|
||||||
|
~Menu();
|
||||||
|
|
||||||
|
void draw(void);
|
||||||
|
void update(void);
|
||||||
|
|
||||||
|
void AddMenuElement(MenuElement* e);
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
#include "MenuElement.h"
|
||||||
|
|
||||||
|
MenuElement::MenuElement(Vec2f position)
|
||||||
|
{
|
||||||
|
hover = false;
|
||||||
|
this->position = position;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
MenuElement::~MenuElement()
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Vector.h"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class MenuElement
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
bool hover;
|
||||||
|
Vec2f position;
|
||||||
|
public:
|
||||||
|
MenuElement(Vec2f position);
|
||||||
|
~MenuElement();
|
||||||
|
|
||||||
|
virtual void draw(void) {};
|
||||||
|
virtual void update(int x, int y) {};
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,382 @@
|
|||||||
|
#include "Model.h"
|
||||||
|
|
||||||
|
#include "stb_image.h"
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
#include <string>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
//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;
|
||||||
|
if (dirName.rfind("/") != std::string::npos)
|
||||||
|
dirName = dirName.substr(0, dirName.rfind("/"));
|
||||||
|
if (dirName.rfind("\\") != std::string::npos)
|
||||||
|
dirName = dirName.substr(0, dirName.rfind("\\"));
|
||||||
|
if (fileName == dirName)
|
||||||
|
dirName = "";
|
||||||
|
|
||||||
|
|
||||||
|
std::ifstream pFile(fileName.c_str());
|
||||||
|
|
||||||
|
if (!pFile.is_open())
|
||||||
|
{
|
||||||
|
std::cout << "Could not open file " << fileName << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ObjGroup* currentGroup = new ObjGroup();
|
||||||
|
currentGroup->materialIndex = -1;
|
||||||
|
|
||||||
|
|
||||||
|
while (!pFile.eof())
|
||||||
|
{
|
||||||
|
std::string line;
|
||||||
|
std::getline(pFile, line);
|
||||||
|
|
||||||
|
line = replace(line, "\t", " ");
|
||||||
|
while (line.find(" ") != std::string::npos)
|
||||||
|
line = replace(line, " ", " ");
|
||||||
|
if (line == "")
|
||||||
|
continue;
|
||||||
|
if (line[0] == ' ')
|
||||||
|
line = line.substr(1);
|
||||||
|
if (line == "")
|
||||||
|
continue;
|
||||||
|
if (line[line.length() - 1] == ' ')
|
||||||
|
line = line.substr(0, line.length() - 1);
|
||||||
|
if (line == "")
|
||||||
|
continue;
|
||||||
|
if (line[0] == '#')
|
||||||
|
continue;
|
||||||
|
|
||||||
|
std::vector<std::string> params = split(line, " ");
|
||||||
|
params[0] = toLower(params[0]);
|
||||||
|
|
||||||
|
if (params[0] == "v")
|
||||||
|
vertices.push_back(Vec3f((float)atof(params[1].c_str()), (float)atof(params[2].c_str()), (float)atof(params[3].c_str())));
|
||||||
|
else if (params[0] == "vn")
|
||||||
|
normals.push_back(Vec3f((float)atof(params[1].c_str()), (float)atof(params[2].c_str()), (float)atof(params[3].c_str())));
|
||||||
|
else if (params[0] == "vt")
|
||||||
|
texcoords.push_back(Vec2f((float)atof(params[1].c_str()), (float)atof(params[2].c_str())));
|
||||||
|
else if (params[0] == "f")
|
||||||
|
{
|
||||||
|
for (size_t ii = 4; ii <= params.size(); ii++)
|
||||||
|
{
|
||||||
|
Face face;
|
||||||
|
|
||||||
|
for (size_t i = ii - 3; i < ii; i++) //magische forlus om van quads triangles te maken ;)
|
||||||
|
{
|
||||||
|
VertexIndex vertex;
|
||||||
|
std::vector<std::string> indices = split(params[i == (ii - 3) ? 1 : i], "/");
|
||||||
|
if (indices.size() >= 1) //er is een positie
|
||||||
|
vertex.position = atoi(indices[0].c_str()) - 1;
|
||||||
|
if (indices.size() == 2) //alleen texture
|
||||||
|
vertex.texcoord = atoi(indices[1].c_str()) - 1;
|
||||||
|
if (indices.size() == 3) //v/t/n of v//n
|
||||||
|
{
|
||||||
|
if (indices[1] != "")
|
||||||
|
vertex.texcoord = atoi(indices[1].c_str()) - 1;
|
||||||
|
vertex.normal = atoi(indices[2].c_str()) - 1;
|
||||||
|
}
|
||||||
|
face.vertices.push_back(vertex);
|
||||||
|
}
|
||||||
|
currentGroup->faces.push_back(face);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (params[0] == "s")
|
||||||
|
{//smoothing
|
||||||
|
}
|
||||||
|
else if (params[0] == "mtllib")
|
||||||
|
{
|
||||||
|
loadMaterialFile(dirName + "/" + params[1], dirName);
|
||||||
|
}
|
||||||
|
else if (params[0] == "usemtl")
|
||||||
|
{
|
||||||
|
if (currentGroup->faces.size() != 0)
|
||||||
|
groups.push_back(currentGroup);
|
||||||
|
currentGroup = new ObjGroup();
|
||||||
|
currentGroup->materialIndex = -1;
|
||||||
|
|
||||||
|
for (size_t i = 0; i < materials.size(); i++)
|
||||||
|
{
|
||||||
|
MaterialInfo* info = materials[i];
|
||||||
|
if (info->name == params[1])
|
||||||
|
{
|
||||||
|
currentGroup->materialIndex = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (currentGroup->materialIndex == -1)
|
||||||
|
std::cout << "Could not find material name " << params[1] << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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 (ObjGroup *group : groups)
|
||||||
|
{
|
||||||
|
Optimise(group);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Model::Optimise(ObjGroup *t)
|
||||||
|
{
|
||||||
|
for (Face &face : t->faces)
|
||||||
|
{
|
||||||
|
for (auto &vertex : 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));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Model::draw()
|
||||||
|
{
|
||||||
|
glEnableClientState(GL_VERTEX_ARRAY);
|
||||||
|
glEnableClientState(GL_NORMAL_ARRAY);
|
||||||
|
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
for (auto &g : groups)
|
||||||
|
{
|
||||||
|
if (materials[g->materialIndex]->hasTexture)
|
||||||
|
{
|
||||||
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
materials[g->materialIndex]->texture->bind();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
|
||||||
|
float color[4] = { 1, 0, 0, 1 };
|
||||||
|
|
||||||
|
if (materials[g->materialIndex]->hasDiffuse)
|
||||||
|
{
|
||||||
|
memcpy(color, materials[g->materialIndex]->diffuseColor.v, 3 * sizeof(float));
|
||||||
|
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, color);
|
||||||
|
}
|
||||||
|
else if (materials[g->materialIndex]->hasAmbient)
|
||||||
|
{
|
||||||
|
memcpy(color, materials[g->materialIndex]->ambientColor.v, 3 * sizeof(float));
|
||||||
|
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, color);
|
||||||
|
}
|
||||||
|
else if (materials[g->materialIndex]->hasSpecular)
|
||||||
|
{
|
||||||
|
memcpy(color, materials[g->materialIndex]->specularColor.v, 3 * sizeof(float));
|
||||||
|
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
glDrawArrays(GL_TRIANGLES, 0, g->VertexArray.size());
|
||||||
|
}
|
||||||
|
glDisableClientState(GL_VERTEX_ARRAY);
|
||||||
|
glDisableClientState(GL_NORMAL_ARRAY);
|
||||||
|
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Model::loadMaterialFile(std::string fileName, std::string dirName)
|
||||||
|
{
|
||||||
|
std::ifstream pFile(fileName.c_str());
|
||||||
|
if (!pFile.is_open())
|
||||||
|
{
|
||||||
|
std::cout << "Could not open file " << fileName << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
MaterialInfo* currentMaterial = NULL;
|
||||||
|
|
||||||
|
while (!pFile.eof())
|
||||||
|
{
|
||||||
|
std::string line;
|
||||||
|
std::getline(pFile, line);
|
||||||
|
|
||||||
|
line = replace(line, "\t", " ");
|
||||||
|
while (line.find(" ") != std::string::npos)
|
||||||
|
line = replace(line, " ", " ");
|
||||||
|
if (line == "")
|
||||||
|
continue;
|
||||||
|
if (line[0] == ' ')
|
||||||
|
line = line.substr(1);
|
||||||
|
if (line == "")
|
||||||
|
continue;
|
||||||
|
if (line[line.length() - 1] == ' ')
|
||||||
|
line = line.substr(0, line.length() - 1);
|
||||||
|
if (line == "")
|
||||||
|
continue;
|
||||||
|
if (line[0] == '#')
|
||||||
|
continue;
|
||||||
|
|
||||||
|
std::vector<std::string> params = split(line, " ");
|
||||||
|
params[0] = toLower(params[0]);
|
||||||
|
|
||||||
|
if (params[0] == "newmtl")
|
||||||
|
{
|
||||||
|
if (currentMaterial != NULL)
|
||||||
|
{
|
||||||
|
materials.push_back(currentMaterial);
|
||||||
|
}
|
||||||
|
currentMaterial = new MaterialInfo();
|
||||||
|
currentMaterial->name = params[1];
|
||||||
|
}
|
||||||
|
else if (params[0] == "map_kd")
|
||||||
|
{
|
||||||
|
currentMaterial->hasTexture = true;
|
||||||
|
currentMaterial->texture = new Texture(dirName + "/" + params[1]);
|
||||||
|
}
|
||||||
|
else if (params[0] == "kd")
|
||||||
|
{
|
||||||
|
currentMaterial->hasDiffuse = true;
|
||||||
|
currentMaterial->diffuseColor = Vec3f(atof(params[1].c_str()), atof(params[2].c_str()), atof(params[3].c_str()));
|
||||||
|
}
|
||||||
|
else if (params[0] == "ka")
|
||||||
|
{
|
||||||
|
currentMaterial->hasAmbient = true;
|
||||||
|
currentMaterial->ambientColor = Vec3f(atof(params[1].c_str()), atof(params[2].c_str()), atof(params[3].c_str()));
|
||||||
|
}
|
||||||
|
else if (params[0] == "ks")
|
||||||
|
{
|
||||||
|
currentMaterial->hasSpecular = true;
|
||||||
|
currentMaterial->specularColor = Vec3f(atof(params[1].c_str()), atof(params[2].c_str()), atof(params[3].c_str()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
std::cout << "Didn't parse " << params[0] << " in material file" << std::endl;
|
||||||
|
}
|
||||||
|
if (currentMaterial != NULL)
|
||||||
|
materials.push_back(currentMaterial);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Model::MaterialInfo::MaterialInfo()
|
||||||
|
{
|
||||||
|
hasTexture = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
Model::Texture::Texture(const std::string & fileName)
|
||||||
|
{
|
||||||
|
int width, height, bpp;
|
||||||
|
stbi_set_flip_vertically_on_load(true);
|
||||||
|
unsigned char* imgData = stbi_load(fileName.c_str(), &width, &height, &bpp, 4);
|
||||||
|
|
||||||
|
glGenTextures(1, &index);
|
||||||
|
glBindTexture(GL_TEXTURE_2D, index);
|
||||||
|
|
||||||
|
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);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||||
|
|
||||||
|
stbi_image_free(imgData);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Model::Texture::bind()
|
||||||
|
{
|
||||||
|
glBindTexture(GL_TEXTURE_2D, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string replace(std::string str, std::string toReplace, std::string replacement)
|
||||||
|
{
|
||||||
|
size_t index = 0;
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
index = str.find(toReplace, index);
|
||||||
|
if (index == std::string::npos)
|
||||||
|
break;
|
||||||
|
str.replace(index, toReplace.length(), replacement);
|
||||||
|
++index;
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<std::string> split(std::string str, std::string sep)
|
||||||
|
{
|
||||||
|
std::vector<std::string> ret;
|
||||||
|
size_t index;
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
index = str.find(sep);
|
||||||
|
if (index == std::string::npos)
|
||||||
|
break;
|
||||||
|
ret.push_back(str.substr(0, index));
|
||||||
|
str = str.substr(index + 1);
|
||||||
|
}
|
||||||
|
ret.push_back(str);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline std::string toLower(std::string data)
|
||||||
|
{
|
||||||
|
std::transform(data.begin(), data.end(), data.begin(), ::tolower);
|
||||||
|
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));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Model::~Model(void)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,87 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <GL/freeglut.h>
|
||||||
|
#include <list>
|
||||||
|
#include <vector>
|
||||||
|
#include <map>
|
||||||
|
#include "Vector.h"
|
||||||
|
#include "Vertex.h"
|
||||||
|
|
||||||
|
class Model
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
|
||||||
|
class VertexIndex
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
int position;
|
||||||
|
int normal;
|
||||||
|
int texcoord;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Face
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
std::list<VertexIndex> vertices;
|
||||||
|
};
|
||||||
|
|
||||||
|
class Texture
|
||||||
|
{
|
||||||
|
GLuint index;
|
||||||
|
public:
|
||||||
|
Texture(const std::string &fileName);
|
||||||
|
void bind();
|
||||||
|
};
|
||||||
|
|
||||||
|
class MaterialInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MaterialInfo();
|
||||||
|
std::string name;
|
||||||
|
Texture* texture;
|
||||||
|
bool hasTexture;
|
||||||
|
|
||||||
|
bool hasDiffuse;
|
||||||
|
Vec3f diffuseColor;
|
||||||
|
bool hasAmbient;
|
||||||
|
Vec3f ambientColor;
|
||||||
|
bool hasSpecular;
|
||||||
|
Vec3f specularColor;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class ObjGroup
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
std::string name;
|
||||||
|
int materialIndex;
|
||||||
|
std::list<Face> faces;
|
||||||
|
std::vector<Vertex> VertexArray;
|
||||||
|
};
|
||||||
|
|
||||||
|
std::vector<Vec3f> vertices;
|
||||||
|
std::vector<Vec3f> normals;
|
||||||
|
std::vector<Vec2f> texcoords;
|
||||||
|
std::vector<ObjGroup*> groups;
|
||||||
|
std::vector<MaterialInfo*> materials;
|
||||||
|
|
||||||
|
void loadMaterialFile(std::string fileName, std::string dirName);
|
||||||
|
|
||||||
|
Model(std::string filename);
|
||||||
|
~Model(void);
|
||||||
|
|
||||||
|
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 Optimise(ObjGroup *t);
|
||||||
|
|
||||||
|
Vec3f minVertex;
|
||||||
|
Vec3f maxVertex;
|
||||||
|
|
||||||
|
Vec3f center;
|
||||||
|
float radius;
|
||||||
|
};
|
||||||
+56
@@ -0,0 +1,56 @@
|
|||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include <cmath>
|
||||||
|
#include "Player.h"
|
||||||
|
#include <GL/freeglut.h>
|
||||||
|
|
||||||
|
Player* Player::instance = NULL;
|
||||||
|
|
||||||
|
Player::Player()
|
||||||
|
{
|
||||||
|
speed = 10;
|
||||||
|
health = 50;
|
||||||
|
xp = 75;
|
||||||
|
level = 10;
|
||||||
|
crystals = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Player* Player::getInstance()
|
||||||
|
{
|
||||||
|
if (instance == nullptr)
|
||||||
|
instance = new Player();
|
||||||
|
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Player::init()
|
||||||
|
{
|
||||||
|
instance = new Player();
|
||||||
|
}
|
||||||
|
|
||||||
|
Player::~Player()
|
||||||
|
{
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
if (height)
|
||||||
|
position.y += angle*fac;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
position.x -= (float)cos((rotation.y + angle) / 180 * M_PI) * fac;
|
||||||
|
position.z -= (float)sin((rotation.y + angle) / 180 * M_PI) * fac;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Vector.h"
|
||||||
|
|
||||||
|
class Model;
|
||||||
|
|
||||||
|
class Player
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
static Player* instance;
|
||||||
|
public:
|
||||||
|
Player();
|
||||||
|
~Player();
|
||||||
|
|
||||||
|
void setCamera();
|
||||||
|
void setPosition(float angle, float fac, bool height);
|
||||||
|
|
||||||
|
static Player* getInstance(void);
|
||||||
|
static void init(void);
|
||||||
|
|
||||||
|
Vec3f position;
|
||||||
|
Vec2f rotation;
|
||||||
|
|
||||||
|
Model* leftWeapon;
|
||||||
|
Model* rightWeapon;
|
||||||
|
|
||||||
|
float health;
|
||||||
|
float xp;
|
||||||
|
int level;
|
||||||
|
int crystals;
|
||||||
|
|
||||||
|
float speed;
|
||||||
|
};
|
||||||
+62
@@ -0,0 +1,62 @@
|
|||||||
|
#include "Portal.h"
|
||||||
|
#include "Model.h"
|
||||||
|
#include <iostream>
|
||||||
|
#include "Player.h"
|
||||||
|
#include "WorldHandler.h"
|
||||||
|
|
||||||
|
Portal::Portal(const std::string &fileName,
|
||||||
|
const Vec3f &position,
|
||||||
|
Vec3f &rotation,
|
||||||
|
const float &scale)
|
||||||
|
{
|
||||||
|
model = Model::load(fileName);
|
||||||
|
this->position = position;
|
||||||
|
this->rotation = rotation;
|
||||||
|
this->scale = scale;
|
||||||
|
this->canCollide = true;
|
||||||
|
|
||||||
|
started = false;
|
||||||
|
delay = 0;
|
||||||
|
|
||||||
|
sound_id = CrystalPoint::GetSoundSystem().LoadSound("WAVE/portal.wav", false);
|
||||||
|
music = CrystalPoint::GetSoundSystem().GetSound(sound_id);
|
||||||
|
music->SetPos(position, Vec3f());
|
||||||
|
|
||||||
|
mayEnter = false;
|
||||||
|
maxCrystals = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Portal::~Portal()
|
||||||
|
{
|
||||||
|
// Model::unload(model);
|
||||||
|
// delete music;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Portal::collide()
|
||||||
|
{
|
||||||
|
if (maxCrystals == (Player::getInstance()->crystals) && !mayEnter)
|
||||||
|
{
|
||||||
|
canCollide = false;
|
||||||
|
mayEnter = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Portal::enter(float deltaTime)
|
||||||
|
{
|
||||||
|
if (delay > 3 && started)
|
||||||
|
{
|
||||||
|
delete music;
|
||||||
|
delay = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (delay == 0 && !started)
|
||||||
|
{
|
||||||
|
music->Play();
|
||||||
|
started = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
delay += deltaTime;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "Entity.h"
|
||||||
|
#include <string>
|
||||||
|
#include "CrystalPoint.h"
|
||||||
|
|
||||||
|
class Portal :
|
||||||
|
public Entity
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Portal(const std::string &fileName,
|
||||||
|
const Vec3f &position,
|
||||||
|
Vec3f &rotation,
|
||||||
|
const float &scale);
|
||||||
|
~Portal();
|
||||||
|
|
||||||
|
bool enter(float deltaTime);
|
||||||
|
|
||||||
|
void collide();
|
||||||
|
int maxCrystals;
|
||||||
|
bool mayEnter;
|
||||||
|
private:
|
||||||
|
int sound_id;
|
||||||
|
Sound* music;
|
||||||
|
bool started;
|
||||||
|
float delay;
|
||||||
|
};
|
||||||
|
|
||||||
+40
@@ -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.
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
+166
@@ -0,0 +1,166 @@
|
|||||||
|
#include "cmath"
|
||||||
|
#include <GL/freeglut.h>
|
||||||
|
|
||||||
|
#include "Util.h"
|
||||||
|
#include "stb_image.h"
|
||||||
|
#include "Skybox.h"
|
||||||
|
#include <string>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
enum{SKY_LEFT=0,SKY_BACK,SKY_RIGHT,SKY_FRONT,SKY_TOP,SKY_BOTTOM};
|
||||||
|
GLuint skybox[6];
|
||||||
|
|
||||||
|
Skybox::Skybox(const float &size, const std::string &folder)
|
||||||
|
{
|
||||||
|
this->size = size;
|
||||||
|
this->folder = folder;
|
||||||
|
|
||||||
|
brightness = 80;
|
||||||
|
targetBrightness = 80;
|
||||||
|
}
|
||||||
|
|
||||||
|
Skybox::~Skybox()
|
||||||
|
{
|
||||||
|
glDeleteTextures(6, &skybox[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Skybox::init()
|
||||||
|
{
|
||||||
|
skybox[SKY_LEFT] = Util::loadTexture(folder + "left.png");
|
||||||
|
skybox[SKY_BACK] = Util::loadTexture(folder + "back.png");
|
||||||
|
skybox[SKY_RIGHT] = Util::loadTexture(folder + "right.png");
|
||||||
|
skybox[SKY_FRONT] = Util::loadTexture(folder + "front.png");
|
||||||
|
skybox[SKY_TOP] = Util::loadTexture(folder + "top.png");
|
||||||
|
skybox[SKY_BOTTOM] = Util::loadTexture(folder + "bottom.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
void Skybox::draw()
|
||||||
|
{
|
||||||
|
glColor4f(brightness/255, brightness/255, brightness/255, 1);
|
||||||
|
|
||||||
|
bool b1 = glIsEnabled(GL_TEXTURE_2D);
|
||||||
|
glDisable(GL_LIGHTING);
|
||||||
|
glDisable(GL_DEPTH_TEST);
|
||||||
|
glEnable(GL_TEXTURE_2D);
|
||||||
|
glDisable(GL_COLOR_MATERIAL);
|
||||||
|
|
||||||
|
glBindTexture(GL_TEXTURE_2D, skybox[SKY_BACK]);
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
glTexCoord2f(1,1);
|
||||||
|
glVertex3f(size / 2, size / 2, size / 2);
|
||||||
|
glTexCoord2f(0,1);
|
||||||
|
glVertex3f(-size / 2, size / 2, size / 2);
|
||||||
|
glTexCoord2f(0,0);
|
||||||
|
glVertex3f(-size / 2, -size / 2, size / 2);
|
||||||
|
glTexCoord2f(1,0);
|
||||||
|
glVertex3f(size / 2, -size / 2, size / 2);
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
glBindTexture(GL_TEXTURE_2D, skybox[SKY_LEFT]);
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
//left face
|
||||||
|
glTexCoord2f(1,1);
|
||||||
|
glVertex3f(-size / 2, size / 2, size / 2);
|
||||||
|
glTexCoord2f(0,1);
|
||||||
|
glVertex3f(-size / 2, size / 2, -size / 2);
|
||||||
|
glTexCoord2f(0,0);
|
||||||
|
glVertex3f(-size / 2, -size / 2, -size / 2);
|
||||||
|
glTexCoord2f(1,0);
|
||||||
|
glVertex3f(-size / 2, -size / 2, size / 2);
|
||||||
|
glEnd();
|
||||||
|
glBindTexture(GL_TEXTURE_2D, skybox[SKY_FRONT]);
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
//front face
|
||||||
|
glTexCoord2f(0, 1);
|
||||||
|
glVertex3f(size / 2, size / 2, -size / 2);
|
||||||
|
glTexCoord2f(1, 1);
|
||||||
|
glVertex3f(-size / 2, size / 2, -size / 2);
|
||||||
|
glTexCoord2f(1, 0);
|
||||||
|
glVertex3f(-size / 2, -size / 2, -size / 2);
|
||||||
|
glTexCoord2f(0, 0);
|
||||||
|
glVertex3f(size / 2, -size / 2, -size / 2);
|
||||||
|
glEnd();
|
||||||
|
glBindTexture(GL_TEXTURE_2D, skybox[SKY_RIGHT]);
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
//right face
|
||||||
|
glTexCoord2f(1, 1);
|
||||||
|
glVertex3f(size / 2, size / 2, -size / 2);
|
||||||
|
glTexCoord2f(0,1);
|
||||||
|
glVertex3f(size / 2, size / 2, size / 2);
|
||||||
|
glTexCoord2f(0,0);
|
||||||
|
glVertex3f(size / 2, -size / 2, size / 2);
|
||||||
|
glTexCoord2f(1, 0);
|
||||||
|
glVertex3f(size / 2, -size / 2, -size / 2);
|
||||||
|
glEnd();
|
||||||
|
glBindTexture(GL_TEXTURE_2D, skybox[SKY_TOP]);
|
||||||
|
glBegin(GL_QUADS); //top face
|
||||||
|
glTexCoord2f(0,0);
|
||||||
|
glVertex3f(size / 2, size / 2, size / 2);
|
||||||
|
glTexCoord2f(0,1);
|
||||||
|
glVertex3f(-size / 2, size / 2, size / 2);
|
||||||
|
glTexCoord2f(1,1);
|
||||||
|
glVertex3f(-size / 2, size / 2, -size / 2);
|
||||||
|
glTexCoord2f(1,0);
|
||||||
|
glVertex3f(size / 2, size / 2, -size / 2);
|
||||||
|
glEnd();
|
||||||
|
glBindTexture(GL_TEXTURE_2D, skybox[SKY_BOTTOM]);
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
//bottom face
|
||||||
|
glTexCoord2f(0,1);
|
||||||
|
glVertex3f(size / 2, -size / 2, size / 2);
|
||||||
|
glTexCoord2f(0,0);
|
||||||
|
glVertex3f(-size / 2, -size / 2, size / 2);
|
||||||
|
glTexCoord2f(1,0);
|
||||||
|
glVertex3f(-size / 2, -size / 2, -size / 2);
|
||||||
|
glTexCoord2f(1,1);
|
||||||
|
glVertex3f(size / 2, -size / 2, -size / 2);
|
||||||
|
glEnd();
|
||||||
|
glEnable(GL_LIGHTING); //turn everything back, which we turned on, and turn everything off, which we have turned on.
|
||||||
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
if (!b1)
|
||||||
|
glDisable(GL_TEXTURE_2D);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Skybox::update(float deltaTime, int curr, int max)
|
||||||
|
{
|
||||||
|
targetBrightness = 80 + ((255 - 80) / max) * curr;
|
||||||
|
|
||||||
|
if (targetBrightness > brightness + 2)
|
||||||
|
{
|
||||||
|
brightness += 20 * deltaTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (targetBrightness < brightness - 2)
|
||||||
|
{
|
||||||
|
brightness -= 20 * deltaTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GLuint Skybox::loadTexture(const std::string & fileName) //load the filename named texture
|
||||||
|
{
|
||||||
|
int width, height, bpp;
|
||||||
|
|
||||||
|
stbi_set_flip_vertically_on_load(true);
|
||||||
|
unsigned char* imgData = stbi_load(fileName.c_str(), &width, &height, &bpp, 4);
|
||||||
|
GLuint num;
|
||||||
|
glGenTextures(1, &num);
|
||||||
|
glBindTexture(GL_TEXTURE_2D, num);
|
||||||
|
|
||||||
|
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);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||||
|
|
||||||
|
stbi_image_free(imgData);
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
class Skybox
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
float size;
|
||||||
|
std::string folder;
|
||||||
|
float brightness;
|
||||||
|
float targetBrightness;
|
||||||
|
public:
|
||||||
|
Skybox(const float &size, const std::string &folder);
|
||||||
|
~Skybox();
|
||||||
|
|
||||||
|
void init();
|
||||||
|
void draw();
|
||||||
|
|
||||||
|
void update(float deltaTime, int, int);
|
||||||
|
GLuint loadTexture(const std::string &fileName);
|
||||||
|
|
||||||
|
};
|
||||||
@@ -0,0 +1,167 @@
|
|||||||
|
#include "Sound.h"
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <windows.h>
|
||||||
|
#include <al.h>
|
||||||
|
#else
|
||||||
|
#include <AL/al.h>
|
||||||
|
typedef unsigned long DWORD;
|
||||||
|
typedef unsigned short WORD;
|
||||||
|
typedef unsigned int UNINT32;
|
||||||
|
typedef unsigned char BYTE;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Sound::Sound(const char* inWavPath, bool inLooping):
|
||||||
|
buffer_id(0),
|
||||||
|
source_id(0),
|
||||||
|
is_looping(inLooping)
|
||||||
|
{
|
||||||
|
const char* path = inWavPath;
|
||||||
|
|
||||||
|
FILE *fp = fopen(path, "rb"); // Open the WAVE file
|
||||||
|
if (!fp)
|
||||||
|
return; // Could not open file
|
||||||
|
|
||||||
|
// Check that the WAVE file is OK
|
||||||
|
char type[4];
|
||||||
|
fread(type, sizeof(char), 4, fp); // Reads the first bytes in the file
|
||||||
|
if (type[0] != 'R' || type[1] != 'I' || type[2] != 'F' || type[3] != 'F') // Should be "RIFF"
|
||||||
|
return; // Not RIFF
|
||||||
|
|
||||||
|
DWORD size;
|
||||||
|
fread(&size, sizeof(DWORD), 1, fp); // Continue to read the file
|
||||||
|
fread(type, sizeof(char), 4, fp); // Continue to read the file
|
||||||
|
if (type[0] != 'W' || type[1] != 'A' || type[2] != 'V' || type[3] != 'E') // This part should be "WAVE"
|
||||||
|
return; // Not WAVE
|
||||||
|
|
||||||
|
fread(type, sizeof(char), 4, fp); // Continue to read the file
|
||||||
|
if (type[0] != 'f' || type[1] != 'm' || type[2] != 't' || type[3] != ' ') // This part should be "fmt "
|
||||||
|
return; // Not fmt
|
||||||
|
|
||||||
|
// Now we know that the file is a acceptable WAVE file
|
||||||
|
// Info about the WAVE data is now read and stored
|
||||||
|
DWORD chunkSize;
|
||||||
|
fread(&chunkSize, sizeof(DWORD), 1, fp);
|
||||||
|
short formatType;
|
||||||
|
fread(&formatType, sizeof(short), 1, fp);
|
||||||
|
short channels;
|
||||||
|
fread(&channels, sizeof(short), 1, fp);
|
||||||
|
DWORD sampleRate;
|
||||||
|
fread(&sampleRate, sizeof(DWORD), 1, fp);
|
||||||
|
DWORD avgBytesPerSec;
|
||||||
|
fread(&avgBytesPerSec, sizeof(DWORD), 1, fp);
|
||||||
|
short bytesPerSample;
|
||||||
|
fread(&bytesPerSample, sizeof(short), 1, fp);
|
||||||
|
short bitsPerSample;
|
||||||
|
fread(&bitsPerSample, sizeof(short), 1, fp);
|
||||||
|
ALenum format = 0; // The audio format (bits per sample, number of channels)
|
||||||
|
if (bitsPerSample == 8)
|
||||||
|
{
|
||||||
|
if (channels == 1)
|
||||||
|
format = AL_FORMAT_MONO8;
|
||||||
|
else if (channels == 2)
|
||||||
|
format = AL_FORMAT_STEREO8;
|
||||||
|
}
|
||||||
|
else if (bitsPerSample == 16)
|
||||||
|
{
|
||||||
|
if (channels == 1)
|
||||||
|
format = AL_FORMAT_MONO16;
|
||||||
|
else if (channels == 2)
|
||||||
|
format = AL_FORMAT_STEREO16;
|
||||||
|
}
|
||||||
|
if (!format)
|
||||||
|
return; // Not valid format
|
||||||
|
|
||||||
|
fread(type, sizeof(char), 4, fp);
|
||||||
|
if (type[0] != 'd' || type[1] != 'a' || type[2] != 't' || type[3] != 'a') // This part should be "data"
|
||||||
|
return; // not data
|
||||||
|
|
||||||
|
DWORD dataSize;
|
||||||
|
fread(&dataSize, sizeof(DWORD), 1, fp); // The size of the sound data is read
|
||||||
|
|
||||||
|
// Display the info about the WAVE file
|
||||||
|
std::cout << "Chunk Size: " << chunkSize << "\n";
|
||||||
|
std::cout << "Format Type: " << formatType << "\n";
|
||||||
|
std::cout << "Channels: " << channels << "\n";
|
||||||
|
std::cout << "Sample Rate: " << sampleRate << "\n";
|
||||||
|
std::cout << "Average Bytes Per Second: " << avgBytesPerSec << "\n";
|
||||||
|
std::cout << "Bytes Per Sample: " << bytesPerSample << "\n";
|
||||||
|
std::cout << "Bits Per Sample: " << bitsPerSample << "\n";
|
||||||
|
std::cout << "Data Size: " << dataSize << "\n";
|
||||||
|
|
||||||
|
unsigned char* buf = new unsigned char[dataSize]; // Allocate memory for the sound data
|
||||||
|
std::cout << fread(buf, sizeof(BYTE), dataSize, fp) << " bytes loaded\n"; // Read the sound data and display the
|
||||||
|
fclose(fp);
|
||||||
|
|
||||||
|
alGenBuffers(1, &buffer_id); // Generate one OpenAL Buffer and link to "buffer"
|
||||||
|
alGenSources(1, &source_id); // Generate one OpenAL Source and link to "source"
|
||||||
|
if (alGetError() != AL_NO_ERROR)
|
||||||
|
return; // Error during buffer/source generation
|
||||||
|
|
||||||
|
alBufferData(buffer_id, format, buf, dataSize, sampleRate); // Store the sound data in the OpenAL Buffer
|
||||||
|
if (alGetError() != AL_NO_ERROR)
|
||||||
|
return; // Error during buffer loading
|
||||||
|
|
||||||
|
delete[] buf; // Delete the sound data buffer
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Sound::~Sound()
|
||||||
|
{
|
||||||
|
alSourceStop(source_id);
|
||||||
|
alDeleteSources(1, &source_id); // Delete the OpenAL Source
|
||||||
|
alDeleteBuffers(1, &buffer_id); // Delete the OpenAL Buffer
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Sound::SetPos(const Vec3f& inPos, const Vec3f& inVel)
|
||||||
|
{
|
||||||
|
alSourcei(source_id, AL_BUFFER, buffer_id); // Link the buffer to the source
|
||||||
|
alSourcef(source_id, AL_PITCH, 1.0f); // Set the pitch of the source
|
||||||
|
alSourcef(source_id, AL_GAIN, 1.0f); // Set the gain of the source
|
||||||
|
alSourcefv(source_id, AL_POSITION, inPos.v); // Set the position of the source
|
||||||
|
alSourcefv(source_id, AL_VELOCITY, inVel.v); // Set the velocity of the source
|
||||||
|
alSourcei(source_id, AL_LOOPING, is_looping ? AL_TRUE : AL_FALSE); // Set if source is looping sound
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Sound::Play()
|
||||||
|
{
|
||||||
|
alSourcePlay(source_id);
|
||||||
|
int e = alGetError(); // != AL_NO_ERROR) return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Sound::Pause()
|
||||||
|
{
|
||||||
|
alSourcePause(source_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Sound::Stop()
|
||||||
|
{
|
||||||
|
alSourceStop(source_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Sound::IsPlaying()
|
||||||
|
{
|
||||||
|
ALenum state;
|
||||||
|
|
||||||
|
alGetSourcei(source_id, AL_SOURCE_STATE, &state);
|
||||||
|
|
||||||
|
return (state == AL_PLAYING);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Sound::IsStopped()
|
||||||
|
{
|
||||||
|
ALenum state;
|
||||||
|
|
||||||
|
alGetSourcei(source_id, AL_SOURCE_STATE, &state);
|
||||||
|
|
||||||
|
std::cout << "MUSIC STATE: " << state << std::endl;
|
||||||
|
|
||||||
|
return (state == AL_STOPPED);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Vector.h"
|
||||||
|
|
||||||
|
class Sound
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Sound(const char* inWavPath, bool inLooping);
|
||||||
|
~Sound();
|
||||||
|
|
||||||
|
void SetPos(const Vec3f& inPos, const Vec3f& inVel);
|
||||||
|
|
||||||
|
void Play();
|
||||||
|
void Pause();
|
||||||
|
void Stop();
|
||||||
|
bool IsPlaying();
|
||||||
|
bool IsStopped();
|
||||||
|
|
||||||
|
private:
|
||||||
|
unsigned int buffer_id;
|
||||||
|
unsigned int source_id;
|
||||||
|
|
||||||
|
bool is_looping;
|
||||||
|
};
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
#include "SoundSystem.h"
|
||||||
|
|
||||||
|
SoundSystem::SoundSystem():
|
||||||
|
device(nullptr),
|
||||||
|
context(nullptr)
|
||||||
|
{
|
||||||
|
device = alcOpenDevice(nullptr);
|
||||||
|
if (!device)
|
||||||
|
return;
|
||||||
|
context = alcCreateContext(device, nullptr);
|
||||||
|
if (!context)
|
||||||
|
return;
|
||||||
|
alcMakeContextCurrent(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SoundSystem::~SoundSystem()
|
||||||
|
{
|
||||||
|
for (auto sound : sounds)
|
||||||
|
delete sound;
|
||||||
|
alcMakeContextCurrent(nullptr);
|
||||||
|
alcDestroyContext(context);
|
||||||
|
alcCloseDevice(device);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SoundSystem::SetListener(const Vec3f& inPos, const Vec3f& inVel, const Vec3f& inOri)
|
||||||
|
{
|
||||||
|
ALfloat orientation[] = { 0.0, 0.0, -1.0, 0.0, 1.0, 0.0 };
|
||||||
|
|
||||||
|
alListenerfv(AL_POSITION, inPos.v);
|
||||||
|
alListenerfv(AL_VELOCITY, inVel.v);
|
||||||
|
alListenerfv(AL_ORIENTATION, orientation);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unsigned int SoundSystem::LoadSound(const char* inWavPath, bool inLooping)
|
||||||
|
{
|
||||||
|
Sound* sound = new Sound(inWavPath, inLooping);
|
||||||
|
sounds.push_back(sound);
|
||||||
|
return sounds.size() - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Sound* SoundSystem::GetSound(unsigned int inID)
|
||||||
|
{
|
||||||
|
if (inID > sounds.size())
|
||||||
|
return nullptr;
|
||||||
|
return sounds[inID];
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <al.h>
|
||||||
|
#include <alc.h>
|
||||||
|
#else
|
||||||
|
#include <AL/al.h>
|
||||||
|
#include <AL/alc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "Vector.h"
|
||||||
|
#include "Sound.h"
|
||||||
|
|
||||||
|
|
||||||
|
class SoundSystem
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SoundSystem();
|
||||||
|
~SoundSystem();
|
||||||
|
|
||||||
|
void SetListener(const Vec3f& inPos, const Vec3f& inVel, const Vec3f& inOri);
|
||||||
|
|
||||||
|
unsigned int LoadSound(const char* inWavPath, bool inLooping);
|
||||||
|
Sound* GetSound(unsigned int inID);
|
||||||
|
|
||||||
|
private:
|
||||||
|
ALCdevice* device;
|
||||||
|
ALCcontext* context;
|
||||||
|
std::vector<Sound*> sounds;
|
||||||
|
};
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
#include "Text.h"
|
||||||
|
|
||||||
|
|
||||||
|
Text::Text(const std::string &text, Vec2f position) : MenuElement(position)
|
||||||
|
{
|
||||||
|
this->text = text;
|
||||||
|
color = Vec3f(50, 150, 150);
|
||||||
|
textHeight = 14;
|
||||||
|
textWidth = Util::glutTextWidth(text);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Text::~Text()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void Text::draw()
|
||||||
|
{
|
||||||
|
glColor4f(color.x/255.0f, color.y/255.0f, color.z/255.0f, 1.0f);
|
||||||
|
Util::glutBitmapString(text, position.x-1, position.y+textHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Text::update(int x, int y)
|
||||||
|
{
|
||||||
|
//Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
void Text::setColor(Vec3f color)
|
||||||
|
{
|
||||||
|
this->color = color;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "MenuElement.h"
|
||||||
|
#include "Vector.h"
|
||||||
|
#include "Util.h"
|
||||||
|
|
||||||
|
class Text : public MenuElement
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
std::string text;
|
||||||
|
Vec3f color;
|
||||||
|
protected:
|
||||||
|
int textWidth;
|
||||||
|
int textHeight;
|
||||||
|
public:
|
||||||
|
Text(const std::string &text, Vec2f position);
|
||||||
|
~Text();
|
||||||
|
|
||||||
|
virtual void draw();
|
||||||
|
virtual void update(int x, int y);
|
||||||
|
|
||||||
|
void setColor(Vec3f color);
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
#include "Util.h"
|
||||||
|
#include "stb_image.h"
|
||||||
|
|
||||||
|
Util::Util()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Util::~Util()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
GLuint Util::loadTexture(const std::string &filename)
|
||||||
|
{
|
||||||
|
int width, height, bpp;
|
||||||
|
|
||||||
|
stbi_set_flip_vertically_on_load(true);
|
||||||
|
unsigned char* imgData = stbi_load(filename.c_str(), &width, &height, &bpp, 4);
|
||||||
|
GLuint num;
|
||||||
|
glGenTextures(1, &num);
|
||||||
|
glBindTexture(GL_TEXTURE_2D, num);
|
||||||
|
|
||||||
|
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);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||||
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||||
|
|
||||||
|
stbi_image_free(imgData);
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Util::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]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int Util::glutTextWidth(const std::string str)
|
||||||
|
{
|
||||||
|
int total = 0;
|
||||||
|
for (int i = 0; i < str.size(); i++)
|
||||||
|
{
|
||||||
|
total += glutBitmapWidth(GLUT_BITMAP_HELVETICA_18, str[i]);
|
||||||
|
}
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
|
//int Util::glutTextHeight()
|
||||||
|
//{
|
||||||
|
// return glutBitmapHeight(GLUT_BITMAP_HELVETICA_18);
|
||||||
|
//}
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <string>
|
||||||
|
#include <GL\freeglut.h>
|
||||||
|
|
||||||
|
class Util
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
Util();
|
||||||
|
~Util();
|
||||||
|
public:
|
||||||
|
static GLuint loadTexture(const std::string &filename);
|
||||||
|
static void glutBitmapString(std::string str, int x, int y);
|
||||||
|
static int glutTextWidth(const std::string str);
|
||||||
|
//static int glutTextHeight();
|
||||||
|
};
|
||||||
|
|
||||||
+129
@@ -0,0 +1,129 @@
|
|||||||
|
#define _USE_MATH_DEFINES
|
||||||
|
#include <cmath>
|
||||||
|
#include "Vector.h"
|
||||||
|
|
||||||
|
Vec3f::Vec3f(float x, float y, float z)
|
||||||
|
{
|
||||||
|
this->x = x;
|
||||||
|
this->y = y;
|
||||||
|
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()
|
||||||
|
{
|
||||||
|
this->x = 0;
|
||||||
|
this->y = 0;
|
||||||
|
this->z = 0;
|
||||||
|
}
|
||||||
|
Vec3f::Vec3f(const Vec3f &other)
|
||||||
|
{
|
||||||
|
this->x = other.x;
|
||||||
|
this->y = other.y;
|
||||||
|
this->z = other.z;
|
||||||
|
}
|
||||||
|
|
||||||
|
float& Vec3f::operator [](int 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)
|
||||||
|
{
|
||||||
|
this->x = x;
|
||||||
|
this->y = y;
|
||||||
|
}
|
||||||
|
Vec2f::Vec2f()
|
||||||
|
{
|
||||||
|
this->x = 0;
|
||||||
|
this->y = 0;
|
||||||
|
}
|
||||||
|
Vec2f::Vec2f(const Vec2f &other)
|
||||||
|
{
|
||||||
|
this->x = other.x;
|
||||||
|
this->y = other.y;
|
||||||
|
}
|
||||||
|
|
||||||
|
float& Vec2f::operator [](int 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);
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class Vec3f
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
union
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
float x, y, z;
|
||||||
|
};
|
||||||
|
float v[3];
|
||||||
|
};
|
||||||
|
Vec3f();
|
||||||
|
Vec3f(const Vec3f &other);
|
||||||
|
Vec3f(float x, float y, float z);
|
||||||
|
float Length();
|
||||||
|
void Normalize();
|
||||||
|
float Distance(const Vec3f &);
|
||||||
|
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
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
union
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
float x, y;
|
||||||
|
};
|
||||||
|
float v[2];
|
||||||
|
};
|
||||||
|
Vec2f();
|
||||||
|
Vec2f(float x, float y);
|
||||||
|
Vec2f(const Vec2f &other);
|
||||||
|
float& operator [](int);
|
||||||
|
Vec2f operator + (const Vec2f &other);
|
||||||
|
float length();
|
||||||
|
};
|
||||||
|
|
||||||
+39
@@ -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/(const float &other) const
|
||||||
|
{
|
||||||
|
return Vertex(x / other, y / other, z / other, normalX, normalY, normalZ, texX, texY);
|
||||||
|
}
|
||||||
|
|
||||||
|
Vertex Vertex::operator*(const Vertex & other) const
|
||||||
|
{
|
||||||
|
return Vertex(x*other.x, y*other.y, z*other.z, normalX, normalY, normalZ, texX, texY);
|
||||||
|
}
|
||||||
|
|
||||||
|
Vertex Vertex::operator*(const float & other) const
|
||||||
|
{
|
||||||
|
return Vertex(x*other, y*other, z*other, normalX, normalY, normalZ, texX, texY);
|
||||||
|
}
|
||||||
|
|
||||||
|
Vertex Vertex::operator+(const Vertex & other) const
|
||||||
|
{
|
||||||
|
return Vertex(x+other.x, y+other.y, z+other.z, normalX, normalY, normalZ, texX, texY);
|
||||||
|
}
|
||||||
@@ -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/(const float &other) const;
|
||||||
|
Vertex operator*(const Vertex &other) const;
|
||||||
|
Vertex operator*(const float &other) const;
|
||||||
|
Vertex operator+(const Vertex &other) const;
|
||||||
|
};
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,349 @@
|
|||||||
|
#include "World.h"
|
||||||
|
#include <GL/freeglut.h>
|
||||||
|
#include "Entity.h"
|
||||||
|
#include "json.h"
|
||||||
|
#include "Model.h"
|
||||||
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
|
#include <algorithm>
|
||||||
|
#include "WorldHandler.h"
|
||||||
|
|
||||||
|
World::World(const std::string &fileName):
|
||||||
|
music_id(-1)
|
||||||
|
{
|
||||||
|
nextworld = false;
|
||||||
|
|
||||||
|
//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() || v["world"]["skybox"].isNull())
|
||||||
|
std::cout << "Invalid world file: world - " << fileName << "\n";
|
||||||
|
if (v["world"]["object-templates"].isNull())
|
||||||
|
std::cout << "Invalid world file: object templates - " << 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["enemies"].isNull())
|
||||||
|
std::cout << "Invalid world file: enemies - " << fileName << "\n";
|
||||||
|
if (v["crystals"].isNull())
|
||||||
|
std::cout << "Invalid world file: crystals - " << 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);
|
||||||
|
|
||||||
|
//Load skybox
|
||||||
|
skybox = new Skybox(15000.0f, v["world"]["skybox"].asString());
|
||||||
|
skybox->init();
|
||||||
|
|
||||||
|
//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());
|
||||||
|
position.y = getHeight(position.x, position.z);
|
||||||
|
|
||||||
|
entities.push_back(new LevelObject(object["file"].asString(), position, rotation, scale, hasCollision));
|
||||||
|
}
|
||||||
|
|
||||||
|
maxEnemies = 0;
|
||||||
|
//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";
|
||||||
|
|
||||||
|
//Music
|
||||||
|
if (e["music"].isNull())
|
||||||
|
std::cout << "Invalid world file: enemies music - " << fileName << "\n";
|
||||||
|
|
||||||
|
//Create
|
||||||
|
Vec3f position(e["pos"][0].asFloat(), e["pos"][1].asFloat(), e["pos"][2].asFloat());
|
||||||
|
position.y = getHeight(position.x, position.z) + 2.0f;
|
||||||
|
|
||||||
|
maxEnemies++;
|
||||||
|
enemies.push_back(new Enemy(e["file"].asString(), e["music"].asString(), position, rotation, scale));
|
||||||
|
}
|
||||||
|
maxCrystals = 0;
|
||||||
|
if (!v["crystal"].isNull())
|
||||||
|
{
|
||||||
|
std::string filled = "unknown";
|
||||||
|
std::string empty = "unknown";
|
||||||
|
|
||||||
|
if(!v["crystal"]["full texture"].isNull())
|
||||||
|
filled = v["crystal"]["full texture"].asString();
|
||||||
|
|
||||||
|
if(!v["crystal"]["empty texture"].isNull())
|
||||||
|
empty = v["crystal"]["empty texture"].asString();
|
||||||
|
|
||||||
|
if (!v["crystal"]["instances"].isNull())
|
||||||
|
{
|
||||||
|
for (auto instance : v["crystal"]["instances"])
|
||||||
|
{
|
||||||
|
Vec3f position(0, 0, 0);
|
||||||
|
Vec3f rotation(0, 0, 0);
|
||||||
|
float scale = 1.0f;
|
||||||
|
|
||||||
|
if (!instance["pos"].isNull())
|
||||||
|
{
|
||||||
|
position.x = instance["pos"][0];
|
||||||
|
position.y = instance["pos"][1];
|
||||||
|
position.z = instance["pos"][2];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!instance["rot"].isNull())
|
||||||
|
{
|
||||||
|
rotation.x = instance["rot"][0];
|
||||||
|
rotation.y = instance["rot"][1];
|
||||||
|
rotation.z = instance["rot"][2];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!instance["scale"].isNull())
|
||||||
|
scale = instance["scale"].asFloat();
|
||||||
|
|
||||||
|
position.y = getHeight(position.x, position.z);
|
||||||
|
maxCrystals++;
|
||||||
|
Crystal *c = new Crystal(filled, empty, position, rotation, scale);
|
||||||
|
|
||||||
|
entities.push_back(c);
|
||||||
|
}
|
||||||
|
interface->maxCrystals = maxCrystals;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!v["world"]["music"].isNull())
|
||||||
|
{
|
||||||
|
music_id = CrystalPoint::GetSoundSystem().LoadSound(v["world"]["music"].asString().c_str(), true);
|
||||||
|
music = CrystalPoint::GetSoundSystem().GetSound(music_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!v["portal"].isNull())
|
||||||
|
{
|
||||||
|
Vec3f pos(0, 0, 0);
|
||||||
|
if (!v["portal"]["pos"].isNull())
|
||||||
|
pos = Vec3f(v["portal"]["pos"][0].asFloat(),
|
||||||
|
v["portal"]["pos"][1].asFloat(),
|
||||||
|
v["portal"]["pos"][0].asFloat());
|
||||||
|
|
||||||
|
pos.y = getHeight(pos.x, pos.z);
|
||||||
|
|
||||||
|
Vec3f rot(0, 0, 0);
|
||||||
|
if (!v["portal"]["rot"].isNull())
|
||||||
|
pos = Vec3f(v["portal"]["rot"][0].asFloat(),
|
||||||
|
v["portal"]["rot"][1].asFloat(),
|
||||||
|
v["portal"]["rot"][0].asFloat());
|
||||||
|
|
||||||
|
float scale = 1.0f;
|
||||||
|
if (!v["portal"]["scale"].isNull())
|
||||||
|
scale = !v["portal"]["scale"].asFloat();
|
||||||
|
|
||||||
|
portal = new Portal(v["portal"]["file"], pos, rot, scale);
|
||||||
|
entities.push_back(portal);
|
||||||
|
portal->maxCrystals = maxCrystals;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
World::~World()
|
||||||
|
{
|
||||||
|
delete heightmap;
|
||||||
|
music->Stop();
|
||||||
|
delete music;
|
||||||
|
delete skybox;
|
||||||
|
delete portal;
|
||||||
|
}
|
||||||
|
|
||||||
|
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, 12, 1, 0 };
|
||||||
|
glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
|
||||||
|
|
||||||
|
GLfloat lightAmbient[] = { 0.05, 0.05, 0.05, 0 };
|
||||||
|
GLfloat light_diffuse[] = { 0.9, 0.9, 0.9, 0 };
|
||||||
|
glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
|
||||||
|
GLfloat mat_specular[] = { 0.15, 0.15, 0.15, 0 };
|
||||||
|
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
|
||||||
|
glLightfv(GL_LIGHT0, GL_AMBIENT, lightAmbient);
|
||||||
|
|
||||||
|
skybox->draw();
|
||||||
|
|
||||||
|
heightmap->Draw();
|
||||||
|
|
||||||
|
for (auto &enemy : enemies)
|
||||||
|
enemy->draw();
|
||||||
|
|
||||||
|
for (auto &entity : entities)
|
||||||
|
entity->draw();
|
||||||
|
|
||||||
|
interface->draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
void World::update(float elapsedTime)
|
||||||
|
{
|
||||||
|
if (nextworld)
|
||||||
|
{
|
||||||
|
WorldHandler::getInstance()->NextWorld();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
music->SetPos(player->position, Vec3f());
|
||||||
|
|
||||||
|
if (music->IsPlaying() == false)
|
||||||
|
{
|
||||||
|
music->Play();
|
||||||
|
}
|
||||||
|
for (auto &entity : entities)
|
||||||
|
entity->update(elapsedTime);
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
int remove = false;
|
||||||
|
|
||||||
|
for (auto &enemy : enemies)
|
||||||
|
{
|
||||||
|
|
||||||
|
//Al deze code zou in enemy moeten staan
|
||||||
|
enemy->inEyeSight(player->position);
|
||||||
|
|
||||||
|
|
||||||
|
enemy->update(elapsedTime);
|
||||||
|
if (enemy->hasTarget)
|
||||||
|
{
|
||||||
|
for (auto e : entities)
|
||||||
|
{
|
||||||
|
if (e->canCollide && e->inObject(enemy->position))
|
||||||
|
{
|
||||||
|
enemy->collide(e);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (enemy->attack)
|
||||||
|
{
|
||||||
|
remove = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
enemy->position.y = getHeight(enemy->position.x, enemy->position.z) + 2.0f;
|
||||||
|
|
||||||
|
if(!remove)
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(remove)
|
||||||
|
enemies.erase(enemies.begin() + count);
|
||||||
|
|
||||||
|
skybox->update(elapsedTime, maxEnemies - enemies.size(), maxEnemies);
|
||||||
|
|
||||||
|
if (portal->mayEnter)
|
||||||
|
{
|
||||||
|
if (portal->enter(elapsedTime))
|
||||||
|
nextworld = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void World::addLevelObject(LevelObject* obj)
|
||||||
|
{
|
||||||
|
entities.push_back(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool World::isPlayerPositionValid()
|
||||||
|
{
|
||||||
|
for (auto &e : entities)
|
||||||
|
{
|
||||||
|
if (e->canCollide && e->inObject(player->position))
|
||||||
|
{
|
||||||
|
e->collide();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
#include "HeightMap.h"
|
||||||
|
#include "Player.h"
|
||||||
|
#include "Enemy.h"
|
||||||
|
#include "LevelObject.h"
|
||||||
|
#include "Interface.h"
|
||||||
|
#include "Crystal.h"
|
||||||
|
#include "Skybox.h"
|
||||||
|
#include "CrystalPoint.h"
|
||||||
|
#include "Portal.h"
|
||||||
|
|
||||||
|
class Entity;
|
||||||
|
|
||||||
|
class World
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
std::vector<std::pair<int, std::pair<std::string, bool>>> objecttemplates;
|
||||||
|
Sound* music;
|
||||||
|
|
||||||
|
Player* player;
|
||||||
|
HeightMap* heightmap;
|
||||||
|
Interface* interface;
|
||||||
|
Skybox* skybox;
|
||||||
|
Portal* portal;
|
||||||
|
|
||||||
|
bool nextworld;
|
||||||
|
|
||||||
|
int music_id,maxCrystals,maxEnemies;
|
||||||
|
|
||||||
|
std::vector<Entity*> entities;
|
||||||
|
std::vector<Enemy*> enemies;
|
||||||
|
//std::vector<Crystal*> crystals;
|
||||||
|
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);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
#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();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
Player::getInstance()->crystals = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WorldHandler::PreviousWorld()
|
||||||
|
{
|
||||||
|
if (!loadingWorld)
|
||||||
|
{
|
||||||
|
ChangeWorld(worldIndex - 1);
|
||||||
|
Player::getInstance()->crystals = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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;
|
||||||
|
};
|
||||||
|
|
||||||
Binary file not shown.
@@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
Freeglut Copyright
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Freeglut code without an explicit copyright is covered by the following
|
||||||
|
copyright:
|
||||||
|
|
||||||
|
Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
Except as contained in this notice, the name of Pawel W. Olszta shall not be
|
||||||
|
used in advertising or otherwise to promote the sale, use or other dealings
|
||||||
|
in this Software without prior written authorization from Pawel W. Olszta.
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
freeglut 3.0.0-1.mp for MSVC
|
||||||
|
|
||||||
|
This package contains freeglut import libraries, headers, and Windows DLLs.
|
||||||
|
These allow 32 and 64 bit GLUT applications to be compiled on Windows using
|
||||||
|
Microsoft Visual C++.
|
||||||
|
|
||||||
|
For more information on freeglut, visit http://freeglut.sourceforge.net/.
|
||||||
|
|
||||||
|
|
||||||
|
Installation
|
||||||
|
|
||||||
|
Create a folder on your PC which is readable by all users, for example
|
||||||
|
“C:\Program Files\Common Files\MSVC\freeglut\” on a typical Windows system. Copy
|
||||||
|
the “lib\” and “include\” folders from this zip archive to that location.
|
||||||
|
|
||||||
|
The appropriate freeglut DLL can either be placed in the same folder as your
|
||||||
|
application, or can be installed in a system-wide folder which appears in your
|
||||||
|
%PATH% environment variable. Be careful not to mix the 32 bit DLL up with the 64
|
||||||
|
bit DLL, as they are not interchangeable.
|
||||||
|
|
||||||
|
|
||||||
|
Compiling 32 bit Applications
|
||||||
|
|
||||||
|
To create a 32 bit freeglut application, create a new Win32 C++ project in MSVC.
|
||||||
|
From the “Win32 Application Wizard”, choose a “Windows application”, check the
|
||||||
|
“Empty project” box, and submit.
|
||||||
|
|
||||||
|
You’ll now need to configure the compiler and linker settings. Open up the
|
||||||
|
project properties, and select “All Configurations” (this is necessary to ensure
|
||||||
|
our changes are applied for both debug and release builds). Open up the
|
||||||
|
“general” section under “C/C++”, and configure the “include\” folder you created
|
||||||
|
above as an “Additional Include Directory”. If you have more than one GLUT
|
||||||
|
package which contains a “glut.h” file, it’s important to ensure that the
|
||||||
|
freeglut include folder appears above all other GLUT include folders.
|
||||||
|
|
||||||
|
Now open up the “general” section under “Linker”, and configure the “lib\”
|
||||||
|
folder you created above as an “Additional Library Directory”. A freeglut
|
||||||
|
application depends on the import libraries “freeglut.lib” and “opengl32.lib”,
|
||||||
|
which can be configured under the “Input” section. However, it shouldn’t be
|
||||||
|
necessary to explicitly state these dependencies, since the freeglut headers
|
||||||
|
handle this for you. Now open the “Advanced” section, and enter “mainCRTStartup”
|
||||||
|
as the “Entry Point” for your application. This is necessary because GLUT
|
||||||
|
applications use “main” as the application entry point, not “WinMain”—without it
|
||||||
|
you’ll get an undefined reference when you try to link your application.
|
||||||
|
|
||||||
|
That’s all of your project properties configured, so you can now add source
|
||||||
|
files to your project and build the application. If you want your application to
|
||||||
|
be compatible with GLUT, you should “#include <GL/glut.h>”. If you want to use
|
||||||
|
freeglut specific extensions, you should “#include <GL/freeglut.h>” instead.
|
||||||
|
|
||||||
|
Don’t forget to either include the freeglut DLL when distributing applications,
|
||||||
|
or provide your users with some method of obtaining it if they don’t already
|
||||||
|
have it!
|
||||||
|
|
||||||
|
|
||||||
|
Compiling 64 bit Applications
|
||||||
|
|
||||||
|
Building 64 bit applications is almost identical to building 32 bit applications.
|
||||||
|
When you use the configuration manager to add the x64 platform, it’s easiest to
|
||||||
|
copy the settings from the Win32 platform. If you do so, it’s then only necessary
|
||||||
|
to change the “Additional Library Directories” configuration so that it
|
||||||
|
references the directory containing the 64 bit import library rather
|
||||||
|
than the 32 bit one.
|
||||||
|
|
||||||
|
|
||||||
|
Problems?
|
||||||
|
|
||||||
|
If you have problems using this package (compiler / linker errors etc.), please
|
||||||
|
check that you have followed all of the steps in this readme file correctly.
|
||||||
|
Almost all of the problems which are reported with these packages are due to
|
||||||
|
missing a step or not doing it correctly, for example trying to build a 32 bit
|
||||||
|
app against the 64 bit import library. If you have followed all of the steps
|
||||||
|
correctly but your application still fails to build, try building a very simple
|
||||||
|
but functional program (the example at
|
||||||
|
http://www.transmissionzero.co.uk/computing/using-glut-with-mingw/ works fine
|
||||||
|
with MSVC). A lot of people try to build very complex applications after
|
||||||
|
installing these packages, and often the error is with the application code or
|
||||||
|
other library dependencies rather than freeglut.
|
||||||
|
|
||||||
|
If you still can’t get it working after trying to compile a simple application,
|
||||||
|
then please get in touch via http://www.transmissionzero.co.uk/contact/,
|
||||||
|
providing as much detail as you can. Please don’t complain to the freeglut guys
|
||||||
|
unless you’re sure it’s a freeglut bug, and have reproduced the issue after
|
||||||
|
compiling freeglut from the latest SVN version—if that’s still the case, I’m
|
||||||
|
sure they would appreciate a bug report or a patch.
|
||||||
|
|
||||||
|
|
||||||
|
Changelog
|
||||||
|
|
||||||
|
2015–07–22: Release 3.0.0-2.mp
|
||||||
|
|
||||||
|
• Modified the freeglut_std.h file so that it doesn’t try to link against the
|
||||||
|
freeglutd.lib import library.
|
||||||
|
|
||||||
|
2015–03–15: Release 3.0.0-1.mp
|
||||||
|
|
||||||
|
• First 3.0.0 MSVC release. I’ve built the package using Visual Studio 2013,
|
||||||
|
and the only change I’ve made is to the DLL version resource—I’ve changed
|
||||||
|
the description so that my MinGW and MSVC builds are distinguishable from
|
||||||
|
each other (and other builds) using Windows Explorer.
|
||||||
|
|
||||||
|
|
||||||
|
Transmission Zero
|
||||||
|
2015–07–22
|
||||||
|
|
||||||
|
http://www.transmissionzero.co.uk/
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
#ifndef __FREEGLUT_H__
|
||||||
|
#define __FREEGLUT_H__
|
||||||
|
|
||||||
|
/*
|
||||||
|
* freeglut.h
|
||||||
|
*
|
||||||
|
* The freeglut library include file
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "freeglut_std.h"
|
||||||
|
#include "freeglut_ext.h"
|
||||||
|
|
||||||
|
/*** END OF FILE ***/
|
||||||
|
|
||||||
|
#endif /* __FREEGLUT_H__ */
|
||||||
@@ -0,0 +1,271 @@
|
|||||||
|
#ifndef __FREEGLUT_EXT_H__
|
||||||
|
#define __FREEGLUT_EXT_H__
|
||||||
|
|
||||||
|
/*
|
||||||
|
* freeglut_ext.h
|
||||||
|
*
|
||||||
|
* The non-GLUT-compatible extensions to the freeglut library include file
|
||||||
|
*
|
||||||
|
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||||
|
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||||
|
* Creation date: Thu Dec 2 1999
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Additional GLUT Key definitions for the Special key function
|
||||||
|
*/
|
||||||
|
#define GLUT_KEY_NUM_LOCK 0x006D
|
||||||
|
#define GLUT_KEY_BEGIN 0x006E
|
||||||
|
#define GLUT_KEY_DELETE 0x006F
|
||||||
|
#define GLUT_KEY_SHIFT_L 0x0070
|
||||||
|
#define GLUT_KEY_SHIFT_R 0x0071
|
||||||
|
#define GLUT_KEY_CTRL_L 0x0072
|
||||||
|
#define GLUT_KEY_CTRL_R 0x0073
|
||||||
|
#define GLUT_KEY_ALT_L 0x0074
|
||||||
|
#define GLUT_KEY_ALT_R 0x0075
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window
|
||||||
|
*/
|
||||||
|
#define GLUT_ACTION_EXIT 0
|
||||||
|
#define GLUT_ACTION_GLUTMAINLOOP_RETURNS 1
|
||||||
|
#define GLUT_ACTION_CONTINUE_EXECUTION 2
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create a new rendering context when the user opens a new window?
|
||||||
|
*/
|
||||||
|
#define GLUT_CREATE_NEW_CONTEXT 0
|
||||||
|
#define GLUT_USE_CURRENT_CONTEXT 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Direct/Indirect rendering context options (has meaning only in Unix/X11)
|
||||||
|
*/
|
||||||
|
#define GLUT_FORCE_INDIRECT_CONTEXT 0
|
||||||
|
#define GLUT_ALLOW_DIRECT_CONTEXT 1
|
||||||
|
#define GLUT_TRY_DIRECT_CONTEXT 2
|
||||||
|
#define GLUT_FORCE_DIRECT_CONTEXT 3
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API Extension macro definitions -- the glutGet parameters
|
||||||
|
*/
|
||||||
|
#define GLUT_INIT_STATE 0x007C
|
||||||
|
|
||||||
|
#define GLUT_ACTION_ON_WINDOW_CLOSE 0x01F9
|
||||||
|
|
||||||
|
#define GLUT_WINDOW_BORDER_WIDTH 0x01FA
|
||||||
|
#define GLUT_WINDOW_BORDER_HEIGHT 0x01FB
|
||||||
|
#define GLUT_WINDOW_HEADER_HEIGHT 0x01FB /* Docs say it should always have been GLUT_WINDOW_BORDER_HEIGHT, keep this for backward compatibility */
|
||||||
|
|
||||||
|
#define GLUT_VERSION 0x01FC
|
||||||
|
|
||||||
|
#define GLUT_RENDERING_CONTEXT 0x01FD
|
||||||
|
#define GLUT_DIRECT_RENDERING 0x01FE
|
||||||
|
|
||||||
|
#define GLUT_FULL_SCREEN 0x01FF
|
||||||
|
|
||||||
|
#define GLUT_SKIP_STALE_MOTION_EVENTS 0x0204
|
||||||
|
|
||||||
|
#define GLUT_GEOMETRY_VISUALIZE_NORMALS 0x0205
|
||||||
|
|
||||||
|
#define GLUT_STROKE_FONT_DRAW_JOIN_DOTS 0x0206 /* Draw dots between line segments of stroke fonts? */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* New tokens for glutInitDisplayMode.
|
||||||
|
* Only one GLUT_AUXn bit may be used at a time.
|
||||||
|
* Value 0x0400 is defined in OpenGLUT.
|
||||||
|
*/
|
||||||
|
#define GLUT_AUX 0x1000
|
||||||
|
|
||||||
|
#define GLUT_AUX1 0x1000
|
||||||
|
#define GLUT_AUX2 0x2000
|
||||||
|
#define GLUT_AUX3 0x4000
|
||||||
|
#define GLUT_AUX4 0x8000
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Context-related flags, see fg_state.c
|
||||||
|
* Set the requested OpenGL version
|
||||||
|
*/
|
||||||
|
#define GLUT_INIT_MAJOR_VERSION 0x0200
|
||||||
|
#define GLUT_INIT_MINOR_VERSION 0x0201
|
||||||
|
#define GLUT_INIT_FLAGS 0x0202
|
||||||
|
#define GLUT_INIT_PROFILE 0x0203
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Flags for glutInitContextFlags, see fg_init.c
|
||||||
|
*/
|
||||||
|
#define GLUT_DEBUG 0x0001
|
||||||
|
#define GLUT_FORWARD_COMPATIBLE 0x0002
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Flags for glutInitContextProfile, see fg_init.c
|
||||||
|
*/
|
||||||
|
#define GLUT_CORE_PROFILE 0x0001
|
||||||
|
#define GLUT_COMPATIBILITY_PROFILE 0x0002
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Process loop function, see fg_main.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutMainLoopEvent( void );
|
||||||
|
FGAPI void FGAPIENTRY glutLeaveMainLoop( void );
|
||||||
|
FGAPI void FGAPIENTRY glutExit ( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Window management functions, see fg_window.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutFullScreenToggle( void );
|
||||||
|
FGAPI void FGAPIENTRY glutLeaveFullScreen( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Menu functions
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutSetMenuFont( int menuID, void* font );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Window-specific callback functions, see fg_callbacks.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutMouseWheelFunc( void (* callback)( int, int, int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutPositionFunc( void (* callback)( int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutCloseFunc( void (* callback)( void ) );
|
||||||
|
FGAPI void FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) );
|
||||||
|
/* And also a destruction callback for menus */
|
||||||
|
FGAPI void FGAPIENTRY glutMenuDestroyFunc( void (* callback)( void ) );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* State setting and retrieval functions, see fg_state.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutSetOption ( GLenum option_flag, int value );
|
||||||
|
FGAPI int * FGAPIENTRY glutGetModeValues(GLenum mode, int * size);
|
||||||
|
/* A.Donev: User-data manipulation */
|
||||||
|
FGAPI void* FGAPIENTRY glutGetWindowData( void );
|
||||||
|
FGAPI void FGAPIENTRY glutSetWindowData(void* data);
|
||||||
|
FGAPI void* FGAPIENTRY glutGetMenuData( void );
|
||||||
|
FGAPI void FGAPIENTRY glutSetMenuData(void* data);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Font stuff, see fg_font.c
|
||||||
|
*/
|
||||||
|
FGAPI int FGAPIENTRY glutBitmapHeight( void* font );
|
||||||
|
FGAPI GLfloat FGAPIENTRY glutStrokeHeight( void* font );
|
||||||
|
FGAPI void FGAPIENTRY glutBitmapString( void* font, const unsigned char *string );
|
||||||
|
FGAPI void FGAPIENTRY glutStrokeString( void* font, const unsigned char *string );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Geometry functions, see fg_geometry.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutWireRhombicDodecahedron( void );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidRhombicDodecahedron( void );
|
||||||
|
FGAPI void FGAPIENTRY glutWireSierpinskiSponge ( int num_levels, double offset[3], double scale );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidSierpinskiSponge ( int num_levels, double offset[3], double scale );
|
||||||
|
FGAPI void FGAPIENTRY glutWireCylinder( double radius, double height, GLint slices, GLint stacks);
|
||||||
|
FGAPI void FGAPIENTRY glutSolidCylinder( double radius, double height, GLint slices, GLint stacks);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Rest of functions for rendering Newell's teaset, found in fg_teapot.c
|
||||||
|
* NB: front facing polygons have clockwise winding, not counter clockwise
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutWireTeacup( double size );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidTeacup( double size );
|
||||||
|
FGAPI void FGAPIENTRY glutWireTeaspoon( double size );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidTeaspoon( double size );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Extension functions, see fg_ext.c
|
||||||
|
*/
|
||||||
|
typedef void (*GLUTproc)();
|
||||||
|
FGAPI GLUTproc FGAPIENTRY glutGetProcAddress( const char *procName );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Multi-touch/multi-pointer extensions
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define GLUT_HAS_MULTI 1
|
||||||
|
|
||||||
|
/* TODO: add device_id parameter,
|
||||||
|
cf. http://sourceforge.net/mailarchive/forum.php?thread_name=20120518071314.GA28061%40perso.beuc.net&forum_name=freeglut-developer */
|
||||||
|
FGAPI void FGAPIENTRY glutMultiEntryFunc( void (* callback)( int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutMultiButtonFunc( void (* callback)( int, int, int, int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutMultiMotionFunc( void (* callback)( int, int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutMultiPassiveFunc( void (* callback)( int, int, int ) );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Joystick functions, see fg_joystick.c
|
||||||
|
*/
|
||||||
|
/* USE OF THESE FUNCTIONS IS DEPRECATED !!!!! */
|
||||||
|
/* If you have a serious need for these functions in your application, please either
|
||||||
|
* contact the "freeglut" developer community at freeglut-developer@lists.sourceforge.net,
|
||||||
|
* switch to the OpenGLUT library, or else port your joystick functionality over to PLIB's
|
||||||
|
* "js" library.
|
||||||
|
*/
|
||||||
|
int glutJoystickGetNumAxes( int ident );
|
||||||
|
int glutJoystickGetNumButtons( int ident );
|
||||||
|
int glutJoystickNotWorking( int ident );
|
||||||
|
float glutJoystickGetDeadBand( int ident, int axis );
|
||||||
|
void glutJoystickSetDeadBand( int ident, int axis, float db );
|
||||||
|
float glutJoystickGetSaturation( int ident, int axis );
|
||||||
|
void glutJoystickSetSaturation( int ident, int axis, float st );
|
||||||
|
void glutJoystickSetMinRange( int ident, float *axes );
|
||||||
|
void glutJoystickSetMaxRange( int ident, float *axes );
|
||||||
|
void glutJoystickSetCenter( int ident, float *axes );
|
||||||
|
void glutJoystickGetMinRange( int ident, float *axes );
|
||||||
|
void glutJoystickGetMaxRange( int ident, float *axes );
|
||||||
|
void glutJoystickGetCenter( int ident, float *axes );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialization functions, see fg_init.c
|
||||||
|
*/
|
||||||
|
/* to get the typedef for va_list */
|
||||||
|
#include <stdarg.h>
|
||||||
|
FGAPI void FGAPIENTRY glutInitContextVersion( int majorVersion, int minorVersion );
|
||||||
|
FGAPI void FGAPIENTRY glutInitContextFlags( int flags );
|
||||||
|
FGAPI void FGAPIENTRY glutInitContextProfile( int profile );
|
||||||
|
FGAPI void FGAPIENTRY glutInitErrorFunc( void (* callback)( const char *fmt, va_list ap ) );
|
||||||
|
FGAPI void FGAPIENTRY glutInitWarningFunc( void (* callback)( const char *fmt, va_list ap ) );
|
||||||
|
|
||||||
|
/* OpenGL >= 2.0 support */
|
||||||
|
FGAPI void FGAPIENTRY glutSetVertexAttribCoord3(GLint attrib);
|
||||||
|
FGAPI void FGAPIENTRY glutSetVertexAttribNormal(GLint attrib);
|
||||||
|
FGAPI void FGAPIENTRY glutSetVertexAttribTexCoord2(GLint attrib);
|
||||||
|
|
||||||
|
/* Mobile platforms lifecycle */
|
||||||
|
FGAPI void FGAPIENTRY glutInitContextFunc(void (* callback)());
|
||||||
|
FGAPI void FGAPIENTRY glutAppStatusFunc(void (* callback)(int));
|
||||||
|
/* state flags that can be passed to callback set by glutAppStatusFunc */
|
||||||
|
#define GLUT_APPSTATUS_PAUSE 0x0001
|
||||||
|
#define GLUT_APPSTATUS_RESUME 0x0002
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- the display mode definitions
|
||||||
|
*/
|
||||||
|
#define GLUT_CAPTIONLESS 0x0400
|
||||||
|
#define GLUT_BORDERLESS 0x0800
|
||||||
|
#define GLUT_SRGB 0x1000
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*** END OF FILE ***/
|
||||||
|
|
||||||
|
#endif /* __FREEGLUT_EXT_H__ */
|
||||||
@@ -0,0 +1,638 @@
|
|||||||
|
#ifndef __FREEGLUT_STD_H__
|
||||||
|
#define __FREEGLUT_STD_H__
|
||||||
|
|
||||||
|
/*
|
||||||
|
* freeglut_std.h
|
||||||
|
*
|
||||||
|
* The GLUT-compatible part of the freeglut library include file
|
||||||
|
*
|
||||||
|
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||||
|
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||||
|
* Creation date: Thu Dec 2 1999
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
|
* to deal in the Software without restriction, including without limitation
|
||||||
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
* and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
* Software is furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included
|
||||||
|
* in all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Under windows, we have to differentiate between static and dynamic libraries
|
||||||
|
*/
|
||||||
|
#ifdef _WIN32
|
||||||
|
/* #pragma may not be supported by some compilers.
|
||||||
|
* Discussion by FreeGLUT developers suggests that
|
||||||
|
* Visual C++ specific code involving pragmas may
|
||||||
|
* need to move to a separate header. 24th Dec 2003
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Define FREEGLUT_LIB_PRAGMAS to 1 to include library
|
||||||
|
* pragmas or to 0 to exclude library pragmas.
|
||||||
|
* The default behavior depends on the compiler/platform.
|
||||||
|
*/
|
||||||
|
# ifndef FREEGLUT_LIB_PRAGMAS
|
||||||
|
# if ( defined(_MSC_VER) || defined(__WATCOMC__) ) && !defined(_WIN32_WCE)
|
||||||
|
# define FREEGLUT_LIB_PRAGMAS 1
|
||||||
|
# else
|
||||||
|
# define FREEGLUT_LIB_PRAGMAS 0
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
# define WIN32_LEAN_AND_MEAN 1
|
||||||
|
# endif
|
||||||
|
# ifndef NOMINMAX
|
||||||
|
# define NOMINMAX
|
||||||
|
# endif
|
||||||
|
# include <windows.h>
|
||||||
|
|
||||||
|
/* Windows static library */
|
||||||
|
# ifdef FREEGLUT_STATIC
|
||||||
|
|
||||||
|
#error Static linking is not supported with this build. Please remove the FREEGLUT_STATIC preprocessor directive, or download the source code from http://freeglut.sf.net/ and build against that.
|
||||||
|
|
||||||
|
/* Windows shared library (DLL) */
|
||||||
|
# else
|
||||||
|
|
||||||
|
# define FGAPIENTRY __stdcall
|
||||||
|
# if defined(FREEGLUT_EXPORTS)
|
||||||
|
# define FGAPI __declspec(dllexport)
|
||||||
|
# else
|
||||||
|
# define FGAPI __declspec(dllimport)
|
||||||
|
|
||||||
|
/* Link with Win32 shared freeglut lib */
|
||||||
|
# if FREEGLUT_LIB_PRAGMAS
|
||||||
|
# pragma comment (lib, "freeglut.lib")
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
|
/* Drag in other Windows libraries as required by FreeGLUT */
|
||||||
|
# if FREEGLUT_LIB_PRAGMAS
|
||||||
|
# pragma comment (lib, "glu32.lib") /* link OpenGL Utility lib */
|
||||||
|
# pragma comment (lib, "opengl32.lib") /* link Microsoft OpenGL lib */
|
||||||
|
# pragma comment (lib, "gdi32.lib") /* link Windows GDI lib */
|
||||||
|
# pragma comment (lib, "winmm.lib") /* link Windows MultiMedia lib */
|
||||||
|
# pragma comment (lib, "user32.lib") /* link Windows user lib */
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/* Non-Windows definition of FGAPI and FGAPIENTRY */
|
||||||
|
# define FGAPI
|
||||||
|
# define FGAPIENTRY
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The freeglut and GLUT API versions
|
||||||
|
*/
|
||||||
|
#define FREEGLUT 1
|
||||||
|
#define GLUT_API_VERSION 4
|
||||||
|
#define GLUT_XLIB_IMPLEMENTATION 13
|
||||||
|
/* Deprecated:
|
||||||
|
cf. http://sourceforge.net/mailarchive/forum.php?thread_name=CABcAi1hw7cr4xtigckaGXB5X8wddLfMcbA_rZ3NAuwMrX_zmsw%40mail.gmail.com&forum_name=freeglut-developer */
|
||||||
|
#define FREEGLUT_VERSION_2_0 1
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Always include OpenGL and GLU headers
|
||||||
|
*/
|
||||||
|
/* Note: FREEGLUT_GLES is only used to cleanly bootstrap headers
|
||||||
|
inclusion here; use GLES constants directly
|
||||||
|
(e.g. GL_ES_VERSION_2_0) for all other needs */
|
||||||
|
#ifdef FREEGLUT_GLES
|
||||||
|
# include <EGL/egl.h>
|
||||||
|
# include <GLES/gl.h>
|
||||||
|
# include <GLES2/gl2.h>
|
||||||
|
#elif __APPLE__
|
||||||
|
# include <OpenGL/gl.h>
|
||||||
|
# include <OpenGL/glu.h>
|
||||||
|
#else
|
||||||
|
# include <GL/gl.h>
|
||||||
|
# include <GL/glu.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- the special key codes:
|
||||||
|
*/
|
||||||
|
#define GLUT_KEY_F1 0x0001
|
||||||
|
#define GLUT_KEY_F2 0x0002
|
||||||
|
#define GLUT_KEY_F3 0x0003
|
||||||
|
#define GLUT_KEY_F4 0x0004
|
||||||
|
#define GLUT_KEY_F5 0x0005
|
||||||
|
#define GLUT_KEY_F6 0x0006
|
||||||
|
#define GLUT_KEY_F7 0x0007
|
||||||
|
#define GLUT_KEY_F8 0x0008
|
||||||
|
#define GLUT_KEY_F9 0x0009
|
||||||
|
#define GLUT_KEY_F10 0x000A
|
||||||
|
#define GLUT_KEY_F11 0x000B
|
||||||
|
#define GLUT_KEY_F12 0x000C
|
||||||
|
#define GLUT_KEY_LEFT 0x0064
|
||||||
|
#define GLUT_KEY_UP 0x0065
|
||||||
|
#define GLUT_KEY_RIGHT 0x0066
|
||||||
|
#define GLUT_KEY_DOWN 0x0067
|
||||||
|
#define GLUT_KEY_PAGE_UP 0x0068
|
||||||
|
#define GLUT_KEY_PAGE_DOWN 0x0069
|
||||||
|
#define GLUT_KEY_HOME 0x006A
|
||||||
|
#define GLUT_KEY_END 0x006B
|
||||||
|
#define GLUT_KEY_INSERT 0x006C
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- mouse state definitions
|
||||||
|
*/
|
||||||
|
#define GLUT_LEFT_BUTTON 0x0000
|
||||||
|
#define GLUT_MIDDLE_BUTTON 0x0001
|
||||||
|
#define GLUT_RIGHT_BUTTON 0x0002
|
||||||
|
#define GLUT_DOWN 0x0000
|
||||||
|
#define GLUT_UP 0x0001
|
||||||
|
#define GLUT_LEFT 0x0000
|
||||||
|
#define GLUT_ENTERED 0x0001
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- the display mode definitions
|
||||||
|
*/
|
||||||
|
#define GLUT_RGB 0x0000
|
||||||
|
#define GLUT_RGBA 0x0000
|
||||||
|
#define GLUT_INDEX 0x0001
|
||||||
|
#define GLUT_SINGLE 0x0000
|
||||||
|
#define GLUT_DOUBLE 0x0002
|
||||||
|
#define GLUT_ACCUM 0x0004
|
||||||
|
#define GLUT_ALPHA 0x0008
|
||||||
|
#define GLUT_DEPTH 0x0010
|
||||||
|
#define GLUT_STENCIL 0x0020
|
||||||
|
#define GLUT_MULTISAMPLE 0x0080
|
||||||
|
#define GLUT_STEREO 0x0100
|
||||||
|
#define GLUT_LUMINANCE 0x0200
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- windows and menu related definitions
|
||||||
|
*/
|
||||||
|
#define GLUT_MENU_NOT_IN_USE 0x0000
|
||||||
|
#define GLUT_MENU_IN_USE 0x0001
|
||||||
|
#define GLUT_NOT_VISIBLE 0x0000
|
||||||
|
#define GLUT_VISIBLE 0x0001
|
||||||
|
#define GLUT_HIDDEN 0x0000
|
||||||
|
#define GLUT_FULLY_RETAINED 0x0001
|
||||||
|
#define GLUT_PARTIALLY_RETAINED 0x0002
|
||||||
|
#define GLUT_FULLY_COVERED 0x0003
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- fonts definitions
|
||||||
|
*
|
||||||
|
* Steve Baker suggested to make it binary compatible with GLUT:
|
||||||
|
*/
|
||||||
|
#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__WATCOMC__)
|
||||||
|
# define GLUT_STROKE_ROMAN ((void *)0x0000)
|
||||||
|
# define GLUT_STROKE_MONO_ROMAN ((void *)0x0001)
|
||||||
|
# define GLUT_BITMAP_9_BY_15 ((void *)0x0002)
|
||||||
|
# define GLUT_BITMAP_8_BY_13 ((void *)0x0003)
|
||||||
|
# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *)0x0004)
|
||||||
|
# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *)0x0005)
|
||||||
|
# define GLUT_BITMAP_HELVETICA_10 ((void *)0x0006)
|
||||||
|
# define GLUT_BITMAP_HELVETICA_12 ((void *)0x0007)
|
||||||
|
# define GLUT_BITMAP_HELVETICA_18 ((void *)0x0008)
|
||||||
|
#else
|
||||||
|
/*
|
||||||
|
* I don't really know if it's a good idea... But here it goes:
|
||||||
|
*/
|
||||||
|
extern void* glutStrokeRoman;
|
||||||
|
extern void* glutStrokeMonoRoman;
|
||||||
|
extern void* glutBitmap9By15;
|
||||||
|
extern void* glutBitmap8By13;
|
||||||
|
extern void* glutBitmapTimesRoman10;
|
||||||
|
extern void* glutBitmapTimesRoman24;
|
||||||
|
extern void* glutBitmapHelvetica10;
|
||||||
|
extern void* glutBitmapHelvetica12;
|
||||||
|
extern void* glutBitmapHelvetica18;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Those pointers will be used by following definitions:
|
||||||
|
*/
|
||||||
|
# define GLUT_STROKE_ROMAN ((void *) &glutStrokeRoman)
|
||||||
|
# define GLUT_STROKE_MONO_ROMAN ((void *) &glutStrokeMonoRoman)
|
||||||
|
# define GLUT_BITMAP_9_BY_15 ((void *) &glutBitmap9By15)
|
||||||
|
# define GLUT_BITMAP_8_BY_13 ((void *) &glutBitmap8By13)
|
||||||
|
# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *) &glutBitmapTimesRoman10)
|
||||||
|
# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *) &glutBitmapTimesRoman24)
|
||||||
|
# define GLUT_BITMAP_HELVETICA_10 ((void *) &glutBitmapHelvetica10)
|
||||||
|
# define GLUT_BITMAP_HELVETICA_12 ((void *) &glutBitmapHelvetica12)
|
||||||
|
# define GLUT_BITMAP_HELVETICA_18 ((void *) &glutBitmapHelvetica18)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- the glutGet parameters
|
||||||
|
*/
|
||||||
|
#define GLUT_WINDOW_X 0x0064
|
||||||
|
#define GLUT_WINDOW_Y 0x0065
|
||||||
|
#define GLUT_WINDOW_WIDTH 0x0066
|
||||||
|
#define GLUT_WINDOW_HEIGHT 0x0067
|
||||||
|
#define GLUT_WINDOW_BUFFER_SIZE 0x0068
|
||||||
|
#define GLUT_WINDOW_STENCIL_SIZE 0x0069
|
||||||
|
#define GLUT_WINDOW_DEPTH_SIZE 0x006A
|
||||||
|
#define GLUT_WINDOW_RED_SIZE 0x006B
|
||||||
|
#define GLUT_WINDOW_GREEN_SIZE 0x006C
|
||||||
|
#define GLUT_WINDOW_BLUE_SIZE 0x006D
|
||||||
|
#define GLUT_WINDOW_ALPHA_SIZE 0x006E
|
||||||
|
#define GLUT_WINDOW_ACCUM_RED_SIZE 0x006F
|
||||||
|
#define GLUT_WINDOW_ACCUM_GREEN_SIZE 0x0070
|
||||||
|
#define GLUT_WINDOW_ACCUM_BLUE_SIZE 0x0071
|
||||||
|
#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 0x0072
|
||||||
|
#define GLUT_WINDOW_DOUBLEBUFFER 0x0073
|
||||||
|
#define GLUT_WINDOW_RGBA 0x0074
|
||||||
|
#define GLUT_WINDOW_PARENT 0x0075
|
||||||
|
#define GLUT_WINDOW_NUM_CHILDREN 0x0076
|
||||||
|
#define GLUT_WINDOW_COLORMAP_SIZE 0x0077
|
||||||
|
#define GLUT_WINDOW_NUM_SAMPLES 0x0078
|
||||||
|
#define GLUT_WINDOW_STEREO 0x0079
|
||||||
|
#define GLUT_WINDOW_CURSOR 0x007A
|
||||||
|
|
||||||
|
#define GLUT_SCREEN_WIDTH 0x00C8
|
||||||
|
#define GLUT_SCREEN_HEIGHT 0x00C9
|
||||||
|
#define GLUT_SCREEN_WIDTH_MM 0x00CA
|
||||||
|
#define GLUT_SCREEN_HEIGHT_MM 0x00CB
|
||||||
|
#define GLUT_MENU_NUM_ITEMS 0x012C
|
||||||
|
#define GLUT_DISPLAY_MODE_POSSIBLE 0x0190
|
||||||
|
#define GLUT_INIT_WINDOW_X 0x01F4
|
||||||
|
#define GLUT_INIT_WINDOW_Y 0x01F5
|
||||||
|
#define GLUT_INIT_WINDOW_WIDTH 0x01F6
|
||||||
|
#define GLUT_INIT_WINDOW_HEIGHT 0x01F7
|
||||||
|
#define GLUT_INIT_DISPLAY_MODE 0x01F8
|
||||||
|
#define GLUT_ELAPSED_TIME 0x02BC
|
||||||
|
#define GLUT_WINDOW_FORMAT_ID 0x007B
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- the glutDeviceGet parameters
|
||||||
|
*/
|
||||||
|
#define GLUT_HAS_KEYBOARD 0x0258
|
||||||
|
#define GLUT_HAS_MOUSE 0x0259
|
||||||
|
#define GLUT_HAS_SPACEBALL 0x025A
|
||||||
|
#define GLUT_HAS_DIAL_AND_BUTTON_BOX 0x025B
|
||||||
|
#define GLUT_HAS_TABLET 0x025C
|
||||||
|
#define GLUT_NUM_MOUSE_BUTTONS 0x025D
|
||||||
|
#define GLUT_NUM_SPACEBALL_BUTTONS 0x025E
|
||||||
|
#define GLUT_NUM_BUTTON_BOX_BUTTONS 0x025F
|
||||||
|
#define GLUT_NUM_DIALS 0x0260
|
||||||
|
#define GLUT_NUM_TABLET_BUTTONS 0x0261
|
||||||
|
#define GLUT_DEVICE_IGNORE_KEY_REPEAT 0x0262
|
||||||
|
#define GLUT_DEVICE_KEY_REPEAT 0x0263
|
||||||
|
#define GLUT_HAS_JOYSTICK 0x0264
|
||||||
|
#define GLUT_OWNS_JOYSTICK 0x0265
|
||||||
|
#define GLUT_JOYSTICK_BUTTONS 0x0266
|
||||||
|
#define GLUT_JOYSTICK_AXES 0x0267
|
||||||
|
#define GLUT_JOYSTICK_POLL_RATE 0x0268
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- the glutLayerGet parameters
|
||||||
|
*/
|
||||||
|
#define GLUT_OVERLAY_POSSIBLE 0x0320
|
||||||
|
#define GLUT_LAYER_IN_USE 0x0321
|
||||||
|
#define GLUT_HAS_OVERLAY 0x0322
|
||||||
|
#define GLUT_TRANSPARENT_INDEX 0x0323
|
||||||
|
#define GLUT_NORMAL_DAMAGED 0x0324
|
||||||
|
#define GLUT_OVERLAY_DAMAGED 0x0325
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- the glutVideoResizeGet parameters
|
||||||
|
*/
|
||||||
|
#define GLUT_VIDEO_RESIZE_POSSIBLE 0x0384
|
||||||
|
#define GLUT_VIDEO_RESIZE_IN_USE 0x0385
|
||||||
|
#define GLUT_VIDEO_RESIZE_X_DELTA 0x0386
|
||||||
|
#define GLUT_VIDEO_RESIZE_Y_DELTA 0x0387
|
||||||
|
#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 0x0388
|
||||||
|
#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 0x0389
|
||||||
|
#define GLUT_VIDEO_RESIZE_X 0x038A
|
||||||
|
#define GLUT_VIDEO_RESIZE_Y 0x038B
|
||||||
|
#define GLUT_VIDEO_RESIZE_WIDTH 0x038C
|
||||||
|
#define GLUT_VIDEO_RESIZE_HEIGHT 0x038D
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- the glutUseLayer parameters
|
||||||
|
*/
|
||||||
|
#define GLUT_NORMAL 0x0000
|
||||||
|
#define GLUT_OVERLAY 0x0001
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- the glutGetModifiers parameters
|
||||||
|
*/
|
||||||
|
#define GLUT_ACTIVE_SHIFT 0x0001
|
||||||
|
#define GLUT_ACTIVE_CTRL 0x0002
|
||||||
|
#define GLUT_ACTIVE_ALT 0x0004
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- the glutSetCursor parameters
|
||||||
|
*/
|
||||||
|
#define GLUT_CURSOR_RIGHT_ARROW 0x0000
|
||||||
|
#define GLUT_CURSOR_LEFT_ARROW 0x0001
|
||||||
|
#define GLUT_CURSOR_INFO 0x0002
|
||||||
|
#define GLUT_CURSOR_DESTROY 0x0003
|
||||||
|
#define GLUT_CURSOR_HELP 0x0004
|
||||||
|
#define GLUT_CURSOR_CYCLE 0x0005
|
||||||
|
#define GLUT_CURSOR_SPRAY 0x0006
|
||||||
|
#define GLUT_CURSOR_WAIT 0x0007
|
||||||
|
#define GLUT_CURSOR_TEXT 0x0008
|
||||||
|
#define GLUT_CURSOR_CROSSHAIR 0x0009
|
||||||
|
#define GLUT_CURSOR_UP_DOWN 0x000A
|
||||||
|
#define GLUT_CURSOR_LEFT_RIGHT 0x000B
|
||||||
|
#define GLUT_CURSOR_TOP_SIDE 0x000C
|
||||||
|
#define GLUT_CURSOR_BOTTOM_SIDE 0x000D
|
||||||
|
#define GLUT_CURSOR_LEFT_SIDE 0x000E
|
||||||
|
#define GLUT_CURSOR_RIGHT_SIDE 0x000F
|
||||||
|
#define GLUT_CURSOR_TOP_LEFT_CORNER 0x0010
|
||||||
|
#define GLUT_CURSOR_TOP_RIGHT_CORNER 0x0011
|
||||||
|
#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 0x0012
|
||||||
|
#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 0x0013
|
||||||
|
#define GLUT_CURSOR_INHERIT 0x0064
|
||||||
|
#define GLUT_CURSOR_NONE 0x0065
|
||||||
|
#define GLUT_CURSOR_FULL_CROSSHAIR 0x0066
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- RGB color component specification definitions
|
||||||
|
*/
|
||||||
|
#define GLUT_RED 0x0000
|
||||||
|
#define GLUT_GREEN 0x0001
|
||||||
|
#define GLUT_BLUE 0x0002
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- additional keyboard and joystick definitions
|
||||||
|
*/
|
||||||
|
#define GLUT_KEY_REPEAT_OFF 0x0000
|
||||||
|
#define GLUT_KEY_REPEAT_ON 0x0001
|
||||||
|
#define GLUT_KEY_REPEAT_DEFAULT 0x0002
|
||||||
|
|
||||||
|
#define GLUT_JOYSTICK_BUTTON_A 0x0001
|
||||||
|
#define GLUT_JOYSTICK_BUTTON_B 0x0002
|
||||||
|
#define GLUT_JOYSTICK_BUTTON_C 0x0004
|
||||||
|
#define GLUT_JOYSTICK_BUTTON_D 0x0008
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLUT API macro definitions -- game mode definitions
|
||||||
|
*/
|
||||||
|
#define GLUT_GAME_MODE_ACTIVE 0x0000
|
||||||
|
#define GLUT_GAME_MODE_POSSIBLE 0x0001
|
||||||
|
#define GLUT_GAME_MODE_WIDTH 0x0002
|
||||||
|
#define GLUT_GAME_MODE_HEIGHT 0x0003
|
||||||
|
#define GLUT_GAME_MODE_PIXEL_DEPTH 0x0004
|
||||||
|
#define GLUT_GAME_MODE_REFRESH_RATE 0x0005
|
||||||
|
#define GLUT_GAME_MODE_DISPLAY_CHANGED 0x0006
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialization functions, see fglut_init.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutInit( int* pargc, char** argv );
|
||||||
|
FGAPI void FGAPIENTRY glutInitWindowPosition( int x, int y );
|
||||||
|
FGAPI void FGAPIENTRY glutInitWindowSize( int width, int height );
|
||||||
|
FGAPI void FGAPIENTRY glutInitDisplayMode( unsigned int displayMode );
|
||||||
|
FGAPI void FGAPIENTRY glutInitDisplayString( const char* displayMode );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Process loop function, see fg_main.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutMainLoop( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Window management functions, see fg_window.c
|
||||||
|
*/
|
||||||
|
FGAPI int FGAPIENTRY glutCreateWindow( const char* title );
|
||||||
|
FGAPI int FGAPIENTRY glutCreateSubWindow( int window, int x, int y, int width, int height );
|
||||||
|
FGAPI void FGAPIENTRY glutDestroyWindow( int window );
|
||||||
|
FGAPI void FGAPIENTRY glutSetWindow( int window );
|
||||||
|
FGAPI int FGAPIENTRY glutGetWindow( void );
|
||||||
|
FGAPI void FGAPIENTRY glutSetWindowTitle( const char* title );
|
||||||
|
FGAPI void FGAPIENTRY glutSetIconTitle( const char* title );
|
||||||
|
FGAPI void FGAPIENTRY glutReshapeWindow( int width, int height );
|
||||||
|
FGAPI void FGAPIENTRY glutPositionWindow( int x, int y );
|
||||||
|
FGAPI void FGAPIENTRY glutShowWindow( void );
|
||||||
|
FGAPI void FGAPIENTRY glutHideWindow( void );
|
||||||
|
FGAPI void FGAPIENTRY glutIconifyWindow( void );
|
||||||
|
FGAPI void FGAPIENTRY glutPushWindow( void );
|
||||||
|
FGAPI void FGAPIENTRY glutPopWindow( void );
|
||||||
|
FGAPI void FGAPIENTRY glutFullScreen( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Display-related functions, see fg_display.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutPostWindowRedisplay( int window );
|
||||||
|
FGAPI void FGAPIENTRY glutPostRedisplay( void );
|
||||||
|
FGAPI void FGAPIENTRY glutSwapBuffers( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mouse cursor functions, see fg_cursor.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutWarpPointer( int x, int y );
|
||||||
|
FGAPI void FGAPIENTRY glutSetCursor( int cursor );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Overlay stuff, see fg_overlay.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutEstablishOverlay( void );
|
||||||
|
FGAPI void FGAPIENTRY glutRemoveOverlay( void );
|
||||||
|
FGAPI void FGAPIENTRY glutUseLayer( GLenum layer );
|
||||||
|
FGAPI void FGAPIENTRY glutPostOverlayRedisplay( void );
|
||||||
|
FGAPI void FGAPIENTRY glutPostWindowOverlayRedisplay( int window );
|
||||||
|
FGAPI void FGAPIENTRY glutShowOverlay( void );
|
||||||
|
FGAPI void FGAPIENTRY glutHideOverlay( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Menu stuff, see fg_menu.c
|
||||||
|
*/
|
||||||
|
FGAPI int FGAPIENTRY glutCreateMenu( void (* callback)( int menu ) );
|
||||||
|
FGAPI void FGAPIENTRY glutDestroyMenu( int menu );
|
||||||
|
FGAPI int FGAPIENTRY glutGetMenu( void );
|
||||||
|
FGAPI void FGAPIENTRY glutSetMenu( int menu );
|
||||||
|
FGAPI void FGAPIENTRY glutAddMenuEntry( const char* label, int value );
|
||||||
|
FGAPI void FGAPIENTRY glutAddSubMenu( const char* label, int subMenu );
|
||||||
|
FGAPI void FGAPIENTRY glutChangeToMenuEntry( int item, const char* label, int value );
|
||||||
|
FGAPI void FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int value );
|
||||||
|
FGAPI void FGAPIENTRY glutRemoveMenuItem( int item );
|
||||||
|
FGAPI void FGAPIENTRY glutAttachMenu( int button );
|
||||||
|
FGAPI void FGAPIENTRY glutDetachMenu( int button );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Global callback functions, see fg_callbacks.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutTimerFunc( unsigned int time, void (* callback)( int ), int value );
|
||||||
|
FGAPI void FGAPIENTRY glutIdleFunc( void (* callback)( void ) );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Window-specific callback functions, see fg_callbacks.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutKeyboardFunc( void (* callback)( unsigned char, int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) );
|
||||||
|
FGAPI void FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutEntryFunc( void (* callback)( int ) );
|
||||||
|
|
||||||
|
FGAPI void FGAPIENTRY glutKeyboardUpFunc( void (* callback)( unsigned char, int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutJoystickFunc( void (* callback)( unsigned int, int, int, int ), int pollInterval );
|
||||||
|
FGAPI void FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutMenuStatusFunc( void (* callback)( int, int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutOverlayDisplayFunc( void (* callback)( void ) );
|
||||||
|
FGAPI void FGAPIENTRY glutWindowStatusFunc( void (* callback)( int ) );
|
||||||
|
|
||||||
|
FGAPI void FGAPIENTRY glutSpaceballMotionFunc( void (* callback)( int, int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutSpaceballRotateFunc( void (* callback)( int, int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutSpaceballButtonFunc( void (* callback)( int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutButtonBoxFunc( void (* callback)( int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutDialsFunc( void (* callback)( int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) );
|
||||||
|
FGAPI void FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* State setting and retrieval functions, see fg_state.c
|
||||||
|
*/
|
||||||
|
FGAPI int FGAPIENTRY glutGet( GLenum query );
|
||||||
|
FGAPI int FGAPIENTRY glutDeviceGet( GLenum query );
|
||||||
|
FGAPI int FGAPIENTRY glutGetModifiers( void );
|
||||||
|
FGAPI int FGAPIENTRY glutLayerGet( GLenum query );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Font stuff, see fg_font.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutBitmapCharacter( void* font, int character );
|
||||||
|
FGAPI int FGAPIENTRY glutBitmapWidth( void* font, int character );
|
||||||
|
FGAPI void FGAPIENTRY glutStrokeCharacter( void* font, int character );
|
||||||
|
FGAPI int FGAPIENTRY glutStrokeWidth( void* font, int character );
|
||||||
|
FGAPI GLfloat FGAPIENTRY glutStrokeWidthf( void* font, int character ); /* GLUT 3.8 */
|
||||||
|
FGAPI int FGAPIENTRY glutBitmapLength( void* font, const unsigned char* string );
|
||||||
|
FGAPI int FGAPIENTRY glutStrokeLength( void* font, const unsigned char* string );
|
||||||
|
FGAPI GLfloat FGAPIENTRY glutStrokeLengthf( void* font, const unsigned char *string ); /* GLUT 3.8 */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Geometry functions, see fg_geometry.c
|
||||||
|
*/
|
||||||
|
|
||||||
|
FGAPI void FGAPIENTRY glutWireCube( double size );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidCube( double size );
|
||||||
|
FGAPI void FGAPIENTRY glutWireSphere( double radius, GLint slices, GLint stacks );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidSphere( double radius, GLint slices, GLint stacks );
|
||||||
|
FGAPI void FGAPIENTRY glutWireCone( double base, double height, GLint slices, GLint stacks );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidCone( double base, double height, GLint slices, GLint stacks );
|
||||||
|
FGAPI void FGAPIENTRY glutWireTorus( double innerRadius, double outerRadius, GLint sides, GLint rings );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidTorus( double innerRadius, double outerRadius, GLint sides, GLint rings );
|
||||||
|
FGAPI void FGAPIENTRY glutWireDodecahedron( void );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidDodecahedron( void );
|
||||||
|
FGAPI void FGAPIENTRY glutWireOctahedron( void );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidOctahedron( void );
|
||||||
|
FGAPI void FGAPIENTRY glutWireTetrahedron( void );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidTetrahedron( void );
|
||||||
|
FGAPI void FGAPIENTRY glutWireIcosahedron( void );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidIcosahedron( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Teapot rendering functions, found in fg_teapot.c
|
||||||
|
* NB: front facing polygons have clockwise winding, not counter clockwise
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutWireTeapot( double size );
|
||||||
|
FGAPI void FGAPIENTRY glutSolidTeapot( double size );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Game mode functions, see fg_gamemode.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutGameModeString( const char* string );
|
||||||
|
FGAPI int FGAPIENTRY glutEnterGameMode( void );
|
||||||
|
FGAPI void FGAPIENTRY glutLeaveGameMode( void );
|
||||||
|
FGAPI int FGAPIENTRY glutGameModeGet( GLenum query );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Video resize functions, see fg_videoresize.c
|
||||||
|
*/
|
||||||
|
FGAPI int FGAPIENTRY glutVideoResizeGet( GLenum query );
|
||||||
|
FGAPI void FGAPIENTRY glutSetupVideoResizing( void );
|
||||||
|
FGAPI void FGAPIENTRY glutStopVideoResizing( void );
|
||||||
|
FGAPI void FGAPIENTRY glutVideoResize( int x, int y, int width, int height );
|
||||||
|
FGAPI void FGAPIENTRY glutVideoPan( int x, int y, int width, int height );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Colormap functions, see fg_misc.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutSetColor( int color, GLfloat red, GLfloat green, GLfloat blue );
|
||||||
|
FGAPI GLfloat FGAPIENTRY glutGetColor( int color, int component );
|
||||||
|
FGAPI void FGAPIENTRY glutCopyColormap( int window );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Misc keyboard and joystick functions, see fg_misc.c
|
||||||
|
*/
|
||||||
|
FGAPI void FGAPIENTRY glutIgnoreKeyRepeat( int ignore );
|
||||||
|
FGAPI void FGAPIENTRY glutSetKeyRepeat( int repeatMode );
|
||||||
|
FGAPI void FGAPIENTRY glutForceJoystickFunc( void );
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Misc functions, see fg_misc.c
|
||||||
|
*/
|
||||||
|
FGAPI int FGAPIENTRY glutExtensionSupported( const char* extension );
|
||||||
|
FGAPI void FGAPIENTRY glutReportErrors( void );
|
||||||
|
|
||||||
|
/* Comment from glut.h of classic GLUT:
|
||||||
|
|
||||||
|
Win32 has an annoying issue where there are multiple C run-time
|
||||||
|
libraries (CRTs). If the executable is linked with a different CRT
|
||||||
|
from the GLUT DLL, the GLUT DLL will not share the same CRT static
|
||||||
|
data seen by the executable. In particular, atexit callbacks registered
|
||||||
|
in the executable will not be called if GLUT calls its (different)
|
||||||
|
exit routine). GLUT is typically built with the
|
||||||
|
"/MD" option (the CRT with multithreading DLL support), but the Visual
|
||||||
|
C++ linker default is "/ML" (the single threaded CRT).
|
||||||
|
|
||||||
|
One workaround to this issue is requiring users to always link with
|
||||||
|
the same CRT as GLUT is compiled with. That requires users supply a
|
||||||
|
non-standard option. GLUT 3.7 has its own built-in workaround where
|
||||||
|
the executable's "exit" function pointer is covertly passed to GLUT.
|
||||||
|
GLUT then calls the executable's exit function pointer to ensure that
|
||||||
|
any "atexit" calls registered by the application are called if GLUT
|
||||||
|
needs to exit.
|
||||||
|
|
||||||
|
Note that the __glut*WithExit routines should NEVER be called directly.
|
||||||
|
To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */
|
||||||
|
|
||||||
|
/* to get the prototype for exit() */
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) && !defined(__WATCOMC__)
|
||||||
|
FGAPI void FGAPIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int));
|
||||||
|
FGAPI int FGAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int));
|
||||||
|
FGAPI int FGAPIENTRY __glutCreateMenuWithExit(void (* func)(int), void (__cdecl *exitfunc)(int));
|
||||||
|
#ifndef FREEGLUT_BUILDING_LIB
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#define FGUNUSED __attribute__((unused))
|
||||||
|
#else
|
||||||
|
#define FGUNUSED
|
||||||
|
#endif
|
||||||
|
static void FGAPIENTRY FGUNUSED glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }
|
||||||
|
#define glutInit glutInit_ATEXIT_HACK
|
||||||
|
static int FGAPIENTRY FGUNUSED glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }
|
||||||
|
#define glutCreateWindow glutCreateWindow_ATEXIT_HACK
|
||||||
|
static int FGAPIENTRY FGUNUSED glutCreateMenu_ATEXIT_HACK(void (* func)(int)) { return __glutCreateMenuWithExit(func, exit); }
|
||||||
|
#define glutCreateMenu glutCreateMenu_ATEXIT_HACK
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*** END OF FILE ***/
|
||||||
|
|
||||||
|
#endif /* __FREEGLUT_STD_H__ */
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#ifndef __GLUT_H__
|
||||||
|
#define __GLUT_H__
|
||||||
|
|
||||||
|
/*
|
||||||
|
* glut.h
|
||||||
|
*
|
||||||
|
* The freeglut library include file
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||||
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "freeglut_std.h"
|
||||||
|
|
||||||
|
/*** END OF FILE ***/
|
||||||
|
|
||||||
|
#endif /* __GLUT_H__ */
|
||||||
Binary file not shown.
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@@ -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
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||||
@@ -0,0 +1,509 @@
|
|||||||
|
# This file uses centimeters as units for non-parametric coordinates.
|
||||||
|
|
||||||
|
mtllib DragonWall1.mtl
|
||||||
|
g default
|
||||||
|
v 31.479097 0.032439 -6.902821
|
||||||
|
v -31.479097 0.032439 -6.902821
|
||||||
|
v 31.479097 37.811227 -7.156591
|
||||||
|
v -31.479097 37.811227 -7.156591
|
||||||
|
v 31.479097 37.755655 4.670846
|
||||||
|
v -31.479097 37.765894 2.489812
|
||||||
|
v 33.071286 -0.014894 3.168986
|
||||||
|
v -31.479097 -0.027298 5.808684
|
||||||
|
v 0.000000 18.856953 6.775930
|
||||||
|
v 0.000000 37.743745 6.815244
|
||||||
|
v -0.000000 -0.032441 6.902821
|
||||||
|
v 31.479097 18.856953 6.775930
|
||||||
|
v 31.479097 19.806234 -7.035645
|
||||||
|
v -31.479097 19.806234 -7.035645
|
||||||
|
v -33.219027 18.856953 6.775930
|
||||||
|
v 15.739548 37.746344 6.649046
|
||||||
|
v 15.739548 28.301650 6.712488
|
||||||
|
v 15.739548 9.412260 6.839373
|
||||||
|
v 15.739548 -0.016573 3.526865
|
||||||
|
v 15.739548 18.854960 8.669850
|
||||||
|
v -15.739548 37.744744 6.751334
|
||||||
|
v -15.739548 28.294204 8.320270
|
||||||
|
v -15.739548 18.850288 7.202108
|
||||||
|
v -15.739548 9.405386 7.278817
|
||||||
|
v -15.739548 -0.022680 6.278613
|
||||||
|
v 33.762048 28.317519 3.336535
|
||||||
|
v 0.000000 28.303989 9.058642
|
||||||
|
v -31.479097 28.301650 6.712488
|
||||||
|
v -31.479097 9.415253 6.202581
|
||||||
|
v 0.000000 9.409420 9.521046
|
||||||
|
v 32.843955 9.428125 3.463421
|
||||||
|
v -7.869774 23.581444 7.644574
|
||||||
|
v 7.869774 23.573183 9.630958
|
||||||
|
v 7.869774 14.131984 8.590231
|
||||||
|
v -7.869774 14.108179 8.497199
|
||||||
|
v -23.609324 4.689909 6.871096
|
||||||
|
v -23.609324 14.127120 9.157310
|
||||||
|
v -23.609324 23.559216 8.028686
|
||||||
|
v -23.609324 33.005188 8.902707
|
||||||
|
v -7.869774 33.026725 6.506093
|
||||||
|
v 7.869774 33.018276 7.046262
|
||||||
|
v 23.609324 33.028606 6.385878
|
||||||
|
v 23.609324 23.583752 6.460023
|
||||||
|
v 23.609324 14.134605 6.807655
|
||||||
|
v 23.609324 4.714278 5.313189
|
||||||
|
v 7.869774 4.689909 6.871096
|
||||||
|
v -7.869774 4.679063 9.179434
|
||||||
|
v 34.217941 19.089080 3.398532
|
||||||
|
v -34.325875 33.612990 -1.033724
|
||||||
|
v -31.479097 28.808740 -7.096119
|
||||||
|
v -31.479097 23.952114 -0.326363
|
||||||
|
v -31.479097 14.375229 -0.116500
|
||||||
|
v -31.479097 9.919341 -6.969232
|
||||||
|
v -33.938226 5.088499 0.159210
|
||||||
|
v 34.829148 32.894605 -1.722389
|
||||||
|
v 31.479097 28.808740 -7.096119
|
||||||
|
v 31.479097 24.009146 -1.913821
|
||||||
|
v 32.610234 14.557205 -1.725438
|
||||||
|
v 31.479097 9.919341 -6.969232
|
||||||
|
v 33.671430 5.250531 -1.145710
|
||||||
|
v 7.869774 37.746344 6.649046
|
||||||
|
v 7.869774 28.272630 9.815706
|
||||||
|
v 7.869774 18.875384 6.480806
|
||||||
|
v 7.869774 9.403860 8.626516
|
||||||
|
v 7.869774 -0.024507 5.214843
|
||||||
|
v 23.261588 37.750794 5.703650
|
||||||
|
v 24.750799 28.322892 4.173673
|
||||||
|
v 23.609324 18.851017 8.038712
|
||||||
|
v 24.291751 9.425791 4.793524
|
||||||
|
v 24.405418 -0.015655 3.342998
|
||||||
|
v -7.857922 37.746344 6.649046
|
||||||
|
v -7.869774 28.316095 7.602681
|
||||||
|
v -7.869774 18.846561 7.440290
|
||||||
|
v -7.869774 9.397081 9.059896
|
||||||
|
v -7.869774 -0.032441 6.902821
|
||||||
|
v -23.609324 -0.029871 6.355752
|
||||||
|
v -23.609324 9.412749 6.585387
|
||||||
|
v -24.479289 18.828812 8.575101
|
||||||
|
v -23.609324 28.268887 9.373000
|
||||||
|
v -23.609324 37.756119 4.569429
|
||||||
|
v -31.479097 33.033772 4.601150
|
||||||
|
v -15.739548 33.017513 7.661214
|
||||||
|
v 0.000000 33.011427 8.732246
|
||||||
|
v 15.739548 33.023997 6.680767
|
||||||
|
v 32.620573 33.036587 4.003690
|
||||||
|
v 32.620573 23.587235 5.056233
|
||||||
|
v 15.739548 23.576169 7.827765
|
||||||
|
v 0.000000 23.575834 8.213789
|
||||||
|
v -15.739548 23.575492 7.553615
|
||||||
|
v -32.349062 23.579301 6.744209
|
||||||
|
v -32.349062 14.136103 6.489256
|
||||||
|
v -15.739548 14.117970 7.871304
|
||||||
|
v 0.000000 14.129481 8.385483
|
||||||
|
v 15.739548 14.131662 7.879160
|
||||||
|
v 32.161526 14.142540 5.119675
|
||||||
|
v 32.957620 4.706616 3.316203
|
||||||
|
v 15.739548 4.697844 5.183119
|
||||||
|
v 0.000000 4.685021 8.433733
|
||||||
|
v -15.739548 4.708207 5.701237
|
||||||
|
v -31.479097 4.693977 6.005632
|
||||||
|
vt 0.003508 0.474197
|
||||||
|
vt 0.003720 0.304675
|
||||||
|
vt 0.173029 0.474409
|
||||||
|
vt 0.173241 0.304887
|
||||||
|
vt 0.190029 0.096736
|
||||||
|
vt 0.173010 0.823395
|
||||||
|
vt 0.002961 0.827333
|
||||||
|
vt 0.991265 0.897972
|
||||||
|
vt 0.002961 0.996854
|
||||||
|
vt 0.172483 0.996854
|
||||||
|
vt 0.003932 0.135154
|
||||||
|
vt 0.173453 0.135366
|
||||||
|
vt 0.003296 0.643718
|
||||||
|
vt 0.172818 0.643930
|
||||||
|
vt 0.590647 0.497354
|
||||||
|
vt 0.590647 0.096736
|
||||||
|
vt 0.590647 0.897972
|
||||||
|
vt 0.088057 0.643824
|
||||||
|
vt 0.190029 0.497354
|
||||||
|
vt 0.092237 0.474308
|
||||||
|
vt 0.092449 0.304786
|
||||||
|
vt 0.991265 0.497354
|
||||||
|
vt 0.088693 0.135260
|
||||||
|
vt 0.390338 0.096736
|
||||||
|
vt 0.390338 0.297045
|
||||||
|
vt 0.390338 0.697663
|
||||||
|
vt 0.390338 0.897972
|
||||||
|
vt 0.390338 0.497354
|
||||||
|
vt 0.790956 0.096736
|
||||||
|
vt 0.790956 0.297045
|
||||||
|
vt 0.790956 0.497354
|
||||||
|
vt 0.790956 0.697663
|
||||||
|
vt 0.790956 0.897972
|
||||||
|
vt 0.130437 0.643877
|
||||||
|
vt 0.190029 0.297045
|
||||||
|
vt 0.590647 0.297045
|
||||||
|
vt 0.991265 0.297045
|
||||||
|
vt 0.131073 0.135313
|
||||||
|
vt 0.991265 0.697663
|
||||||
|
vt 0.046312 0.135207
|
||||||
|
vt 0.590647 0.697663
|
||||||
|
vt 0.045677 0.643771
|
||||||
|
vt 0.190029 0.697663
|
||||||
|
vt 0.690802 0.397199
|
||||||
|
vt 0.490493 0.397199
|
||||||
|
vt 0.490493 0.597508
|
||||||
|
vt 0.690802 0.597508
|
||||||
|
vt 0.891111 0.797817
|
||||||
|
vt 0.891111 0.597508
|
||||||
|
vt 0.891111 0.397199
|
||||||
|
vt 0.891111 0.196890
|
||||||
|
vt 0.690802 0.196890
|
||||||
|
vt 0.490493 0.196890
|
||||||
|
vt 0.290184 0.196890
|
||||||
|
vt 0.290184 0.397199
|
||||||
|
vt 0.290184 0.597508
|
||||||
|
vt 0.290184 0.797817
|
||||||
|
vt 0.490493 0.797817
|
||||||
|
vt 0.690802 0.797817
|
||||||
|
vt 0.089079 0.602372
|
||||||
|
vt 0.154625 0.230024
|
||||||
|
vt 0.132845 0.304837
|
||||||
|
vt 0.111298 0.222081
|
||||||
|
vt 0.068335 0.216153
|
||||||
|
vt 0.048085 0.304731
|
||||||
|
vt 0.026672 0.213355
|
||||||
|
vt 0.150972 0.562173
|
||||||
|
vt 0.132633 0.474358
|
||||||
|
vt 0.111101 0.558042
|
||||||
|
vt 0.068688 0.560019
|
||||||
|
vt 0.047873 0.474252
|
||||||
|
vt 0.026927 0.568374
|
||||||
|
vt 0.130103 0.827333
|
||||||
|
vt 0.172483 0.827333
|
||||||
|
vt 0.045342 0.827333
|
||||||
|
vt 0.087722 0.827333
|
||||||
|
vt 0.190029 0.897972
|
||||||
|
vt 0.130629 0.823395
|
||||||
|
vt 0.991265 0.096736
|
||||||
|
vt 0.045869 0.823395
|
||||||
|
vt 0.088249 0.823395
|
||||||
|
vt 0.003488 0.823395
|
||||||
|
vt 0.003488 0.653873
|
||||||
|
vt 0.173010 0.653873
|
||||||
|
vt 0.490493 0.096736
|
||||||
|
vt 0.067059 0.823395
|
||||||
|
vt 0.490493 0.297045
|
||||||
|
vt 0.490493 0.497354
|
||||||
|
vt 0.490493 0.697663
|
||||||
|
vt 0.066532 0.827333
|
||||||
|
vt 0.490493 0.897972
|
||||||
|
vt 0.294609 0.096736
|
||||||
|
vt 0.025615 0.823395
|
||||||
|
vt 0.290184 0.297045
|
||||||
|
vt 0.290184 0.497354
|
||||||
|
vt 0.290184 0.697663
|
||||||
|
vt 0.024152 0.827333
|
||||||
|
vt 0.290184 0.897972
|
||||||
|
vt 0.690651 0.096736
|
||||||
|
vt 0.109407 0.823395
|
||||||
|
vt 0.690802 0.297045
|
||||||
|
vt 0.690802 0.497354
|
||||||
|
vt 0.690802 0.697663
|
||||||
|
vt 0.108912 0.827333
|
||||||
|
vt 0.690802 0.897972
|
||||||
|
vt 0.151293 0.827333
|
||||||
|
vt 0.891111 0.897972
|
||||||
|
vt 0.891111 0.697663
|
||||||
|
vt 0.891111 0.497354
|
||||||
|
vt 0.891111 0.297045
|
||||||
|
vt 0.891111 0.096736
|
||||||
|
vt 0.151820 0.823395
|
||||||
|
vt 0.991265 0.196890
|
||||||
|
vt 0.152263 0.135340
|
||||||
|
vt 0.790956 0.196890
|
||||||
|
vt 0.590647 0.196890
|
||||||
|
vt 0.390338 0.196890
|
||||||
|
vt 0.151627 0.643904
|
||||||
|
vt 0.190029 0.196890
|
||||||
|
vt 0.109247 0.643851
|
||||||
|
vt 0.190029 0.397199
|
||||||
|
vt 0.390338 0.397199
|
||||||
|
vt 0.590647 0.397199
|
||||||
|
vt 0.790956 0.397199
|
||||||
|
vt 0.991265 0.397199
|
||||||
|
vt 0.109883 0.135287
|
||||||
|
vt 0.991265 0.597508
|
||||||
|
vt 0.067502 0.135234
|
||||||
|
vt 0.790956 0.597508
|
||||||
|
vt 0.590647 0.597508
|
||||||
|
vt 0.390338 0.597508
|
||||||
|
vt 0.066867 0.643798
|
||||||
|
vt 0.190029 0.597508
|
||||||
|
vt 0.024486 0.643745
|
||||||
|
vt 0.190029 0.797817
|
||||||
|
vt 0.390338 0.797817
|
||||||
|
vt 0.590647 0.797817
|
||||||
|
vt 0.790956 0.797817
|
||||||
|
vt 0.991265 0.797817
|
||||||
|
vt 0.025122 0.135181
|
||||||
|
vn 0.020668 -0.006359 -0.999766
|
||||||
|
vn -0.027113 -0.006730 -0.999610
|
||||||
|
vn -0.029610 -0.008886 -0.999522
|
||||||
|
vn -0.018928 0.582161 -0.812853
|
||||||
|
vn 0.018016 0.582415 -0.812692
|
||||||
|
vn 0.023788 -0.008855 -0.999678
|
||||||
|
vn -0.035951 0.998946 0.028539
|
||||||
|
vn -0.005927 0.999621 0.026889
|
||||||
|
vn -0.001724 0.998900 0.046871
|
||||||
|
vn -0.000099 0.999594 0.028507
|
||||||
|
vn -0.001066 0.999450 0.033146
|
||||||
|
vn 0.000239 0.999616 0.027720
|
||||||
|
vn 0.001383 0.999481 0.032180
|
||||||
|
vn 0.002838 0.999623 0.027315
|
||||||
|
vn 0.023608 0.999075 0.035929
|
||||||
|
vn 0.321404 0.009046 0.946899
|
||||||
|
vn 0.110315 0.035313 0.993269
|
||||||
|
vn 0.162658 -0.287097 0.943990
|
||||||
|
vn 0.033801 -0.998996 0.029409
|
||||||
|
vn 0.000533 -0.999771 0.021368
|
||||||
|
vn 0.002117 -0.999772 0.021246
|
||||||
|
vn 0.005055 -0.999808 0.018948
|
||||||
|
vn 0.004850 -0.999488 0.031631
|
||||||
|
vn -0.001233 -0.999714 0.023866
|
||||||
|
vn -0.005046 -0.999505 0.031049
|
||||||
|
vn -0.000854 -0.999738 0.022885
|
||||||
|
vn -0.035927 -0.998989 0.027020
|
||||||
|
vn -0.024015 -0.532076 -0.846356
|
||||||
|
vn 0.019313 -0.540765 -0.840952
|
||||||
|
vn -0.991482 -0.122312 -0.044749
|
||||||
|
vn -0.897928 0.012500 0.439965
|
||||||
|
vn -0.894575 0.167584 0.414309
|
||||||
|
vn -0.801506 0.141204 0.581076
|
||||||
|
vn 0.989720 0.036899 -0.138174
|
||||||
|
vn 0.165553 -0.113456 0.979653
|
||||||
|
vn -0.058512 0.164315 0.984671
|
||||||
|
vn 0.042469 0.059133 0.997346
|
||||||
|
vn 0.045935 0.008850 0.998905
|
||||||
|
vn 0.106547 -0.157211 0.981801
|
||||||
|
vn -0.026154 -0.085747 0.995974
|
||||||
|
vn -0.103022 0.084266 0.991103
|
||||||
|
vn -0.049959 0.130769 0.990153
|
||||||
|
vn -0.136659 0.069647 0.988167
|
||||||
|
vn 0.049676 -0.020355 0.998558
|
||||||
|
vn 0.991902 -0.032619 0.122745
|
||||||
|
vn 0.983991 0.037132 -0.174309
|
||||||
|
vn -0.030035 -0.005291 -0.999535
|
||||||
|
vn 0.024103 -0.006156 -0.999691
|
||||||
|
vn -0.994879 0.090637 -0.044724
|
||||||
|
vn -0.832236 -0.103331 0.544707
|
||||||
|
vn -0.900561 -0.189709 0.391152
|
||||||
|
vn 0.205618 0.141269 0.968382
|
||||||
|
vn 0.114354 0.198929 0.973319
|
||||||
|
vn 0.033116 -0.190324 0.981163
|
||||||
|
vn 0.015462 0.158566 0.987227
|
||||||
|
vn 0.110222 -0.188450 0.975878
|
||||||
|
vn 0.014253 -0.046187 0.998831
|
||||||
|
vn 0.156558 -0.170027 0.972924
|
||||||
|
vn 0.161772 -0.255237 0.953249
|
||||||
|
vn 0.166367 0.319661 0.932812
|
||||||
|
vn 0.194003 0.199631 0.960474
|
||||||
|
vn 0.024099 -0.115882 0.992971
|
||||||
|
vn -0.143572 0.288295 0.946717
|
||||||
|
vn -0.038624 0.118202 0.992238
|
||||||
|
vn -0.066326 -0.069376 0.995383
|
||||||
|
vn -0.037925 -0.104006 0.993853
|
||||||
|
vn -0.013212 -0.055146 0.998391
|
||||||
|
vn 0.716275 0.075177 0.693757
|
||||||
|
vn -0.030135 0.181445 0.982939
|
||||||
|
vn 0.128242 0.267820 0.954896
|
||||||
|
vn -0.041887 0.145090 0.988531
|
||||||
|
vn -0.711577 0.286281 0.641640
|
||||||
|
vn -0.701297 -0.029712 0.712249
|
||||||
|
vn 0.139225 -0.261755 0.955040
|
||||||
|
vn -0.104466 -0.180682 0.977978
|
||||||
|
vn 0.189812 -0.320573 0.928011
|
||||||
|
vn 0.712014 -0.004752 0.702150
|
||||||
|
vn 0.508499 -0.218956 0.832759
|
||||||
|
vn 0.476244 0.196654 0.857041
|
||||||
|
vn -0.001261 -0.032857 0.999459
|
||||||
|
vn 0.028390 0.094182 0.995150
|
||||||
|
vn -0.123244 -0.237082 0.963641
|
||||||
|
vn -0.076397 -0.099868 0.992063
|
||||||
|
vn -0.006115 0.280804 0.959746
|
||||||
|
vn -0.112554 -0.075206 0.990795
|
||||||
|
vn -0.064545 -0.230261 0.970986
|
||||||
|
vn -0.081762 -0.070291 0.994170
|
||||||
|
vn 0.148438 0.162087 0.975548
|
||||||
|
vn 0.041915 0.006711 0.999099
|
||||||
|
vn 0.895551 0.046444 0.442529
|
||||||
|
vn 0.142393 0.007242 0.989784
|
||||||
|
vn 0.852500 -0.090421 0.514847
|
||||||
|
vn 0.178792 -0.150608 0.972291
|
||||||
|
vn 0.093487 -0.330005 0.939338
|
||||||
|
vn 0.990864 -0.012272 -0.134309
|
||||||
|
vn 0.965078 -0.124817 -0.230316
|
||||||
|
vn -0.998266 -0.058861 -0.000783
|
||||||
|
vn -0.999945 0.007754 0.007012
|
||||||
|
vn 0.100111 -0.010887 0.994917
|
||||||
|
vn -0.125087 -0.227456 0.965721
|
||||||
|
s 1
|
||||||
|
g pCube1
|
||||||
|
usemtl lambert2SG
|
||||||
|
f 13/20/1 14/21/2 50/62/3 4/4/4 3/3/5 56/68/6
|
||||||
|
f 3/83/5 4/84/4 6/6/7 80/112/8 21/78/9 71/100/10 10/81/11 61/86/12 16/80/13 66/93/14 5/82/15
|
||||||
|
f 12/19/16 68/95/17 44/56/18
|
||||||
|
f 7/7/19 70/97/20 19/75/21 65/90/22 11/76/23 75/104/24 25/73/25 76/106/26 8/74/27 2/10/28 1/9/29
|
||||||
|
f 51/63/30 15/23/31 90/126/32 28/38/33
|
||||||
|
f 5/14/15 55/67/34 3/3/5
|
||||||
|
f 5/5/15 66/92/14 42/54/35
|
||||||
|
f 35/47/36 23/31/37 92/129/38
|
||||||
|
f 7/77/19 45/57/39 70/98/20
|
||||||
|
f 32/44/40 27/36/41 72/101/42
|
||||||
|
f 35/47/36 74/103/43 30/41/44
|
||||||
|
f 48/60/45 58/70/46 13/20/1
|
||||||
|
f 1/1/29 2/2/28 53/65/47 14/21/2 13/20/1 59/71/48
|
||||||
|
f 15/23/31 52/64/49 29/40/50 91/128/51
|
||||||
|
f 17/25/52 62/87/53 33/45/54
|
||||||
|
f 34/46/55 94/131/56 20/28/57
|
||||||
|
f 34/46/55 64/89/58 18/26/59
|
||||||
|
f 12/19/16 43/55/60 68/95/17
|
||||||
|
f 33/45/54 20/28/57 87/122/61
|
||||||
|
f 23/31/37 32/44/40 89/124/62
|
||||||
|
f 39/51/63 80/111/8 6/79/7
|
||||||
|
f 78/109/64 38/50/65 15/22/31
|
||||||
|
f 37/49/66 78/109/64 15/22/31
|
||||||
|
f 76/107/26 36/48/67 8/8/27
|
||||||
|
f 5/5/15 42/54/35 85/119/68
|
||||||
|
f 83/116/69 41/53/70 10/16/11
|
||||||
|
f 40/52/71 83/116/69 10/16/11
|
||||||
|
f 81/113/72 39/51/63 6/79/7
|
||||||
|
f 36/48/67 100/139/73 8/8/27
|
||||||
|
f 11/17/23 98/137/74 47/59/75
|
||||||
|
f 11/17/23 46/58/76 98/137/74
|
||||||
|
f 96/135/77 45/57/39 7/77/19
|
||||||
|
f 19/27/21 46/58/76 65/91/22
|
||||||
|
f 12/19/16 44/56/18 95/133/78
|
||||||
|
f 86/121/79 43/55/60 12/19/16
|
||||||
|
f 41/53/70 16/24/13 61/85/12
|
||||||
|
f 71/99/10 40/52/71 10/16/11
|
||||||
|
f 15/22/31 38/50/65 90/125/32
|
||||||
|
f 91/127/51 37/49/66 15/22/31
|
||||||
|
f 11/17/23 47/59/75 75/105/24
|
||||||
|
f 9/15/80 32/44/40 73/102/81
|
||||||
|
f 9/15/80 88/123/82 32/44/40
|
||||||
|
f 33/45/54 88/123/82 9/15/80
|
||||||
|
f 33/45/54 63/88/83 20/28/57
|
||||||
|
f 34/46/55 20/28/57 63/88/83
|
||||||
|
f 93/130/84 34/46/55 9/15/80
|
||||||
|
f 35/47/36 93/130/84 9/15/80
|
||||||
|
f 9/15/80 73/102/81 35/47/36
|
||||||
|
f 25/33/25 99/138/85 36/48/67
|
||||||
|
f 36/48/67 77/108/86 29/39/50
|
||||||
|
f 77/108/86 37/49/66 29/39/50
|
||||||
|
f 37/49/66 92/129/38 23/31/37
|
||||||
|
f 23/31/37 89/124/62 38/50/65
|
||||||
|
f 28/37/33 38/50/65 79/110/87
|
||||||
|
f 28/37/33 79/110/87 39/51/63
|
||||||
|
f 39/51/63 82/115/88 21/29/9
|
||||||
|
f 82/115/88 40/52/71 21/29/9
|
||||||
|
f 40/52/71 72/101/42 27/36/41
|
||||||
|
f 17/25/52 41/53/70 62/87/53
|
||||||
|
f 41/53/70 84/117/89 16/24/13
|
||||||
|
f 42/54/35 16/24/13 84/117/89
|
||||||
|
f 26/35/90 42/54/35 67/94/91
|
||||||
|
f 26/35/90 67/94/91 43/55/60
|
||||||
|
f 20/28/57 43/55/60 87/122/61
|
||||||
|
f 44/56/18 20/28/57 94/131/56
|
||||||
|
f 31/43/92 44/56/18 69/96/93
|
||||||
|
f 31/43/92 69/96/93 45/57/39
|
||||||
|
f 19/27/21 45/57/39 97/136/94
|
||||||
|
f 19/27/21 97/136/94 46/58/76
|
||||||
|
f 64/89/58 46/58/76 18/26/59
|
||||||
|
f 47/59/75 30/41/44 74/103/43
|
||||||
|
f 25/33/25 47/59/75 99/138/85
|
||||||
|
f 55/67/34 56/68/6 3/3/5
|
||||||
|
f 12/18/16 48/60/45 26/34/90 86/120/79
|
||||||
|
f 31/42/92 48/60/45 12/18/16 95/132/78
|
||||||
|
f 7/13/19 1/1/29 60/72/95
|
||||||
|
f 58/70/46 59/71/48 13/20/1
|
||||||
|
f 57/69/96 48/60/45 13/20/1
|
||||||
|
f 50/62/3 51/63/30 28/38/33 49/61/97
|
||||||
|
f 54/66/98 8/11/27 100/140/73 29/40/50
|
||||||
|
f 53/65/47 54/66/98 29/40/50 52/64/49
|
||||||
|
f 6/12/7 49/61/97 28/38/33 81/114/72
|
||||||
|
f 4/4/4 49/61/97 6/12/7
|
||||||
|
f 50/62/3 49/61/97 4/4/4
|
||||||
|
f 14/21/2 51/63/30 50/62/3
|
||||||
|
f 14/21/2 15/23/31 51/63/30
|
||||||
|
f 14/21/2 52/64/49 15/23/31
|
||||||
|
f 53/65/47 52/64/49 14/21/2
|
||||||
|
f 2/2/28 54/66/98 53/65/47
|
||||||
|
f 2/2/28 8/11/27 54/66/98
|
||||||
|
f 26/34/90 55/67/34 5/14/15 85/118/68
|
||||||
|
f 56/68/6 57/69/96 13/20/1
|
||||||
|
f 26/34/90 57/69/96 56/68/6 55/67/34
|
||||||
|
f 26/34/90 48/60/45 57/69/96
|
||||||
|
f 31/42/92 58/70/46 48/60/45
|
||||||
|
f 59/71/48 60/72/95 1/1/29
|
||||||
|
f 31/42/92 60/72/95 59/71/48 58/70/46
|
||||||
|
f 7/13/19 60/72/95 31/42/92 96/134/77
|
||||||
|
f 41/53/70 61/85/12 10/16/11
|
||||||
|
f 62/87/53 41/53/70 27/36/41
|
||||||
|
f 33/45/54 62/87/53 27/36/41
|
||||||
|
f 9/15/80 63/88/83 33/45/54
|
||||||
|
f 34/46/55 63/88/83 9/15/80
|
||||||
|
f 30/41/44 64/89/58 34/46/55
|
||||||
|
f 30/41/44 46/58/76 64/89/58
|
||||||
|
f 65/91/22 46/58/76 11/17/23
|
||||||
|
f 42/54/35 66/92/14 16/24/13
|
||||||
|
f 67/94/91 42/54/35 17/25/52
|
||||||
|
f 43/55/60 67/94/91 17/25/52
|
||||||
|
f 68/95/17 43/55/60 20/28/57
|
||||||
|
f 44/56/18 68/95/17 20/28/57
|
||||||
|
f 69/96/93 44/56/18 18/26/59
|
||||||
|
f 45/57/39 69/96/93 18/26/59
|
||||||
|
f 70/98/20 45/57/39 19/27/21
|
||||||
|
f 21/29/9 40/52/71 71/99/10
|
||||||
|
f 22/30/99 72/101/42 40/52/71
|
||||||
|
f 32/44/40 72/101/42 22/30/99
|
||||||
|
f 73/102/81 32/44/40 23/31/37
|
||||||
|
f 35/47/36 73/102/81 23/31/37
|
||||||
|
f 24/32/100 74/103/43 35/47/36
|
||||||
|
f 47/59/75 74/103/43 24/32/100
|
||||||
|
f 75/105/24 47/59/75 25/33/25
|
||||||
|
f 25/33/25 36/48/67 76/107/26
|
||||||
|
f 24/32/100 77/108/86 36/48/67
|
||||||
|
f 24/32/100 37/49/66 77/108/86
|
||||||
|
f 37/49/66 23/31/37 78/109/64
|
||||||
|
f 23/31/37 38/50/65 78/109/64
|
||||||
|
f 79/110/87 38/50/65 22/30/99
|
||||||
|
f 39/51/63 79/110/87 22/30/99
|
||||||
|
f 39/51/63 21/29/9 80/111/8
|
||||||
|
f 28/37/33 39/51/63 81/113/72
|
||||||
|
f 22/30/99 82/115/88 39/51/63
|
||||||
|
f 22/30/99 40/52/71 82/115/88
|
||||||
|
f 40/52/71 27/36/41 83/116/69
|
||||||
|
f 27/36/41 41/53/70 83/116/69
|
||||||
|
f 17/25/52 84/117/89 41/53/70
|
||||||
|
f 42/54/35 84/117/89 17/25/52
|
||||||
|
f 85/119/68 42/54/35 26/35/90
|
||||||
|
f 26/35/90 43/55/60 86/121/79
|
||||||
|
f 87/122/61 43/55/60 17/25/52
|
||||||
|
f 33/45/54 87/122/61 17/25/52
|
||||||
|
f 33/45/54 27/36/41 88/123/82
|
||||||
|
f 32/44/40 88/123/82 27/36/41
|
||||||
|
f 89/124/62 32/44/40 22/30/99
|
||||||
|
f 38/50/65 89/124/62 22/30/99
|
||||||
|
f 90/125/32 38/50/65 28/37/33
|
||||||
|
f 29/39/50 37/49/66 91/127/51
|
||||||
|
f 24/32/100 92/129/38 37/49/66
|
||||||
|
f 35/47/36 92/129/38 24/32/100
|
||||||
|
f 35/47/36 30/41/44 93/130/84
|
||||||
|
f 30/41/44 34/46/55 93/130/84
|
||||||
|
f 18/26/59 94/131/56 34/46/55
|
||||||
|
f 44/56/18 94/131/56 18/26/59
|
||||||
|
f 95/133/78 44/56/18 31/43/92
|
||||||
|
f 31/43/92 45/57/39 96/135/77
|
||||||
|
f 97/136/94 45/57/39 18/26/59
|
||||||
|
f 46/58/76 97/136/94 18/26/59
|
||||||
|
f 98/137/74 46/58/76 30/41/44
|
||||||
|
f 47/59/75 98/137/74 30/41/44
|
||||||
|
f 99/138/85 47/59/75 24/32/100
|
||||||
|
f 36/48/67 99/138/85 24/32/100
|
||||||
|
f 36/48/67 29/39/50 100/139/73
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
@@ -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
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||||
@@ -0,0 +1,334 @@
|
|||||||
|
# This file uses centimeters as units for non-parametric coordinates.
|
||||||
|
|
||||||
|
mtllib Rock1.mtl
|
||||||
|
g default
|
||||||
|
v 25.733582 0.000000 12.384363
|
||||||
|
v 22.302742 0.000000 10.193544
|
||||||
|
v 18.732163 0.000000 10.102727
|
||||||
|
v 16.342887 0.000000 10.046599
|
||||||
|
v 15.181248 0.000000 14.677952
|
||||||
|
v 15.294976 0.000000 17.126427
|
||||||
|
v 16.467886 0.000000 18.708206
|
||||||
|
v 21.143785 0.000000 18.799023
|
||||||
|
v 24.342128 0.000000 18.673516
|
||||||
|
v 25.733582 0.000000 15.851380
|
||||||
|
v 25.733582 1.111030 12.496619
|
||||||
|
v 22.302742 1.111030 10.193544
|
||||||
|
v 18.791180 1.111030 10.102727
|
||||||
|
v 16.497394 1.111030 10.158855
|
||||||
|
v 15.372229 1.111030 14.677952
|
||||||
|
v 15.449483 1.111030 17.014171
|
||||||
|
v 16.526902 1.111030 18.526571
|
||||||
|
v 21.084769 1.111030 18.617388
|
||||||
|
v 24.342128 1.111030 18.561260
|
||||||
|
v 25.733582 1.111030 15.851380
|
||||||
|
v 24.255984 2.113304 12.652665
|
||||||
|
v 21.378030 2.113304 10.917908
|
||||||
|
v 18.962453 2.113304 10.693795
|
||||||
|
v 16.618637 2.113304 10.726192
|
||||||
|
v 16.042776 2.113304 14.677952
|
||||||
|
v 16.089888 2.113304 16.831580
|
||||||
|
v 19.224256 2.113304 17.948125
|
||||||
|
v 20.913496 2.113304 18.048940
|
||||||
|
v 23.017061 2.267616 17.647239
|
||||||
|
v 24.156958 2.267616 15.394028
|
||||||
|
v 21.793527 2.831559 13.329814
|
||||||
|
v 20.646732 2.831559 12.496619
|
||||||
|
v 18.767939 2.831559 12.297017
|
||||||
|
v 17.621145 2.831559 13.130212
|
||||||
|
v 17.183109 2.831559 14.478349
|
||||||
|
v 17.882949 2.831559 16.440047
|
||||||
|
v 19.491020 2.831559 17.472844
|
||||||
|
v 20.646732 2.831559 16.859284
|
||||||
|
v 22.145496 2.985870 16.026090
|
||||||
|
v 22.583532 2.985870 14.677952
|
||||||
|
v 20.913496 2.908714 13.969194
|
||||||
|
v 20.310590 2.908714 13.531157
|
||||||
|
v 19.104081 2.908714 13.331555
|
||||||
|
v 18.501176 2.908714 13.769591
|
||||||
|
v 18.270887 2.908714 14.478349
|
||||||
|
v 18.501176 2.908714 15.187107
|
||||||
|
v 19.565358 2.908714 15.824746
|
||||||
|
v 20.310591 2.908714 15.824746
|
||||||
|
v 20.913496 2.908714 15.386710
|
||||||
|
v 21.143785 2.908714 14.677952
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.100000 0.500000
|
||||||
|
vt 0.200000 0.500000
|
||||||
|
vt 0.300000 0.500000
|
||||||
|
vt 0.400000 0.500000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt 0.600000 0.500000
|
||||||
|
vt 0.700000 0.500000
|
||||||
|
vt 0.800000 0.500000
|
||||||
|
vt 0.900000 0.500000
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 0.000000 0.600000
|
||||||
|
vt 0.100000 0.600000
|
||||||
|
vt 0.200000 0.600000
|
||||||
|
vt 0.300000 0.600000
|
||||||
|
vt 0.400000 0.600000
|
||||||
|
vt 0.500000 0.600000
|
||||||
|
vt 0.600000 0.600000
|
||||||
|
vt 0.700000 0.600000
|
||||||
|
vt 0.800000 0.600000
|
||||||
|
vt 0.900000 0.600000
|
||||||
|
vt 1.000000 0.600000
|
||||||
|
vt 0.000000 0.700000
|
||||||
|
vt 0.100000 0.700000
|
||||||
|
vt 0.200000 0.700000
|
||||||
|
vt 0.300000 0.700000
|
||||||
|
vt 0.400000 0.700000
|
||||||
|
vt 0.500000 0.700000
|
||||||
|
vt 0.600000 0.700000
|
||||||
|
vt 0.700000 0.700000
|
||||||
|
vt 0.800000 0.700000
|
||||||
|
vt 0.900000 0.700000
|
||||||
|
vt 1.000000 0.700000
|
||||||
|
vt 0.000000 0.800000
|
||||||
|
vt 0.100000 0.800000
|
||||||
|
vt 0.200000 0.800000
|
||||||
|
vt 0.300000 0.800000
|
||||||
|
vt 0.400000 0.800000
|
||||||
|
vt 0.500000 0.800000
|
||||||
|
vt 0.600000 0.800000
|
||||||
|
vt 0.700000 0.800000
|
||||||
|
vt 0.800000 0.800000
|
||||||
|
vt 0.900000 0.800000
|
||||||
|
vt 1.000000 0.800000
|
||||||
|
vt 0.000000 0.900000
|
||||||
|
vt 0.100000 0.900000
|
||||||
|
vt 0.200000 0.900000
|
||||||
|
vt 0.300000 0.900000
|
||||||
|
vt 0.400000 0.900000
|
||||||
|
vt 0.500000 0.900000
|
||||||
|
vt 0.600000 0.900000
|
||||||
|
vt 0.700000 0.900000
|
||||||
|
vt 0.800000 0.900000
|
||||||
|
vt 0.900000 0.900000
|
||||||
|
vt 1.000000 0.900000
|
||||||
|
vn 0.547393 0.042224 -0.835810
|
||||||
|
vn 0.547393 0.042224 -0.835810
|
||||||
|
vn 0.547393 0.042224 -0.835810
|
||||||
|
vn 0.547393 0.042224 -0.835810
|
||||||
|
vn 0.025638 -0.000681 -0.999671
|
||||||
|
vn 0.025638 -0.000681 -0.999671
|
||||||
|
vn 0.025638 -0.000681 -0.999671
|
||||||
|
vn 0.025638 -0.000681 -0.999671
|
||||||
|
vn 0.000000 0.050455 -0.998726
|
||||||
|
vn 0.000000 0.050455 -0.998726
|
||||||
|
vn 0.000000 0.050455 -0.998726
|
||||||
|
vn 0.000000 0.050455 -0.998726
|
||||||
|
vn -0.957512 0.160965 -0.239293
|
||||||
|
vn -0.957512 0.160965 -0.239293
|
||||||
|
vn -0.957512 0.160965 -0.239293
|
||||||
|
vn -0.957512 0.160965 -0.239293
|
||||||
|
vn -0.987056 0.155459 0.039398
|
||||||
|
vn -0.987056 0.155459 0.039398
|
||||||
|
vn -0.987056 0.155459 0.039398
|
||||||
|
vn -0.987056 0.155459 0.039398
|
||||||
|
vn -0.799129 0.153659 0.581190
|
||||||
|
vn -0.799129 0.153659 0.581190
|
||||||
|
vn -0.799129 0.153659 0.581190
|
||||||
|
vn -0.799129 0.153659 0.581190
|
||||||
|
vn -0.019409 0.161311 0.986713
|
||||||
|
vn -0.019409 0.161311 0.986713
|
||||||
|
vn -0.019409 0.161311 0.986713
|
||||||
|
vn -0.019409 0.161311 0.986713
|
||||||
|
vn 0.027879 0.131795 0.990885
|
||||||
|
vn 0.027879 0.131795 0.990885
|
||||||
|
vn 0.027879 0.131795 0.990885
|
||||||
|
vn 0.027879 0.131795 0.990885
|
||||||
|
vn 0.893103 0.022697 0.449280
|
||||||
|
vn 0.893103 0.022697 0.449280
|
||||||
|
vn 0.893103 0.022697 0.449280
|
||||||
|
vn 0.893103 0.022697 0.449280
|
||||||
|
vn 1.000000 0.000000 0.000000
|
||||||
|
vn 1.000000 0.000000 0.000000
|
||||||
|
vn 1.000000 0.000000 0.000000
|
||||||
|
vn 1.000000 0.000000 0.000000
|
||||||
|
vn 0.378151 0.712684 -0.590832
|
||||||
|
vn 0.378152 0.712685 -0.590832
|
||||||
|
vn 0.378152 0.712684 -0.590832
|
||||||
|
vn 0.378152 0.712684 -0.590832
|
||||||
|
vn 0.043973 0.559611 -0.827588
|
||||||
|
vn 0.043973 0.559611 -0.827588
|
||||||
|
vn 0.043973 0.559610 -0.827588
|
||||||
|
vn 0.043973 0.559610 -0.827588
|
||||||
|
vn -0.016505 0.502086 -0.864660
|
||||||
|
vn -0.016505 0.502086 -0.864660
|
||||||
|
vn -0.016505 0.502086 -0.864660
|
||||||
|
vn -0.016505 0.502086 -0.864660
|
||||||
|
vn -0.896411 0.405025 -0.180007
|
||||||
|
vn -0.896410 0.405025 -0.180007
|
||||||
|
vn -0.896410 0.405025 -0.180007
|
||||||
|
vn -0.896410 0.405025 -0.180007
|
||||||
|
vn -0.835724 0.548662 0.023149
|
||||||
|
vn -0.835724 0.548662 0.023149
|
||||||
|
vn -0.835724 0.548662 0.023149
|
||||||
|
vn -0.835724 0.548662 0.023149
|
||||||
|
vn -0.338358 0.769199 0.542077
|
||||||
|
vn -0.338358 0.769199 0.542077
|
||||||
|
vn -0.338358 0.769199 0.542077
|
||||||
|
vn -0.338358 0.769199 0.542077
|
||||||
|
vn -0.026169 0.521080 0.853107
|
||||||
|
vn -0.026169 0.521080 0.853107
|
||||||
|
vn -0.026169 0.521080 0.853107
|
||||||
|
vn -0.026169 0.521080 0.853107
|
||||||
|
vn 0.051874 0.589498 0.806103
|
||||||
|
vn 0.051874 0.589498 0.806103
|
||||||
|
vn 0.051874 0.589498 0.806103
|
||||||
|
vn 0.051874 0.589498 0.806103
|
||||||
|
vn 0.521020 0.811123 0.265739
|
||||||
|
vn 0.521020 0.811123 0.265739
|
||||||
|
vn 0.521020 0.811123 0.265739
|
||||||
|
vn 0.521020 0.811123 0.265739
|
||||||
|
vn 0.577912 0.816021 -0.011268
|
||||||
|
vn 0.577912 0.816021 -0.011268
|
||||||
|
vn 0.577912 0.816021 -0.011268
|
||||||
|
vn 0.577912 0.816021 -0.011268
|
||||||
|
vn 0.198414 0.929477 -0.310974
|
||||||
|
vn 0.198414 0.929477 -0.310974
|
||||||
|
vn 0.198414 0.929477 -0.310974
|
||||||
|
vn 0.198414 0.929477 -0.310974
|
||||||
|
vn 0.039620 0.914981 -0.401548
|
||||||
|
vn 0.039620 0.914981 -0.401548
|
||||||
|
vn 0.039620 0.914981 -0.401548
|
||||||
|
vn 0.039620 0.914981 -0.401548
|
||||||
|
vn -0.486574 0.868666 -0.093084
|
||||||
|
vn -0.486574 0.868666 -0.093084
|
||||||
|
vn -0.486574 0.868666 -0.093084
|
||||||
|
vn -0.486574 0.868666 -0.093084
|
||||||
|
vn -0.425881 0.901471 0.077299
|
||||||
|
vn -0.425881 0.901471 0.077299
|
||||||
|
vn -0.425881 0.901471 0.077299
|
||||||
|
vn -0.425881 0.901471 0.077299
|
||||||
|
vn -0.272010 0.752195 0.600178
|
||||||
|
vn -0.272009 0.752195 0.600178
|
||||||
|
vn -0.272010 0.752195 0.600178
|
||||||
|
vn -0.272009 0.752195 0.600178
|
||||||
|
vn 0.116929 0.751942 0.648776
|
||||||
|
vn 0.116929 0.751942 0.648776
|
||||||
|
vn 0.116929 0.751942 0.648776
|
||||||
|
vn 0.116929 0.751942 0.648776
|
||||||
|
vn 0.070712 0.899536 0.431086
|
||||||
|
vn 0.070712 0.899536 0.431086
|
||||||
|
vn 0.070712 0.899536 0.431086
|
||||||
|
vn 0.070712 0.899536 0.431086
|
||||||
|
vn 0.377324 0.911205 0.165325
|
||||||
|
vn 0.377324 0.911205 0.165325
|
||||||
|
vn 0.377324 0.911205 0.165325
|
||||||
|
vn 0.377324 0.911205 0.165325
|
||||||
|
vn 0.333702 0.934101 -0.126878
|
||||||
|
vn 0.333702 0.934101 -0.126878
|
||||||
|
vn 0.333702 0.934101 -0.126878
|
||||||
|
vn 0.333702 0.934101 -0.126878
|
||||||
|
vn 0.043715 0.997230 -0.060169
|
||||||
|
vn 0.043715 0.997230 -0.060169
|
||||||
|
vn 0.043715 0.997231 -0.060169
|
||||||
|
vn 0.043715 0.997231 -0.060169
|
||||||
|
vn 0.009623 0.997184 -0.074369
|
||||||
|
vn 0.009623 0.997184 -0.074369
|
||||||
|
vn 0.009623 0.997184 -0.074369
|
||||||
|
vn 0.009623 0.997184 -0.074369
|
||||||
|
vn -0.043715 0.997230 -0.060169
|
||||||
|
vn -0.043715 0.997230 -0.060169
|
||||||
|
vn -0.043715 0.997231 -0.060169
|
||||||
|
vn -0.043715 0.997230 -0.060169
|
||||||
|
vn -0.070733 0.997230 -0.022982
|
||||||
|
vn -0.070733 0.997230 -0.022982
|
||||||
|
vn -0.070733 0.997230 -0.022982
|
||||||
|
vn -0.070733 0.997230 -0.022982
|
||||||
|
vn -0.071818 0.997104 0.025014
|
||||||
|
vn -0.071818 0.997104 0.025014
|
||||||
|
vn -0.071818 0.997104 0.025014
|
||||||
|
vn -0.071818 0.997104 0.025014
|
||||||
|
vn -0.028890 0.998514 0.046216
|
||||||
|
vn -0.028890 0.998514 0.046216
|
||||||
|
vn -0.028890 0.998514 0.046216
|
||||||
|
vn -0.028890 0.998514 0.046216
|
||||||
|
vn 0.017968 0.998288 0.055670
|
||||||
|
vn 0.017968 0.998288 0.055670
|
||||||
|
vn 0.017968 0.998288 0.055670
|
||||||
|
vn 0.017968 0.998288 0.055670
|
||||||
|
vn -0.046770 0.997944 0.043815
|
||||||
|
vn -0.046770 0.997944 0.043815
|
||||||
|
vn -0.046770 0.997944 0.043815
|
||||||
|
vn -0.046770 0.997944 0.043815
|
||||||
|
vn -0.053505 0.998416 -0.017385
|
||||||
|
vn -0.053505 0.998416 -0.017385
|
||||||
|
vn -0.053505 0.998416 -0.017385
|
||||||
|
vn -0.053505 0.998416 -0.017385
|
||||||
|
vn -0.018148 0.997665 -0.065844
|
||||||
|
vn -0.018148 0.997665 -0.065844
|
||||||
|
vn -0.018148 0.997665 -0.065844
|
||||||
|
vn -0.018148 0.997665 -0.065844
|
||||||
|
vn -0.079865 0.943343 -0.322064
|
||||||
|
vn -0.079865 0.943343 -0.322064
|
||||||
|
vn -0.079865 0.943343 -0.322064
|
||||||
|
vn -0.079865 0.943343 -0.322064
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
s off
|
||||||
|
g pasted__pasted__pSphere4 pasted__pasted__pSphere1SmoothProxyGroup pasted__group group2
|
||||||
|
usemtl pasted__pasted__lambert3SG1
|
||||||
|
f 1/1/1 2/2/2 12/13/3 11/12/4
|
||||||
|
f 2/2/5 3/3/6 13/14/7 12/13/8
|
||||||
|
f 3/3/9 4/4/10 14/15/11 13/14/12
|
||||||
|
f 4/4/13 5/5/14 15/16/15 14/15/16
|
||||||
|
f 5/5/17 6/6/18 16/17/19 15/16/20
|
||||||
|
f 6/6/21 7/7/22 17/18/23 16/17/24
|
||||||
|
f 7/7/25 8/8/26 18/19/27 17/18/28
|
||||||
|
f 8/8/29 9/9/30 19/20/31 18/19/32
|
||||||
|
f 9/9/33 10/10/34 20/21/35 19/20/36
|
||||||
|
f 10/10/37 1/11/38 11/22/39 20/21/40
|
||||||
|
f 11/12/41 12/13/42 22/24/43 21/23/44
|
||||||
|
f 12/13/45 13/14/46 23/25/47 22/24/48
|
||||||
|
f 13/14/49 14/15/50 24/26/51 23/25/52
|
||||||
|
f 14/15/53 15/16/54 25/27/55 24/26/56
|
||||||
|
f 15/16/57 16/17/58 26/28/59 25/27/60
|
||||||
|
f 16/17/61 17/18/62 27/29/63 26/28/64
|
||||||
|
f 17/18/65 18/19/66 28/30/67 27/29/68
|
||||||
|
f 18/19/69 19/20/70 29/31/71 28/30/72
|
||||||
|
f 19/20/73 20/21/74 30/32/75 29/31/76
|
||||||
|
f 20/21/77 11/22/78 21/33/79 30/32/80
|
||||||
|
f 21/23/81 22/24/82 32/35/83 31/34/84
|
||||||
|
f 22/24/85 23/25/86 33/36/87 32/35/88
|
||||||
|
f 24/26/89 25/27/90 35/38/91 34/37/92
|
||||||
|
f 25/27/93 26/28/94 36/39/95 35/38/96
|
||||||
|
f 26/28/97 27/29/98 37/40/99 36/39/100
|
||||||
|
f 27/29/101 28/30/102 38/41/103 37/40/104
|
||||||
|
f 28/30/105 29/31/106 39/42/107 38/41/108
|
||||||
|
f 29/31/109 30/32/110 40/43/111 39/42/112
|
||||||
|
f 30/32/113 21/33/114 31/44/115 40/43/116
|
||||||
|
f 31/34/117 32/35/118 42/46/119 41/45/120
|
||||||
|
f 32/35/121 33/36/122 43/47/123 42/46/124
|
||||||
|
f 33/36/125 34/37/126 44/48/127 43/47/128
|
||||||
|
f 34/37/129 35/38/130 45/49/131 44/48/132
|
||||||
|
f 35/38/133 36/39/134 46/50/135 45/49/136
|
||||||
|
f 36/39/137 37/40/138 47/51/139 46/50/140
|
||||||
|
f 37/40/141 38/41/142 48/52/143 47/51/144
|
||||||
|
f 38/41/145 39/42/146 49/53/147 48/52/148
|
||||||
|
f 39/42/149 40/43/150 50/54/151 49/53/152
|
||||||
|
f 40/43/153 31/44/154 41/55/155 50/54/156
|
||||||
|
f 34/37/157 33/36/158 23/25/159 24/26/160
|
||||||
|
f 42/46/161 43/47/162 44/48/163 45/49/164 46/50/165 47/51/166 48/52/167 49/53/168 50/54/169 41/45/170
|
||||||
|
f 5/5/171 4/4/172 3/3/173 2/2/174 1/11/175 10/10/176 9/9/177 8/8/178 7/7/179 6/6/180
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,645 @@
|
|||||||
|
# This file uses centimeters as units for non-parametric coordinates.
|
||||||
|
|
||||||
|
mtllib Rock10.mtl
|
||||||
|
g default
|
||||||
|
v 4.941558 -0.000000 -3.356660
|
||||||
|
v 2.216577 -0.000000 -5.336667
|
||||||
|
v -1.151898 -0.000000 -6.543634
|
||||||
|
v -4.489141 -0.000000 -4.563631
|
||||||
|
v -5.530008 -0.000000 -0.153030
|
||||||
|
v -4.965517 -0.000000 3.266693
|
||||||
|
v -2.240540 -0.000000 5.819403
|
||||||
|
v 2.216577 -0.000000 5.603078
|
||||||
|
v 5.729727 -0.000000 4.689539
|
||||||
|
v 6.770609 -0.000000 1.485886
|
||||||
|
v 4.725860 1.551832 -3.199978
|
||||||
|
v 2.134023 1.551832 -5.082932
|
||||||
|
v -1.069599 1.551832 -6.289903
|
||||||
|
v -4.273440 1.551832 -4.406953
|
||||||
|
v -5.263417 1.551832 -0.153030
|
||||||
|
v -4.749804 1.551832 3.110022
|
||||||
|
v -2.157975 1.551832 5.565672
|
||||||
|
v 2.134027 1.551832 5.349388
|
||||||
|
v 6.132498 1.551832 4.532609
|
||||||
|
v 7.122502 1.551832 1.485886
|
||||||
|
v 4.609601 2.951764 -3.527630
|
||||||
|
v 1.894824 2.951764 -4.346659
|
||||||
|
v -0.830175 2.951764 -4.346659
|
||||||
|
v -3.034848 2.951764 -2.744829
|
||||||
|
v -3.877123 2.951764 -0.153030
|
||||||
|
v -2.669389 2.951764 3.295645
|
||||||
|
v -0.464708 2.951764 4.897482
|
||||||
|
v 1.894824 2.951764 5.076090
|
||||||
|
v 5.736745 3.167297 4.096554
|
||||||
|
v 7.128675 3.167297 0.549275
|
||||||
|
v 9.380221 12.995994 -2.142035
|
||||||
|
v 7.268513 12.995994 -2.523037
|
||||||
|
v 4.644403 12.995994 -2.801839
|
||||||
|
v 3.042603 12.995994 -1.638022
|
||||||
|
v 2.430769 12.995994 0.244891
|
||||||
|
v 3.408291 12.995994 2.984904
|
||||||
|
v 5.654229 12.995994 4.427516
|
||||||
|
v 7.268513 12.995994 4.606150
|
||||||
|
v 9.888848 16.207620 4.064604
|
||||||
|
v 11.050520 16.207620 1.225952
|
||||||
|
v 11.146457 20.527525 -0.466318
|
||||||
|
v 6.799099 16.705383 -1.078148
|
||||||
|
v 5.113851 16.705383 -1.356947
|
||||||
|
v 6.527206 18.970071 -0.745113
|
||||||
|
v 3.950029 16.705383 0.244891
|
||||||
|
v 4.271805 16.705383 1.234890
|
||||||
|
v 8.013615 18.970071 2.125519
|
||||||
|
v 10.304179 20.527525 2.125519
|
||||||
|
v 11.146457 20.527525 1.513685
|
||||||
|
v 11.467955 20.527525 0.523689
|
||||||
|
v 8.261353 10.640221 -2.467143
|
||||||
|
v 6.008127 10.640221 -2.950703
|
||||||
|
v 3.360358 10.640221 -3.164116
|
||||||
|
v 1.617198 10.640221 -1.897761
|
||||||
|
v 0.951300 10.640221 0.151621
|
||||||
|
v 1.982890 10.640221 3.057836
|
||||||
|
v 4.219123 10.640221 4.537617
|
||||||
|
v 6.008127 10.640221 4.716229
|
||||||
|
v 8.914913 10.855755 4.072155
|
||||||
|
v 10.130692 10.855755 1.067302
|
||||||
|
v 6.796928 7.556904 -2.892291
|
||||||
|
v 4.358688 7.556904 -3.510479
|
||||||
|
v 1.679829 7.556904 -3.638317
|
||||||
|
v 2.573993 7.556904 2.717865
|
||||||
|
v 2.340926 7.556904 4.681991
|
||||||
|
v 4.358688 7.556904 4.860621
|
||||||
|
v 7.640401 7.772439 4.081931
|
||||||
|
v 8.926703 7.772439 0.859490
|
||||||
|
v 5.351103 4.513199 -3.312176
|
||||||
|
v 2.730303 4.513199 -4.063093
|
||||||
|
v 0.020861 4.513199 -4.106597
|
||||||
|
v -2.090257 7.289964 -2.572875
|
||||||
|
v -1.724568 4.513199 3.247227
|
||||||
|
v 0.486695 4.513199 4.824448
|
||||||
|
v 2.730303 4.513199 5.003041
|
||||||
|
v 6.382096 4.728737 4.091621
|
||||||
|
v 7.738359 4.728737 0.654387
|
||||||
|
v -2.122515 7.075274 -2.583402
|
||||||
|
v -2.928914 7.310737 -0.101862
|
||||||
|
v 1.191261 11.557831 -0.697826
|
||||||
|
v 0.930335 11.624486 -2.247872
|
||||||
|
v -0.377845 11.514683 -3.470086
|
||||||
|
v -1.184018 11.750146 -0.988564
|
||||||
|
v 2.387160 15.982284 -0.236283
|
||||||
|
v 2.834054 15.801111 -3.378349
|
||||||
|
v 1.181372 11.543352 -0.698484
|
||||||
|
v 0.543115 12.634959 -3.302434
|
||||||
|
v -0.228444 12.752694 -0.928192
|
||||||
|
v 1.083369 11.561172 -0.642263
|
||||||
|
v 2.116365 13.181708 -2.473666
|
||||||
|
v 1.227987 11.557164 -0.810892
|
||||||
|
v 3.411045 12.993238 2.980508
|
||||||
|
v 5.651475 12.998750 4.431911
|
||||||
|
v 8.016369 18.967314 2.121123
|
||||||
|
v 4.269051 16.708139 1.239282
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.100000 0.500000
|
||||||
|
vt 0.200000 0.500000
|
||||||
|
vt 0.300000 0.500000
|
||||||
|
vt 0.400000 0.500000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt 0.600000 0.500000
|
||||||
|
vt 0.700000 0.500000
|
||||||
|
vt 0.800000 0.500000
|
||||||
|
vt 0.900000 0.500000
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 0.000000 0.600000
|
||||||
|
vt 0.100000 0.600000
|
||||||
|
vt 0.200000 0.600000
|
||||||
|
vt 0.300000 0.600000
|
||||||
|
vt 0.400000 0.600000
|
||||||
|
vt 0.500000 0.600000
|
||||||
|
vt 0.600000 0.600000
|
||||||
|
vt 0.700000 0.600000
|
||||||
|
vt 0.800000 0.600000
|
||||||
|
vt 0.900000 0.600000
|
||||||
|
vt 1.000000 0.600000
|
||||||
|
vt 0.000000 0.700000
|
||||||
|
vt 0.100000 0.700000
|
||||||
|
vt 0.200000 0.700000
|
||||||
|
vt 0.300000 0.700000
|
||||||
|
vt 0.400000 0.700000
|
||||||
|
vt 0.500000 0.700000
|
||||||
|
vt 0.600000 0.700000
|
||||||
|
vt 0.700000 0.700000
|
||||||
|
vt 0.800000 0.700000
|
||||||
|
vt 0.900000 0.700000
|
||||||
|
vt 1.000000 0.700000
|
||||||
|
vt 0.000000 0.800000
|
||||||
|
vt 0.100000 0.800000
|
||||||
|
vt 0.200000 0.800000
|
||||||
|
vt 0.300000 0.800000
|
||||||
|
vt 0.400000 0.800000
|
||||||
|
vt 0.500000 0.800000
|
||||||
|
vt 0.600000 0.800000
|
||||||
|
vt 0.700000 0.800000
|
||||||
|
vt 0.800000 0.800000
|
||||||
|
vt 0.900000 0.800000
|
||||||
|
vt 1.000000 0.800000
|
||||||
|
vt 0.000000 0.900000
|
||||||
|
vt 0.100000 0.900000
|
||||||
|
vt 0.200000 0.900000
|
||||||
|
vt 0.300000 0.900000
|
||||||
|
vt 0.400000 0.900000
|
||||||
|
vt 0.500000 0.900000
|
||||||
|
vt 0.600000 0.900000
|
||||||
|
vt 0.700000 0.900000
|
||||||
|
vt 0.800000 0.900000
|
||||||
|
vt 0.900000 0.900000
|
||||||
|
vt 1.000000 0.900000
|
||||||
|
vt 1.000000 0.776546
|
||||||
|
vt 0.000000 0.776546
|
||||||
|
vt 0.100000 0.776546
|
||||||
|
vt 0.200000 0.776546
|
||||||
|
vt 0.300000 0.776546
|
||||||
|
vt 0.400000 0.776546
|
||||||
|
vt 0.500000 0.776546
|
||||||
|
vt 0.600000 0.776546
|
||||||
|
vt 0.700000 0.776546
|
||||||
|
vt 0.800000 0.776546
|
||||||
|
vt 0.900000 0.776546
|
||||||
|
vt 1.000000 0.745849
|
||||||
|
vt 0.000000 0.745849
|
||||||
|
vt 0.100000 0.745849
|
||||||
|
vt 0.200000 0.745849
|
||||||
|
vt 0.500000 0.745849
|
||||||
|
vt 0.600000 0.745849
|
||||||
|
vt 0.700000 0.745849
|
||||||
|
vt 0.800000 0.745849
|
||||||
|
vt 0.900000 0.745849
|
||||||
|
vt 1.000000 0.715546
|
||||||
|
vt 0.000000 0.715546
|
||||||
|
vt 0.100000 0.715546
|
||||||
|
vt 0.200000 0.715546
|
||||||
|
vt 0.300000 0.715546
|
||||||
|
vt 0.500000 0.715546
|
||||||
|
vt 0.600000 0.715546
|
||||||
|
vt 0.700000 0.715546
|
||||||
|
vt 0.800000 0.715546
|
||||||
|
vt 0.900000 0.715546
|
||||||
|
vt 0.300000 0.715546
|
||||||
|
vt 0.400000 0.715546
|
||||||
|
vt 0.400000 0.745849
|
||||||
|
vt 0.300000 0.745849
|
||||||
|
vt 0.300000 0.715546
|
||||||
|
vt 0.400000 0.715546
|
||||||
|
vt 0.400000 0.745849
|
||||||
|
vt 0.300000 0.745849
|
||||||
|
vt 0.400000 0.745691
|
||||||
|
vt 0.300000 0.730697
|
||||||
|
vt 0.400000 0.730697
|
||||||
|
vt 0.400000 0.745849
|
||||||
|
vt 0.300000 0.745849
|
||||||
|
vt 0.395018 0.745849
|
||||||
|
vt 0.500000 0.800000
|
||||||
|
vt 0.600000 0.800000
|
||||||
|
vt 0.600000 0.900000
|
||||||
|
vt 0.500000 0.900000
|
||||||
|
vn 0.580093 0.161325 -0.798415
|
||||||
|
vn 0.580093 0.161325 -0.798415
|
||||||
|
vn 0.580093 0.161325 -0.798415
|
||||||
|
vn 0.580093 0.161325 -0.798415
|
||||||
|
vn 0.340787 0.151731 -0.927816
|
||||||
|
vn 0.340787 0.151731 -0.927816
|
||||||
|
vn 0.340787 0.151731 -0.927816
|
||||||
|
vn 0.340787 0.151731 -0.927816
|
||||||
|
vn -0.501913 0.160575 -0.849882
|
||||||
|
vn -0.501913 0.160575 -0.849882
|
||||||
|
vn -0.501913 0.160575 -0.849882
|
||||||
|
vn -0.501913 0.160575 -0.849882
|
||||||
|
vn -0.960961 0.160697 -0.225236
|
||||||
|
vn -0.960961 0.160697 -0.225236
|
||||||
|
vn -0.960961 0.160697 -0.225236
|
||||||
|
vn -0.960961 0.160697 -0.225236
|
||||||
|
vn -0.974614 0.159392 0.157230
|
||||||
|
vn -0.974614 0.159392 0.157230
|
||||||
|
vn -0.974614 0.159392 0.157230
|
||||||
|
vn -0.974614 0.159392 0.157230
|
||||||
|
vn -0.676838 0.160059 0.718521
|
||||||
|
vn -0.676837 0.160059 0.718521
|
||||||
|
vn -0.676838 0.160059 0.718521
|
||||||
|
vn -0.676838 0.160059 0.718521
|
||||||
|
vn 0.048741 0.161157 0.985725
|
||||||
|
vn 0.048741 0.161157 0.985724
|
||||||
|
vn 0.048741 0.161157 0.985725
|
||||||
|
vn 0.048741 0.161157 0.985725
|
||||||
|
vn 0.223228 0.105179 0.969075
|
||||||
|
vn 0.223228 0.105179 0.969075
|
||||||
|
vn 0.223228 0.105179 0.969075
|
||||||
|
vn 0.223228 0.105179 0.969075
|
||||||
|
vn 0.929688 -0.210783 0.302077
|
||||||
|
vn 0.929688 -0.210783 0.302077
|
||||||
|
vn 0.929688 -0.210783 0.302077
|
||||||
|
vn 0.929688 -0.210783 0.302077
|
||||||
|
vn 0.913961 -0.019642 -0.405326
|
||||||
|
vn 0.913961 -0.019642 -0.405326
|
||||||
|
vn 0.913961 -0.019642 -0.405326
|
||||||
|
vn 0.913961 -0.019642 -0.405326
|
||||||
|
vn 0.445958 0.184438 -0.875845
|
||||||
|
vn 0.445958 0.184438 -0.875845
|
||||||
|
vn 0.445958 0.184438 -0.875845
|
||||||
|
vn 0.445958 0.184438 -0.875845
|
||||||
|
vn 0.145517 0.684044 -0.714779
|
||||||
|
vn 0.145517 0.684043 -0.714779
|
||||||
|
vn 0.145517 0.684044 -0.714779
|
||||||
|
vn 0.145517 0.684044 -0.714779
|
||||||
|
vn -0.319574 0.807382 -0.495990
|
||||||
|
vn -0.319574 0.807382 -0.495990
|
||||||
|
vn -0.319574 0.807382 -0.495990
|
||||||
|
vn -0.319574 0.807382 -0.495990
|
||||||
|
vn -0.663181 0.727107 -0.177500
|
||||||
|
vn -0.663181 0.727107 -0.177500
|
||||||
|
vn -0.663181 0.727107 -0.177500
|
||||||
|
vn -0.663181 0.727107 -0.177500
|
||||||
|
vn -0.625363 0.763674 0.160386
|
||||||
|
vn -0.625363 0.763674 0.160386
|
||||||
|
vn -0.625363 0.763674 0.160386
|
||||||
|
vn -0.625363 0.763674 0.160386
|
||||||
|
vn -0.456209 0.707833 0.539302
|
||||||
|
vn -0.456209 0.707833 0.539302
|
||||||
|
vn -0.456209 0.707833 0.539302
|
||||||
|
vn -0.456209 0.707833 0.539302
|
||||||
|
vn 0.005373 0.316213 0.948673
|
||||||
|
vn 0.005373 0.316213 0.948673
|
||||||
|
vn 0.005373 0.316213 0.948673
|
||||||
|
vn 0.005373 0.316213 0.948673
|
||||||
|
vn 0.208383 0.265331 0.941369
|
||||||
|
vn 0.208383 0.265331 0.941369
|
||||||
|
vn 0.208383 0.265331 0.941369
|
||||||
|
vn 0.208383 0.265331 0.941369
|
||||||
|
vn 0.910753 0.249590 0.328989
|
||||||
|
vn 0.910753 0.249590 0.328989
|
||||||
|
vn 0.910753 0.249590 0.328989
|
||||||
|
vn 0.910753 0.249590 0.328989
|
||||||
|
vn 0.861311 -0.169390 -0.479010
|
||||||
|
vn 0.861311 -0.169390 -0.479010
|
||||||
|
vn 0.861311 -0.169390 -0.479010
|
||||||
|
vn 0.861311 -0.169390 -0.479010
|
||||||
|
vn 0.193963 0.058511 -0.979262
|
||||||
|
vn 0.193963 0.058511 -0.979262
|
||||||
|
vn 0.193963 0.058511 -0.979262
|
||||||
|
vn 0.193963 0.058511 -0.979262
|
||||||
|
vn 0.092333 0.115944 -0.988955
|
||||||
|
vn 0.092333 0.115944 -0.988955
|
||||||
|
vn 0.092333 0.115944 -0.988955
|
||||||
|
vn 0.092333 0.115944 -0.988955
|
||||||
|
vn -0.812090 0.520461 -0.263876
|
||||||
|
vn -0.812090 0.520461 -0.263876
|
||||||
|
vn -0.812090 0.520461 -0.263876
|
||||||
|
vn -0.812090 0.520461 -0.263876
|
||||||
|
vn -0.815180 0.501341 0.290067
|
||||||
|
vn -0.815180 0.501341 0.290067
|
||||||
|
vn -0.815180 0.501341 0.290067
|
||||||
|
vn -0.815180 0.501341 0.290067
|
||||||
|
vn -0.513202 0.342157 0.787116
|
||||||
|
vn -0.513202 0.342157 0.787116
|
||||||
|
vn -0.513202 0.342157 0.787116
|
||||||
|
vn -0.513202 0.342158 0.787116
|
||||||
|
vn -0.103818 0.105609 0.988974
|
||||||
|
vn -0.103818 0.105609 0.988974
|
||||||
|
vn -0.103818 0.105609 0.988974
|
||||||
|
vn -0.103818 0.105609 0.988974
|
||||||
|
vn 0.242147 -0.055410 0.968656
|
||||||
|
vn 0.242147 -0.055411 0.968656
|
||||||
|
vn 0.242147 -0.055411 0.968656
|
||||||
|
vn 0.242147 -0.055410 0.968656
|
||||||
|
vn 0.913291 -0.166829 0.371576
|
||||||
|
vn 0.913291 -0.166829 0.371576
|
||||||
|
vn 0.913291 -0.166829 0.371575
|
||||||
|
vn 0.913291 -0.166829 0.371576
|
||||||
|
vn 0.908138 -0.217763 -0.357580
|
||||||
|
vn 0.908138 -0.217763 -0.357580
|
||||||
|
vn 0.908139 -0.217763 -0.357580
|
||||||
|
vn 0.908139 -0.217763 -0.357580
|
||||||
|
vn -0.010919 0.268649 -0.963176
|
||||||
|
vn -0.010919 0.268649 -0.963176
|
||||||
|
vn -0.010919 0.268649 -0.963176
|
||||||
|
vn -0.010919 0.268649 -0.963176
|
||||||
|
vn 0.119702 0.360348 -0.925106
|
||||||
|
vn 0.119702 0.360348 -0.925106
|
||||||
|
vn 0.119702 0.360348 -0.925106
|
||||||
|
vn 0.119702 0.360348 -0.925106
|
||||||
|
vn -0.672113 0.421426 -0.608822
|
||||||
|
vn -0.672113 0.421426 -0.608822
|
||||||
|
vn -0.672113 0.421426 -0.608822
|
||||||
|
vn -0.672113 0.421426 -0.608822
|
||||||
|
vn -0.753306 0.434767 -0.493465
|
||||||
|
vn -0.753306 0.434767 -0.493465
|
||||||
|
vn -0.753306 0.434767 -0.493465
|
||||||
|
vn -0.753306 0.434767 -0.493465
|
||||||
|
vn -0.882496 0.355954 0.307406
|
||||||
|
vn -0.882496 0.355954 0.307406
|
||||||
|
vn -0.882496 0.355954 0.307406
|
||||||
|
vn -0.882496 0.355954 0.307406
|
||||||
|
vn -0.469028 0.469202 0.748239
|
||||||
|
vn -0.469028 0.469202 0.748239
|
||||||
|
vn -0.469028 0.469202 0.748239
|
||||||
|
vn -0.469028 0.469202 0.748239
|
||||||
|
vn -0.199289 0.396892 0.895969
|
||||||
|
vn -0.199289 0.396892 0.895969
|
||||||
|
vn -0.199289 0.396892 0.895969
|
||||||
|
vn -0.199289 0.396892 0.895969
|
||||||
|
vn -0.082817 0.414718 0.906174
|
||||||
|
vn -0.082817 0.414718 0.906174
|
||||||
|
vn -0.082817 0.414718 0.906174
|
||||||
|
vn -0.082817 0.414718 0.906174
|
||||||
|
vn 0.931544 -0.044725 0.360868
|
||||||
|
vn 0.931544 -0.044725 0.360868
|
||||||
|
vn 0.931544 -0.044725 0.360868
|
||||||
|
vn 0.931544 -0.044725 0.360868
|
||||||
|
vn 0.936043 -0.146178 -0.320088
|
||||||
|
vn 0.936043 -0.146178 -0.320088
|
||||||
|
vn 0.936043 -0.146178 -0.320088
|
||||||
|
vn 0.936043 -0.146178 -0.320088
|
||||||
|
vn -0.537039 0.406421 -0.739196
|
||||||
|
vn -0.537039 0.406421 -0.739196
|
||||||
|
vn -0.537039 0.406421 -0.739196
|
||||||
|
vn -0.537039 0.406421 -0.739196
|
||||||
|
vn -0.559499 0.786314 0.262050
|
||||||
|
vn -0.559501 0.786314 0.262050
|
||||||
|
vn -0.559501 0.786313 0.262050
|
||||||
|
vn -0.559500 0.786314 0.262050
|
||||||
|
vn 0.228437 0.040013 -0.972736
|
||||||
|
vn 0.228437 0.040013 -0.972736
|
||||||
|
vn 0.228437 0.040013 -0.972736
|
||||||
|
vn 0.228437 0.040013 -0.972736
|
||||||
|
vn 0.063378 0.131650 -0.989268
|
||||||
|
vn 0.063378 0.131650 -0.989268
|
||||||
|
vn 0.063378 0.131650 -0.989268
|
||||||
|
vn 0.063378 0.131650 -0.989268
|
||||||
|
vn -0.729418 0.456374 0.509580
|
||||||
|
vn -0.729418 0.456374 0.509580
|
||||||
|
vn -0.729418 0.456374 0.509580
|
||||||
|
vn -0.729418 0.456374 0.509580
|
||||||
|
vn -0.729418 0.456374 0.509580
|
||||||
|
vn -0.729418 0.456374 0.509580
|
||||||
|
vn -0.852950 0.162291 0.496123
|
||||||
|
vn -0.852950 0.162291 0.496123
|
||||||
|
vn -0.852950 0.162291 0.496123
|
||||||
|
vn -0.852950 0.162291 0.496123
|
||||||
|
vn -0.092971 0.099574 0.990677
|
||||||
|
vn -0.092971 0.099574 0.990677
|
||||||
|
vn -0.092971 0.099574 0.990677
|
||||||
|
vn -0.092971 0.099574 0.990677
|
||||||
|
vn 0.228834 -0.084257 0.969812
|
||||||
|
vn 0.228834 -0.084257 0.969812
|
||||||
|
vn 0.228834 -0.084257 0.969812
|
||||||
|
vn 0.228834 -0.084257 0.969812
|
||||||
|
vn 0.865966 -0.359223 0.347939
|
||||||
|
vn 0.865966 -0.359223 0.347939
|
||||||
|
vn 0.865966 -0.359223 0.347939
|
||||||
|
vn 0.865966 -0.359223 0.347939
|
||||||
|
vn 0.839017 -0.317721 -0.441705
|
||||||
|
vn 0.839017 -0.317721 -0.441705
|
||||||
|
vn 0.839017 -0.317721 -0.441705
|
||||||
|
vn 0.839017 -0.317721 -0.441705
|
||||||
|
vn 0.261162 0.022280 -0.965038
|
||||||
|
vn 0.261162 0.022280 -0.965038
|
||||||
|
vn 0.261162 0.022280 -0.965038
|
||||||
|
vn 0.261162 0.022280 -0.965038
|
||||||
|
vn 0.031431 0.148783 -0.988370
|
||||||
|
vn 0.031431 0.148783 -0.988370
|
||||||
|
vn 0.031431 0.148783 -0.988370
|
||||||
|
vn 0.031431 0.148783 -0.988370
|
||||||
|
vn -0.767469 0.608270 -0.202480
|
||||||
|
vn -0.767469 0.608270 -0.202480
|
||||||
|
vn -0.767469 0.608270 -0.202480
|
||||||
|
vn -0.767469 0.608270 -0.202480
|
||||||
|
vn -0.637310 0.683446 0.356002
|
||||||
|
vn -0.637310 0.683446 0.356002
|
||||||
|
vn -0.637310 0.683446 0.356002
|
||||||
|
vn -0.637310 0.683446 0.356002
|
||||||
|
vn -0.083164 0.094007 0.992092
|
||||||
|
vn -0.083165 0.094007 0.992092
|
||||||
|
vn -0.083164 0.094007 0.992092
|
||||||
|
vn -0.083164 0.094007 0.992092
|
||||||
|
vn 0.241148 -0.090210 0.966287
|
||||||
|
vn 0.241148 -0.090210 0.966287
|
||||||
|
vn 0.241148 -0.090210 0.966287
|
||||||
|
vn 0.241148 -0.090210 0.966287
|
||||||
|
vn 0.867308 -0.359636 0.344149
|
||||||
|
vn 0.867308 -0.359636 0.344149
|
||||||
|
vn 0.867308 -0.359636 0.344149
|
||||||
|
vn 0.867308 -0.359636 0.344149
|
||||||
|
vn 0.827918 -0.310292 -0.467194
|
||||||
|
vn 0.827918 -0.310292 -0.467194
|
||||||
|
vn 0.827918 -0.310292 -0.467195
|
||||||
|
vn 0.827918 -0.310292 -0.467194
|
||||||
|
vn 0.282260 0.010754 -0.959278
|
||||||
|
vn 0.282260 0.010754 -0.959278
|
||||||
|
vn 0.282260 0.010754 -0.959278
|
||||||
|
vn 0.282260 0.010754 -0.959278
|
||||||
|
vn 0.007899 0.161210 -0.986888
|
||||||
|
vn 0.007899 0.161210 -0.986888
|
||||||
|
vn 0.007899 0.161210 -0.986888
|
||||||
|
vn 0.007899 0.161210 -0.986888
|
||||||
|
vn -0.544997 0.360368 0.757042
|
||||||
|
vn -0.544997 0.360368 0.757042
|
||||||
|
vn -0.544997 0.360368 0.757042
|
||||||
|
vn -0.544997 0.360368 0.757042
|
||||||
|
vn -0.077052 0.090534 0.992908
|
||||||
|
vn -0.077052 0.090534 0.992908
|
||||||
|
vn -0.077052 0.090534 0.992908
|
||||||
|
vn -0.077052 0.090534 0.992908
|
||||||
|
vn 0.248662 -0.093840 0.964034
|
||||||
|
vn 0.248662 -0.093840 0.964034
|
||||||
|
vn 0.248662 -0.093840 0.964034
|
||||||
|
vn 0.248662 -0.093840 0.964034
|
||||||
|
vn 0.868209 -0.359881 0.341614
|
||||||
|
vn 0.868209 -0.359881 0.341614
|
||||||
|
vn 0.868208 -0.359881 0.341614
|
||||||
|
vn 0.868209 -0.359881 0.341614
|
||||||
|
vn 0.820167 -0.305191 -0.483927
|
||||||
|
vn 0.820167 -0.305191 -0.483927
|
||||||
|
vn 0.820167 -0.305191 -0.483927
|
||||||
|
vn 0.820167 -0.305191 -0.483927
|
||||||
|
vn -0.901648 0.290351 -0.320509
|
||||||
|
vn -0.901648 0.290351 -0.320509
|
||||||
|
vn -0.901648 0.290351 -0.320509
|
||||||
|
vn -0.901648 0.290351 -0.320509
|
||||||
|
vn -0.153020 0.117402 0.981225
|
||||||
|
vn -0.153020 0.117402 0.981225
|
||||||
|
vn -0.153020 0.117402 0.981225
|
||||||
|
vn -0.153020 0.117402 0.981225
|
||||||
|
vn -0.153020 0.117402 0.981225
|
||||||
|
vn -0.153020 0.117402 0.981225
|
||||||
|
vn -0.153020 0.117402 0.981225
|
||||||
|
vn 0.944190 -0.256454 0.206730
|
||||||
|
vn 0.944189 -0.256454 0.206730
|
||||||
|
vn 0.944190 -0.256454 0.206730
|
||||||
|
vn 0.944189 -0.256454 0.206730
|
||||||
|
vn 0.599743 -0.413652 -0.684982
|
||||||
|
vn 0.599743 -0.413652 -0.684982
|
||||||
|
vn 0.599743 -0.413652 -0.684982
|
||||||
|
vn 0.599743 -0.413652 -0.684982
|
||||||
|
vn 0.599743 -0.413652 -0.684982
|
||||||
|
vn 0.599743 -0.413652 -0.684982
|
||||||
|
vn -0.927462 0.211125 -0.308612
|
||||||
|
vn -0.927462 0.211125 -0.308612
|
||||||
|
vn -0.927462 0.211125 -0.308612
|
||||||
|
vn -0.927462 0.211125 -0.308612
|
||||||
|
vn -0.927462 0.211125 -0.308612
|
||||||
|
vn 0.198298 -0.054623 0.978619
|
||||||
|
vn 0.198298 -0.054623 0.978619
|
||||||
|
vn 0.198298 -0.054623 0.978619
|
||||||
|
vn -0.705068 0.652977 -0.276586
|
||||||
|
vn -0.705068 0.652977 -0.276587
|
||||||
|
vn -0.705068 0.652977 -0.276587
|
||||||
|
vn -0.705068 0.652977 -0.276586
|
||||||
|
vn 0.825979 -0.554652 -0.100597
|
||||||
|
vn 0.825979 -0.554652 -0.100597
|
||||||
|
vn 0.825979 -0.554652 -0.100597
|
||||||
|
vn 0.825979 -0.554652 -0.100597
|
||||||
|
vn -0.329672 0.291803 -0.897868
|
||||||
|
vn -0.329672 0.291803 -0.897868
|
||||||
|
vn -0.329672 0.291803 -0.897868
|
||||||
|
vn -0.329672 0.291803 -0.897868
|
||||||
|
vn -0.329672 0.291804 -0.897868
|
||||||
|
vn -0.329672 0.291803 -0.897868
|
||||||
|
vn -0.329672 0.291804 -0.897868
|
||||||
|
vn -0.329672 0.291803 -0.897868
|
||||||
|
vn -0.329672 0.291803 -0.897868
|
||||||
|
vn 0.954339 0.279212 0.106194
|
||||||
|
vn 0.954339 0.279212 0.106194
|
||||||
|
vn 0.954339 0.279212 0.106194
|
||||||
|
vn 0.954339 0.279212 0.106194
|
||||||
|
vn 0.033520 0.999426 0.005000
|
||||||
|
vn 0.033520 0.999426 0.005000
|
||||||
|
vn 0.033520 0.999425 0.005000
|
||||||
|
vn -0.805391 0.501883 0.315372
|
||||||
|
vn -0.805390 0.501883 0.315372
|
||||||
|
vn -0.805390 0.501883 0.315372
|
||||||
|
vn -0.805390 0.501883 0.315372
|
||||||
|
vn -0.805390 0.501883 0.315372
|
||||||
|
vn 0.049970 0.151179 -0.987243
|
||||||
|
vn 0.049970 0.151179 -0.987243
|
||||||
|
vn 0.049970 0.151179 -0.987243
|
||||||
|
vn 0.049970 0.151179 -0.987243
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn -0.412111 0.909837 0.048596
|
||||||
|
vn -0.412111 0.909837 0.048596
|
||||||
|
vn -0.412111 0.909837 0.048596
|
||||||
|
vn -0.412111 0.909837 0.048596
|
||||||
|
vn 0.130679 0.969155 0.208951
|
||||||
|
vn 0.130679 0.969155 0.208951
|
||||||
|
vn 0.130679 0.969155 0.208951
|
||||||
|
vn 0.130679 0.969155 0.208951
|
||||||
|
vn 0.898657 -0.437843 0.026635
|
||||||
|
vn 0.898657 -0.437843 0.026635
|
||||||
|
vn 0.898657 -0.437843 0.026635
|
||||||
|
vn 0.898657 -0.437843 0.026635
|
||||||
|
vn 0.901532 -0.413238 -0.128352
|
||||||
|
vn 0.901532 -0.413238 -0.128352
|
||||||
|
vn 0.391848 0.919311 -0.036369
|
||||||
|
vn 0.391848 0.919311 -0.036369
|
||||||
|
vn 0.391848 0.919311 -0.036369
|
||||||
|
vn 0.391848 0.919311 -0.036369
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
s off
|
||||||
|
g pasted__pasted__pSphere1 pasted__pasted__pSphere1SmoothProxyGroup pasted__group group1
|
||||||
|
usemtl lambert6SG
|
||||||
|
f 1/1/1 2/2/2 12/13/3 11/12/4
|
||||||
|
f 2/2/5 3/3/6 13/14/7 12/13/8
|
||||||
|
f 3/3/9 4/4/10 14/15/11 13/14/12
|
||||||
|
f 4/4/13 5/5/14 15/16/15 14/15/16
|
||||||
|
f 5/5/17 6/6/18 16/17/19 15/16/20
|
||||||
|
f 6/6/21 7/7/22 17/18/23 16/17/24
|
||||||
|
f 7/7/25 8/8/26 18/19/27 17/18/28
|
||||||
|
f 8/8/29 9/9/30 19/20/31 18/19/32
|
||||||
|
f 9/9/33 10/10/34 20/21/35 19/20/36
|
||||||
|
f 10/10/37 1/11/38 11/22/39 20/21/40
|
||||||
|
f 11/12/41 12/13/42 22/24/43 21/23/44
|
||||||
|
f 12/13/45 13/14/46 23/25/47 22/24/48
|
||||||
|
f 13/14/49 14/15/50 24/26/51 23/25/52
|
||||||
|
f 14/15/53 15/16/54 25/27/55 24/26/56
|
||||||
|
f 15/16/57 16/17/58 26/28/59 25/27/60
|
||||||
|
f 16/17/61 17/18/62 27/29/63 26/28/64
|
||||||
|
f 17/18/65 18/19/66 28/30/67 27/29/68
|
||||||
|
f 18/19/69 19/20/70 29/31/71 28/30/72
|
||||||
|
f 19/20/73 20/21/74 30/32/75 29/31/76
|
||||||
|
f 20/21/77 11/22/78 21/33/79 30/32/80
|
||||||
|
f 51/57/81 52/58/82 32/35/83 31/34/84
|
||||||
|
f 52/58/85 53/59/86 33/36/87 32/35/88
|
||||||
|
f 54/60/89 55/61/90 35/38/91 34/37/92
|
||||||
|
f 55/61/93 56/62/94 36/39/95 35/38/96
|
||||||
|
f 56/62/97 57/63/98 37/40/99 36/39/100
|
||||||
|
f 57/63/101 58/64/102 38/41/103 37/40/104
|
||||||
|
f 58/64/105 59/65/106 39/42/107 38/41/108
|
||||||
|
f 59/65/109 60/66/110 40/43/111 39/42/112
|
||||||
|
f 60/66/113 51/56/114 31/44/115 40/43/116
|
||||||
|
f 31/34/117 32/35/118 42/46/119 41/45/120
|
||||||
|
f 32/35/121 33/36/122 43/47/123 42/46/124
|
||||||
|
f 33/36/125 34/37/126 44/48/127 43/47/128
|
||||||
|
f 34/37/129 35/38/130 45/49/131 44/48/132
|
||||||
|
f 35/38/133 36/39/134 46/50/135 45/49/136
|
||||||
|
f 92/100/137 93/101/138 94/102/139 95/103/140
|
||||||
|
f 37/40/141 38/41/142 48/52/143 47/51/144
|
||||||
|
f 38/41/145 39/42/146 49/53/147 48/52/148
|
||||||
|
f 39/42/149 40/43/150 50/54/151 49/53/152
|
||||||
|
f 40/43/153 31/44/154 41/55/155 50/54/156
|
||||||
|
f 34/37/157 33/36/158 53/59/159 54/60/160
|
||||||
|
s 1
|
||||||
|
f 47/51/161 44/48/162 45/49/163 46/50/164
|
||||||
|
s off
|
||||||
|
f 61/68/165 62/69/166 52/58/167 51/57/168
|
||||||
|
f 62/69/169 63/70/170 53/59/171 52/58/172
|
||||||
|
f 55/61/173 25/27/174 26/28/175 73/81/176 64/71/177 56/62/178
|
||||||
|
f 64/71/179 65/72/180 57/63/181 56/62/182
|
||||||
|
f 65/72/183 66/73/184 58/64/185 57/63/186
|
||||||
|
f 66/73/187 67/74/188 59/65/189 58/64/190
|
||||||
|
f 67/74/191 68/75/192 60/66/193 59/65/194
|
||||||
|
f 68/75/195 61/67/196 51/56/197 60/66/198
|
||||||
|
f 69/77/199 70/78/200 62/69/201 61/68/202
|
||||||
|
f 70/78/203 71/79/204 63/70/205 62/69/206
|
||||||
|
f 87/95/207 88/96/208 84/92/209 85/93/210
|
||||||
|
f 73/81/211 74/82/212 65/72/213 64/71/214
|
||||||
|
f 74/82/215 75/83/216 66/73/217 65/72/218
|
||||||
|
f 75/83/219 76/84/220 67/74/221 66/73/222
|
||||||
|
f 76/84/223 77/85/224 68/75/225 67/74/226
|
||||||
|
f 77/85/227 69/76/228 61/67/229 68/75/230
|
||||||
|
f 21/23/231 22/24/232 70/78/233 69/77/234
|
||||||
|
f 22/24/235 23/25/236 71/79/237 70/78/238
|
||||||
|
f 26/28/239 27/29/240 74/82/241 73/81/242
|
||||||
|
f 27/29/243 28/30/244 75/83/245 74/82/246
|
||||||
|
f 28/30/247 29/31/248 76/84/249 75/83/250
|
||||||
|
f 29/31/251 30/32/252 77/85/253 76/84/254
|
||||||
|
f 30/32/255 21/33/256 69/76/257 77/85/258
|
||||||
|
f 78/86/259 79/87/260 83/91/261 82/90/262
|
||||||
|
f 79/87/263 86/94/264 80/88/265 89/97/266 84/92/267 88/96/268 83/91/269
|
||||||
|
f 89/97/270 90/98/271 85/93/272 84/92/273
|
||||||
|
f 81/89/274 78/86/275 82/90/276 87/95/277 85/93/278 90/98/279
|
||||||
|
f 25/27/280 79/87/281 78/86/282 72/80/283 24/26/284
|
||||||
|
f 25/27/285 86/94/286 79/87/287
|
||||||
|
f 82/90/288 83/91/289 88/96/290 87/95/291
|
||||||
|
f 89/97/292 91/99/293 81/89/294 90/98/295
|
||||||
|
f 81/89/296 54/60/297 53/59/298 63/70/299 71/79/300 23/25/301 24/26/302 72/80/303 78/86/304
|
||||||
|
f 91/99/305 55/61/306 54/60/307 81/89/308
|
||||||
|
f 80/88/309 91/99/310 89/97/311
|
||||||
|
f 86/94/312 25/27/313 55/61/314 91/99/315 80/88/316
|
||||||
|
f 42/46/317 43/47/318 44/48/319 41/45/320
|
||||||
|
f 41/45/321 48/52/322 49/53/323 50/54/324
|
||||||
|
f 41/45/325 44/48/326 47/51/327 48/52/328
|
||||||
|
f 36/39/329 37/40/330 93/101/331 92/100/332
|
||||||
|
f 37/40/333 47/51/334 94/102/335 93/101/336
|
||||||
|
s 1
|
||||||
|
f 47/51/161 46/50/164 95/103/337 94/102/338
|
||||||
|
s off
|
||||||
|
f 46/50/339 36/39/340 92/100/341 95/103/342
|
||||||
|
f 4/4/343 3/3/344 2/2/345 1/11/346 10/10/347 9/9/348 8/8/349 7/7/350 6/6/351 5/5/352
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,366 @@
|
|||||||
|
# This file uses centimeters as units for non-parametric coordinates.
|
||||||
|
|
||||||
|
mtllib Rock2.mtl
|
||||||
|
g default
|
||||||
|
v 25.186993 -0.000000 22.022926
|
||||||
|
v 23.235949 -0.000000 20.605410
|
||||||
|
v 21.291489 -0.000000 20.612736
|
||||||
|
v 18.902213 -0.000000 22.030251
|
||||||
|
v 17.689819 -0.000000 24.316515
|
||||||
|
v 18.093956 -0.000000 26.764991
|
||||||
|
v 20.044999 -0.000000 28.592473
|
||||||
|
v 22.715751 -0.000000 27.063498
|
||||||
|
v 25.289833 -0.000000 26.712429
|
||||||
|
v 26.035066 -0.000000 24.418840
|
||||||
|
v 25.032486 1.111030 22.135182
|
||||||
|
v 23.176933 1.111030 20.787045
|
||||||
|
v 21.350506 1.111030 20.794371
|
||||||
|
v 19.056721 1.111030 22.142508
|
||||||
|
v 17.880801 1.111030 24.316515
|
||||||
|
v 18.248463 1.111030 26.652734
|
||||||
|
v 20.104015 1.111030 28.410839
|
||||||
|
v 22.656735 1.111030 26.881863
|
||||||
|
v 25.578291 1.111030 26.600172
|
||||||
|
v 26.287049 1.111030 24.418840
|
||||||
|
v 24.584087 2.113304 22.460962
|
||||||
|
v 23.005660 2.113304 21.314168
|
||||||
|
v 20.945110 2.200351 21.265721
|
||||||
|
v 19.028022 2.604830 22.538582
|
||||||
|
v 18.873284 2.113304 24.316515
|
||||||
|
v 19.737993 2.113304 26.785627
|
||||||
|
v 21.316420 2.113304 27.932422
|
||||||
|
v 22.844409 2.113304 26.778144
|
||||||
|
v 25.376599 2.267616 26.166443
|
||||||
|
v 25.971461 2.267616 24.292217
|
||||||
|
v 23.885690 3.148004 22.968377
|
||||||
|
v 22.738896 3.148004 22.135182
|
||||||
|
v 20.991676 3.235050 21.915197
|
||||||
|
v 19.361393 3.638554 22.738175
|
||||||
|
v 19.275273 3.148004 24.116913
|
||||||
|
v 19.975113 3.016991 26.078610
|
||||||
|
v 21.583184 2.941843 27.111407
|
||||||
|
v 22.680041 3.148004 26.194863
|
||||||
|
v 24.237660 3.193425 25.664652
|
||||||
|
v 24.675697 3.173016 24.316515
|
||||||
|
v 23.005660 4.105024 23.607758
|
||||||
|
v 22.402754 4.578174 23.169721
|
||||||
|
v 21.196246 4.105024 22.970118
|
||||||
|
v 20.593340 4.105024 23.408154
|
||||||
|
v 20.363051 4.578174 24.116913
|
||||||
|
v 20.593340 4.105024 24.825671
|
||||||
|
v 21.657523 4.105024 25.463310
|
||||||
|
v 21.972662 4.578174 25.096040
|
||||||
|
v 23.005660 4.105024 25.025273
|
||||||
|
v 23.235949 4.105024 24.316515
|
||||||
|
v 22.402754 4.578174 24.316515
|
||||||
|
v 21.382902 4.578174 23.643317
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.100000 0.500000
|
||||||
|
vt 0.200000 0.500000
|
||||||
|
vt 0.300000 0.500000
|
||||||
|
vt 0.400000 0.500000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt 0.600000 0.500000
|
||||||
|
vt 0.700000 0.500000
|
||||||
|
vt 0.800000 0.500000
|
||||||
|
vt 0.900000 0.500000
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 0.000000 0.600000
|
||||||
|
vt 0.100000 0.600000
|
||||||
|
vt 0.200000 0.600000
|
||||||
|
vt 0.300000 0.600000
|
||||||
|
vt 0.400000 0.600000
|
||||||
|
vt 0.500000 0.600000
|
||||||
|
vt 0.600000 0.600000
|
||||||
|
vt 0.700000 0.600000
|
||||||
|
vt 0.800000 0.600000
|
||||||
|
vt 0.900000 0.600000
|
||||||
|
vt 1.000000 0.600000
|
||||||
|
vt 0.000000 0.700000
|
||||||
|
vt 0.100000 0.700000
|
||||||
|
vt 0.200000 0.700000
|
||||||
|
vt 0.300000 0.700000
|
||||||
|
vt 0.400000 0.700000
|
||||||
|
vt 0.500000 0.700000
|
||||||
|
vt 0.600000 0.700000
|
||||||
|
vt 0.700000 0.700000
|
||||||
|
vt 0.800000 0.700000
|
||||||
|
vt 0.900000 0.700000
|
||||||
|
vt 1.000000 0.700000
|
||||||
|
vt 0.000000 0.800000
|
||||||
|
vt 0.100000 0.800000
|
||||||
|
vt 0.200000 0.800000
|
||||||
|
vt 0.300000 0.800000
|
||||||
|
vt 0.400000 0.800000
|
||||||
|
vt 0.500000 0.800000
|
||||||
|
vt 0.600000 0.800000
|
||||||
|
vt 0.700000 0.800000
|
||||||
|
vt 0.800000 0.800000
|
||||||
|
vt 0.900000 0.800000
|
||||||
|
vt 1.000000 0.800000
|
||||||
|
vt 0.000000 0.900000
|
||||||
|
vt 0.100000 0.900000
|
||||||
|
vt 0.200000 0.900000
|
||||||
|
vt 0.300000 0.900000
|
||||||
|
vt 0.400000 0.900000
|
||||||
|
vt 0.500000 0.900000
|
||||||
|
vt 0.600000 0.900000
|
||||||
|
vt 0.700000 0.900000
|
||||||
|
vt 0.800000 0.900000
|
||||||
|
vt 0.900000 0.900000
|
||||||
|
vt 1.000000 0.900000
|
||||||
|
vt 0.400000 0.900000
|
||||||
|
vt 0.250000 0.900000
|
||||||
|
vn 0.580084 0.161342 -0.798418
|
||||||
|
vn 0.580084 0.161342 -0.798418
|
||||||
|
vn 0.580084 0.161342 -0.798418
|
||||||
|
vn 0.580084 0.161342 -0.798418
|
||||||
|
vn -0.003834 0.161340 -0.986891
|
||||||
|
vn -0.003834 0.161340 -0.986891
|
||||||
|
vn -0.003834 0.161340 -0.986891
|
||||||
|
vn -0.003834 0.161340 -0.986891
|
||||||
|
vn -0.501906 0.160635 -0.849875
|
||||||
|
vn -0.501906 0.160635 -0.849875
|
||||||
|
vn -0.501906 0.160635 -0.849875
|
||||||
|
vn -0.501906 0.160635 -0.849875
|
||||||
|
vn -0.870375 0.158872 -0.466054
|
||||||
|
vn -0.870375 0.158872 -0.466054
|
||||||
|
vn -0.870375 0.158872 -0.466054
|
||||||
|
vn -0.870375 0.158872 -0.466054
|
||||||
|
vn -0.974604 0.159475 0.157209
|
||||||
|
vn -0.974604 0.159475 0.157209
|
||||||
|
vn -0.974604 0.159475 0.157209
|
||||||
|
vn -0.974604 0.159475 0.157209
|
||||||
|
vn -0.676819 0.160071 0.718536
|
||||||
|
vn -0.676819 0.160071 0.718536
|
||||||
|
vn -0.676819 0.160071 0.718536
|
||||||
|
vn -0.676819 0.160071 0.718536
|
||||||
|
vn 0.500263 0.139701 0.854530
|
||||||
|
vn 0.500263 0.139701 0.854530
|
||||||
|
vn 0.500263 0.139701 0.854530
|
||||||
|
vn 0.500263 0.139701 0.854530
|
||||||
|
vn 0.113574 0.118736 0.986409
|
||||||
|
vn 0.113574 0.118736 0.986409
|
||||||
|
vn 0.113574 0.118736 0.986409
|
||||||
|
vn 0.113574 0.118736 0.986409
|
||||||
|
vn 0.929675 -0.210853 0.302070
|
||||||
|
vn 0.929675 -0.210853 0.302070
|
||||||
|
vn 0.929675 -0.210853 0.302070
|
||||||
|
vn 0.929675 -0.210853 0.302070
|
||||||
|
vn 0.911983 -0.019305 -0.409774
|
||||||
|
vn 0.911983 -0.019305 -0.409774
|
||||||
|
vn 0.911983 -0.019305 -0.409774
|
||||||
|
vn 0.911983 -0.019305 -0.409774
|
||||||
|
vn 0.520225 0.465477 -0.716029
|
||||||
|
vn 0.520225 0.465477 -0.716029
|
||||||
|
vn 0.520225 0.465477 -0.716029
|
||||||
|
vn 0.520225 0.465477 -0.716029
|
||||||
|
vn 0.019266 0.435045 -0.900203
|
||||||
|
vn 0.019266 0.435045 -0.900203
|
||||||
|
vn 0.019266 0.435045 -0.900203
|
||||||
|
vn 0.019266 0.435045 -0.900203
|
||||||
|
vn -0.504272 0.197549 -0.840645
|
||||||
|
vn -0.504272 0.197549 -0.840645
|
||||||
|
vn -0.504272 0.197549 -0.840645
|
||||||
|
vn -0.504272 0.197549 -0.840645
|
||||||
|
vn -0.888777 0.383100 -0.251612
|
||||||
|
vn -0.888777 0.383100 -0.251612
|
||||||
|
vn -0.888777 0.383100 -0.251612
|
||||||
|
vn -0.888777 0.383100 -0.251612
|
||||||
|
vn -0.625358 0.763679 0.160379
|
||||||
|
vn -0.625358 0.763679 0.160379
|
||||||
|
vn -0.625358 0.763679 0.160379
|
||||||
|
vn -0.625358 0.763679 0.160379
|
||||||
|
vn -0.456193 0.707859 0.539281
|
||||||
|
vn -0.456193 0.707859 0.539281
|
||||||
|
vn -0.456193 0.707859 0.539281
|
||||||
|
vn -0.456193 0.707859 0.539281
|
||||||
|
vn 0.544025 -0.139704 0.827357
|
||||||
|
vn 0.544025 -0.139704 0.827357
|
||||||
|
vn 0.544025 -0.139704 0.827357
|
||||||
|
vn 0.544025 -0.139704 0.827357
|
||||||
|
vn 0.150333 0.239751 0.959124
|
||||||
|
vn 0.150333 0.239751 0.959124
|
||||||
|
vn 0.150333 0.239751 0.959124
|
||||||
|
vn 0.150333 0.239751 0.959124
|
||||||
|
vn 0.915077 0.275889 0.294143
|
||||||
|
vn 0.915077 0.275889 0.294143
|
||||||
|
vn 0.915077 0.275889 0.294143
|
||||||
|
vn 0.915077 0.275889 0.294143
|
||||||
|
vn 0.789517 0.327292 -0.519175
|
||||||
|
vn 0.789517 0.327292 -0.519175
|
||||||
|
vn 0.789517 0.327292 -0.519175
|
||||||
|
vn 0.789517 0.327292 -0.519175
|
||||||
|
vn 0.460444 0.621576 -0.633747
|
||||||
|
vn 0.460444 0.621576 -0.633747
|
||||||
|
vn 0.460444 0.621576 -0.633747
|
||||||
|
vn 0.460444 0.621576 -0.633747
|
||||||
|
vn 0.083626 0.583109 -0.808078
|
||||||
|
vn 0.083626 0.583109 -0.808078
|
||||||
|
vn 0.083626 0.583109 -0.808078
|
||||||
|
vn 0.083626 0.583109 -0.808078
|
||||||
|
vn -0.941734 0.334803 0.032305
|
||||||
|
vn -0.941734 0.334803 0.032305
|
||||||
|
vn -0.941734 0.334803 0.032305
|
||||||
|
vn -0.941734 0.334803 0.032305
|
||||||
|
vn -0.849046 0.426058 0.312402
|
||||||
|
vn -0.849046 0.426058 0.312402
|
||||||
|
vn -0.849046 0.426058 0.312402
|
||||||
|
vn -0.849046 0.426058 0.312402
|
||||||
|
vn -0.409545 0.667599 0.621760
|
||||||
|
vn -0.409545 0.667599 0.621760
|
||||||
|
vn -0.409545 0.667599 0.621760
|
||||||
|
vn -0.409545 0.667599 0.621760
|
||||||
|
vn 0.512367 0.498741 0.699098
|
||||||
|
vn 0.512367 0.498741 0.699098
|
||||||
|
vn 0.512367 0.498741 0.699098
|
||||||
|
vn 0.512367 0.498741 0.699098
|
||||||
|
vn 0.194804 0.570921 0.797559
|
||||||
|
vn 0.194804 0.570921 0.797559
|
||||||
|
vn 0.194804 0.570921 0.797559
|
||||||
|
vn 0.194804 0.570921 0.797559
|
||||||
|
vn 0.569111 0.802909 0.177338
|
||||||
|
vn 0.569111 0.802909 0.177338
|
||||||
|
vn 0.569111 0.802909 0.177338
|
||||||
|
vn 0.569111 0.802909 0.177338
|
||||||
|
vn 0.568551 0.701957 -0.428959
|
||||||
|
vn 0.568551 0.701957 -0.428959
|
||||||
|
vn 0.568551 0.701957 -0.428959
|
||||||
|
vn 0.568551 0.701957 -0.428959
|
||||||
|
vn 0.554426 0.648341 -0.521791
|
||||||
|
vn 0.554426 0.648341 -0.521791
|
||||||
|
vn 0.554427 0.648341 -0.521791
|
||||||
|
vn 0.554427 0.648341 -0.521791
|
||||||
|
vn 0.017111 0.672832 -0.739597
|
||||||
|
vn 0.017111 0.672832 -0.739597
|
||||||
|
vn 0.017111 0.672832 -0.739597
|
||||||
|
vn 0.017111 0.672832 -0.739597
|
||||||
|
vn -0.146247 0.837249 -0.526902
|
||||||
|
vn -0.146247 0.837249 -0.526902
|
||||||
|
vn -0.146247 0.837249 -0.526902
|
||||||
|
vn -0.146247 0.837249 -0.526902
|
||||||
|
vn -0.615451 0.783386 -0.086756
|
||||||
|
vn -0.615451 0.783386 -0.086756
|
||||||
|
vn -0.615451 0.783386 -0.086756
|
||||||
|
vn -0.615451 0.783386 -0.086756
|
||||||
|
vn -0.668374 0.640759 0.377762
|
||||||
|
vn -0.668374 0.640759 0.377762
|
||||||
|
vn -0.668374 0.640759 0.377762
|
||||||
|
vn -0.668374 0.640759 0.377762
|
||||||
|
vn -0.312212 0.785196 0.534781
|
||||||
|
vn -0.312212 0.785196 0.534780
|
||||||
|
vn -0.312212 0.785196 0.534781
|
||||||
|
vn -0.312212 0.785196 0.534781
|
||||||
|
vn 0.228837 0.733621 0.639870
|
||||||
|
vn 0.228837 0.733621 0.639870
|
||||||
|
vn 0.228837 0.733621 0.639870
|
||||||
|
vn 0.228837 0.733621 0.639870
|
||||||
|
vn 0.268465 0.707542 0.653690
|
||||||
|
vn 0.268465 0.707542 0.653690
|
||||||
|
vn 0.268465 0.707542 0.653690
|
||||||
|
vn 0.268465 0.707542 0.653690
|
||||||
|
vn 0.533113 0.829801 0.164985
|
||||||
|
vn 0.533113 0.829801 0.164985
|
||||||
|
vn 0.533113 0.829801 0.164985
|
||||||
|
vn 0.533113 0.829802 0.164985
|
||||||
|
vn 0.556588 0.780164 -0.285575
|
||||||
|
vn 0.556588 0.780164 -0.285575
|
||||||
|
vn 0.556588 0.780164 -0.285575
|
||||||
|
vn 0.556589 0.780164 -0.285575
|
||||||
|
vn -0.392903 0.410045 -0.823098
|
||||||
|
vn -0.392903 0.410045 -0.823098
|
||||||
|
vn -0.392903 0.410045 -0.823098
|
||||||
|
vn -0.392903 0.410045 -0.823098
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.449182 0.870925 0.199311
|
||||||
|
vn 0.449182 0.870925 0.199311
|
||||||
|
vn 0.449182 0.870925 0.199311
|
||||||
|
vn 0.449182 0.870925 0.199311
|
||||||
|
vn -0.238380 0.824416 -0.513335
|
||||||
|
vn -0.238380 0.824416 -0.513335
|
||||||
|
vn -0.238380 0.824416 -0.513335
|
||||||
|
vn -0.362342 0.713878 0.599239
|
||||||
|
vn -0.362342 0.713878 0.599239
|
||||||
|
vn -0.362342 0.713878 0.599239
|
||||||
|
vn -0.362342 0.713878 0.599239
|
||||||
|
vn 0.563665 0.823036 -0.069956
|
||||||
|
vn 0.563665 0.823036 -0.069956
|
||||||
|
vn 0.563665 0.823036 -0.069956
|
||||||
|
vn 0.563665 0.823036 -0.069956
|
||||||
|
vn -0.275874 0.755625 -0.594074
|
||||||
|
vn -0.275874 0.755625 -0.594074
|
||||||
|
vn -0.275874 0.755625 -0.594074
|
||||||
|
vn -0.344415 0.810345 -0.474046
|
||||||
|
vn -0.344415 0.810345 -0.474046
|
||||||
|
vn -0.344415 0.810345 -0.474046
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
s off
|
||||||
|
g pasted__pasted__pSphere3 pasted__pasted__pSphere1SmoothProxyGroup pasted__group group2
|
||||||
|
usemtl pasted__pasted__lambert3SG1
|
||||||
|
f 1/1/1 2/2/2 12/13/3 11/12/4
|
||||||
|
f 2/2/5 3/3/6 13/14/7 12/13/8
|
||||||
|
f 3/3/9 4/4/10 14/15/11 13/14/12
|
||||||
|
f 4/4/13 5/5/14 15/16/15 14/15/16
|
||||||
|
f 5/5/17 6/6/18 16/17/19 15/16/20
|
||||||
|
f 6/6/21 7/7/22 17/18/23 16/17/24
|
||||||
|
f 7/7/25 8/8/26 18/19/27 17/18/28
|
||||||
|
f 8/8/29 9/9/30 19/20/31 18/19/32
|
||||||
|
f 9/9/33 10/10/34 20/21/35 19/20/36
|
||||||
|
f 10/10/37 1/11/38 11/22/39 20/21/40
|
||||||
|
f 11/12/41 12/13/42 22/24/43 21/23/44
|
||||||
|
f 12/13/45 13/14/46 23/25/47 22/24/48
|
||||||
|
f 13/14/49 14/15/50 24/26/51 23/25/52
|
||||||
|
f 14/15/53 15/16/54 25/27/55 24/26/56
|
||||||
|
f 15/16/57 16/17/58 26/28/59 25/27/60
|
||||||
|
f 16/17/61 17/18/62 27/29/63 26/28/64
|
||||||
|
f 17/18/65 18/19/66 28/30/67 27/29/68
|
||||||
|
f 18/19/69 19/20/70 29/31/71 28/30/72
|
||||||
|
f 19/20/73 20/21/74 30/32/75 29/31/76
|
||||||
|
f 20/21/77 11/22/78 21/33/79 30/32/80
|
||||||
|
f 21/23/81 22/24/82 32/35/83 31/34/84
|
||||||
|
f 22/24/85 23/25/86 33/36/87 32/35/88
|
||||||
|
f 24/26/89 25/27/90 35/38/91 34/37/92
|
||||||
|
f 25/27/93 26/28/94 36/39/95 35/38/96
|
||||||
|
f 26/28/97 27/29/98 37/40/99 36/39/100
|
||||||
|
f 27/29/101 28/30/102 38/41/103 37/40/104
|
||||||
|
f 28/30/105 29/31/106 39/42/107 38/41/108
|
||||||
|
f 29/31/109 30/32/110 40/43/111 39/42/112
|
||||||
|
f 30/32/113 21/33/114 31/44/115 40/43/116
|
||||||
|
f 31/34/117 32/35/118 42/46/119 41/45/120
|
||||||
|
f 32/35/121 33/36/122 43/47/123 42/46/124
|
||||||
|
f 33/36/125 34/37/126 44/48/127 43/47/128
|
||||||
|
f 34/37/129 35/38/130 45/49/131 44/48/132
|
||||||
|
f 35/38/133 36/39/134 46/50/135 45/49/136
|
||||||
|
f 36/39/137 37/40/138 47/51/139 46/50/140
|
||||||
|
f 37/40/141 38/41/142 48/52/143 47/51/144
|
||||||
|
f 38/41/145 39/42/146 49/53/147 48/52/148
|
||||||
|
f 39/42/149 40/43/150 50/54/151 49/53/152
|
||||||
|
f 40/43/153 31/44/154 41/55/155 50/54/156
|
||||||
|
f 34/37/157 33/36/158 23/25/159 24/26/160
|
||||||
|
f 42/46/161 52/57/162 51/56/163
|
||||||
|
f 5/5/164 4/4/165 3/3/166 2/2/167 1/11/168 10/10/169 9/9/170 8/8/171 7/7/172 6/6/173
|
||||||
|
f 50/54/174 51/56/175 48/52/176 49/53/177
|
||||||
|
f 42/46/178 43/47/179 52/57/180
|
||||||
|
f 48/52/181 45/49/182 46/50/183 47/51/184
|
||||||
|
f 42/46/185 51/56/186 50/54/187 41/45/188
|
||||||
|
f 52/57/189 44/48/190 45/49/191
|
||||||
|
f 52/57/192 43/47/193 44/48/194
|
||||||
|
f 48/52/195 52/57/196 45/49/197
|
||||||
|
f 51/56/198 52/57/199 48/52/200
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,335 @@
|
|||||||
|
# This file uses centimeters as units for non-parametric coordinates.
|
||||||
|
|
||||||
|
mtllib Rock3.mtl
|
||||||
|
g default
|
||||||
|
v 13.833709 0.000000 20.545640
|
||||||
|
v 10.895352 0.067342 20.071071
|
||||||
|
v 8.423192 0.011054 19.337600
|
||||||
|
v 6.033916 0.000000 20.768441
|
||||||
|
v 5.288684 0.000000 23.926150
|
||||||
|
v 5.692821 0.000000 26.374625
|
||||||
|
v 7.643864 0.000000 28.202107
|
||||||
|
v 10.834814 0.000000 28.047221
|
||||||
|
v 13.424298 0.000000 27.316141
|
||||||
|
v 15.143125 0.000000 24.012658
|
||||||
|
v 13.679201 1.150071 20.610833
|
||||||
|
v 10.813328 1.551362 19.926895
|
||||||
|
v 8.482208 1.318615 19.300655
|
||||||
|
v 6.188423 1.120731 20.869002
|
||||||
|
v 5.479666 1.332809 23.926150
|
||||||
|
v 5.847328 1.332809 26.262369
|
||||||
|
v 7.702880 1.111030 28.020473
|
||||||
|
v 10.775798 1.111030 27.865586
|
||||||
|
v 13.750559 1.111030 27.164673
|
||||||
|
v 15.395108 1.111030 24.012658
|
||||||
|
v 12.848128 2.591355 21.221606
|
||||||
|
v 10.604525 3.538122 20.275184
|
||||||
|
v 8.653481 3.318093 20.275184
|
||||||
|
v 7.075054 2.518015 21.824256
|
||||||
|
v 6.874138 2.940163 23.717881
|
||||||
|
v 7.573977 2.908714 25.688245
|
||||||
|
v 8.915285 2.113304 27.542056
|
||||||
|
v 10.604525 2.113304 26.928497
|
||||||
|
v 13.251090 2.644528 25.498312
|
||||||
|
v 13.905365 2.782922 23.589474
|
||||||
|
v 11.561858 5.301655 22.160232
|
||||||
|
v 10.337761 4.912658 21.096198
|
||||||
|
v 8.458968 4.369444 20.896596
|
||||||
|
v 7.312174 3.581077 22.040814
|
||||||
|
v 9.182049 2.908714 26.721042
|
||||||
|
v 10.337761 3.004681 26.107482
|
||||||
|
v 11.836525 3.970716 25.274288
|
||||||
|
v 12.274561 4.808196 23.926150
|
||||||
|
v 10.604525 6.143015 22.936974
|
||||||
|
v 10.001619 6.065552 22.367323
|
||||||
|
v 8.795110 5.082905 22.167721
|
||||||
|
v 8.192205 4.518381 22.737372
|
||||||
|
v 7.961915 5.332164 23.657443
|
||||||
|
v 7.922168 3.513467 25.185728
|
||||||
|
v 8.986351 3.787577 25.823367
|
||||||
|
v 10.001619 5.762042 25.072944
|
||||||
|
v 10.604525 4.884316 24.634908
|
||||||
|
v 10.834814 5.547103 23.857046
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.100000 0.500000
|
||||||
|
vt 0.200000 0.500000
|
||||||
|
vt 0.300000 0.500000
|
||||||
|
vt 0.400000 0.500000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt 0.600000 0.500000
|
||||||
|
vt 0.700000 0.500000
|
||||||
|
vt 0.800000 0.500000
|
||||||
|
vt 0.900000 0.500000
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 0.000000 0.600000
|
||||||
|
vt 0.100000 0.600000
|
||||||
|
vt 0.200000 0.600000
|
||||||
|
vt 0.300000 0.600000
|
||||||
|
vt 0.400000 0.600000
|
||||||
|
vt 0.500000 0.600000
|
||||||
|
vt 0.600000 0.600000
|
||||||
|
vt 0.700000 0.600000
|
||||||
|
vt 0.800000 0.600000
|
||||||
|
vt 0.900000 0.600000
|
||||||
|
vt 1.000000 0.600000
|
||||||
|
vt 0.000000 0.700000
|
||||||
|
vt 0.100000 0.700000
|
||||||
|
vt 0.200000 0.700000
|
||||||
|
vt 0.300000 0.700000
|
||||||
|
vt 0.400000 0.750000
|
||||||
|
vt 0.500000 0.750000
|
||||||
|
vt 0.600000 0.700000
|
||||||
|
vt 0.700000 0.700000
|
||||||
|
vt 0.800000 0.700000
|
||||||
|
vt 0.900000 0.700000
|
||||||
|
vt 1.000000 0.700000
|
||||||
|
vt 0.000000 0.800000
|
||||||
|
vt 0.100000 0.800000
|
||||||
|
vt 0.200000 0.800000
|
||||||
|
vt 0.300000 0.800000
|
||||||
|
vt 0.600000 0.800000
|
||||||
|
vt 0.700000 0.800000
|
||||||
|
vt 0.800000 0.800000
|
||||||
|
vt 0.900000 0.800000
|
||||||
|
vt 1.000000 0.800000
|
||||||
|
vt 0.000000 0.900000
|
||||||
|
vt 0.100000 0.900000
|
||||||
|
vt 0.200000 0.900000
|
||||||
|
vt 0.300000 0.900000
|
||||||
|
vt 0.400000 0.900000
|
||||||
|
vt 0.500000 0.900000
|
||||||
|
vt 0.600000 0.900000
|
||||||
|
vt 0.700000 0.900000
|
||||||
|
vt 0.800000 0.900000
|
||||||
|
vt 0.900000 0.900000
|
||||||
|
vt 1.000000 0.900000
|
||||||
|
vn 0.194797 -0.011916 -0.980771
|
||||||
|
vn 0.194797 -0.011916 -0.980771
|
||||||
|
vn 0.194797 -0.011916 -0.980771
|
||||||
|
vn 0.194797 -0.011916 -0.980771
|
||||||
|
vn 0.275226 -0.059985 -0.959506
|
||||||
|
vn 0.275226 -0.059985 -0.959506
|
||||||
|
vn 0.275226 -0.059985 -0.959506
|
||||||
|
vn 0.275226 -0.059985 -0.959506
|
||||||
|
vn -0.540206 0.069472 -0.838661
|
||||||
|
vn -0.540206 0.069472 -0.838661
|
||||||
|
vn -0.540206 0.069472 -0.838660
|
||||||
|
vn -0.540206 0.069472 -0.838661
|
||||||
|
vn -0.962317 0.144937 -0.230084
|
||||||
|
vn -0.962317 0.144937 -0.230084
|
||||||
|
vn -0.962317 0.144937 -0.230084
|
||||||
|
vn -0.962317 0.144937 -0.230084
|
||||||
|
vn -0.978408 0.133457 0.157823
|
||||||
|
vn -0.978408 0.133457 0.157823
|
||||||
|
vn -0.978408 0.133457 0.157823
|
||||||
|
vn -0.978408 0.133457 0.157823
|
||||||
|
vn -0.673794 0.145980 0.724355
|
||||||
|
vn -0.673794 0.145980 0.724355
|
||||||
|
vn -0.673794 0.145980 0.724355
|
||||||
|
vn -0.673794 0.145980 0.724355
|
||||||
|
vn 0.048748 0.161149 0.985725
|
||||||
|
vn 0.048748 0.161149 0.985725
|
||||||
|
vn 0.048748 0.161149 0.985725
|
||||||
|
vn 0.048748 0.161149 0.985725
|
||||||
|
vn 0.247597 0.114444 0.962080
|
||||||
|
vn 0.247597 0.114444 0.962080
|
||||||
|
vn 0.247597 0.114444 0.962080
|
||||||
|
vn 0.247597 0.114444 0.962080
|
||||||
|
vn 0.869747 -0.195444 0.453146
|
||||||
|
vn 0.869747 -0.195444 0.453146
|
||||||
|
vn 0.869747 -0.195444 0.453146
|
||||||
|
vn 0.869747 -0.195444 0.453146
|
||||||
|
vn 0.914754 -0.027814 -0.403054
|
||||||
|
vn 0.914754 -0.027814 -0.403054
|
||||||
|
vn 0.914754 -0.027814 -0.403054
|
||||||
|
vn 0.914754 -0.027814 -0.403054
|
||||||
|
vn 0.367579 0.352295 -0.860682
|
||||||
|
vn 0.367579 0.352295 -0.860682
|
||||||
|
vn 0.367579 0.352295 -0.860682
|
||||||
|
vn 0.367579 0.352295 -0.860682
|
||||||
|
vn 0.104781 0.314112 -0.943586
|
||||||
|
vn 0.104781 0.314112 -0.943586
|
||||||
|
vn 0.104781 0.314112 -0.943586
|
||||||
|
vn 0.104781 0.314112 -0.943586
|
||||||
|
vn -0.611418 0.526190 -0.591009
|
||||||
|
vn -0.611418 0.526190 -0.591009
|
||||||
|
vn -0.611418 0.526190 -0.591009
|
||||||
|
vn -0.611418 0.526190 -0.591009
|
||||||
|
vn -0.750504 0.623933 -0.217830
|
||||||
|
vn -0.750504 0.623934 -0.217830
|
||||||
|
vn -0.750504 0.623933 -0.217830
|
||||||
|
vn -0.750504 0.623933 -0.217830
|
||||||
|
vn -0.681408 0.710897 0.174096
|
||||||
|
vn -0.681408 0.710897 0.174096
|
||||||
|
vn -0.681408 0.710897 0.174096
|
||||||
|
vn -0.681408 0.710897 0.174096
|
||||||
|
vn -0.417580 0.708358 0.569083
|
||||||
|
vn -0.417580 0.708358 0.569083
|
||||||
|
vn -0.417580 0.708358 0.569083
|
||||||
|
vn -0.417580 0.708358 0.569083
|
||||||
|
vn 0.135733 0.523482 0.841156
|
||||||
|
vn 0.135733 0.523482 0.841156
|
||||||
|
vn 0.135733 0.523482 0.841156
|
||||||
|
vn 0.135733 0.523482 0.841156
|
||||||
|
vn 0.182076 0.727417 0.661598
|
||||||
|
vn 0.182076 0.727417 0.661598
|
||||||
|
vn 0.182076 0.727417 0.661598
|
||||||
|
vn 0.182076 0.727417 0.661598
|
||||||
|
vn 0.689856 0.643864 0.330965
|
||||||
|
vn 0.689856 0.643864 0.330965
|
||||||
|
vn 0.689856 0.643864 0.330965
|
||||||
|
vn 0.689856 0.643864 0.330965
|
||||||
|
vn 0.734654 0.569856 -0.368169
|
||||||
|
vn 0.734654 0.569856 -0.368169
|
||||||
|
vn 0.734654 0.569856 -0.368169
|
||||||
|
vn 0.734654 0.569856 -0.368169
|
||||||
|
vn 0.493929 0.495560 -0.714460
|
||||||
|
vn 0.493929 0.495560 -0.714460
|
||||||
|
vn 0.493929 0.495560 -0.714460
|
||||||
|
vn 0.493929 0.495560 -0.714460
|
||||||
|
vn -0.055181 0.502526 -0.862799
|
||||||
|
vn -0.055181 0.502526 -0.862799
|
||||||
|
vn -0.055181 0.502526 -0.862799
|
||||||
|
vn -0.055181 0.502526 -0.862799
|
||||||
|
vn -0.956799 0.245235 -0.156188
|
||||||
|
vn -0.956799 0.245235 -0.156188
|
||||||
|
vn -0.956799 0.245235 -0.156188
|
||||||
|
vn -0.372740 0.724050 0.580359
|
||||||
|
vn -0.372740 0.724050 0.580359
|
||||||
|
vn -0.372740 0.724050 0.580359
|
||||||
|
vn 0.274567 0.670728 0.689011
|
||||||
|
vn 0.274567 0.670728 0.689011
|
||||||
|
vn 0.274567 0.670728 0.689011
|
||||||
|
vn 0.274567 0.670728 0.689011
|
||||||
|
vn 0.235444 0.554619 0.798100
|
||||||
|
vn 0.235444 0.554619 0.798100
|
||||||
|
vn 0.235444 0.554619 0.798100
|
||||||
|
vn 0.235444 0.554619 0.798100
|
||||||
|
vn 0.681798 0.605743 0.410155
|
||||||
|
vn 0.681798 0.605743 0.410155
|
||||||
|
vn 0.681798 0.605743 0.410155
|
||||||
|
vn 0.681798 0.605743 0.410155
|
||||||
|
vn 0.777186 0.557392 -0.292057
|
||||||
|
vn 0.777186 0.557392 -0.292057
|
||||||
|
vn 0.777186 0.557392 -0.292057
|
||||||
|
vn 0.777186 0.557392 -0.292057
|
||||||
|
vn 0.303374 0.771312 -0.559502
|
||||||
|
vn 0.303374 0.771312 -0.559502
|
||||||
|
vn 0.303374 0.771312 -0.559502
|
||||||
|
vn 0.303374 0.771312 -0.559502
|
||||||
|
vn -0.306581 0.767279 -0.563286
|
||||||
|
vn -0.306581 0.767279 -0.563287
|
||||||
|
vn -0.306581 0.767279 -0.563287
|
||||||
|
vn -0.306581 0.767279 -0.563287
|
||||||
|
vn -0.695994 0.700552 -0.157544
|
||||||
|
vn -0.695994 0.700552 -0.157544
|
||||||
|
vn -0.695994 0.700552 -0.157544
|
||||||
|
vn -0.695994 0.700552 -0.157544
|
||||||
|
vn -0.813570 0.527577 -0.244473
|
||||||
|
vn -0.813570 0.527577 -0.244473
|
||||||
|
vn -0.813570 0.527577 -0.244473
|
||||||
|
vn -0.813570 0.527577 -0.244473
|
||||||
|
vn -0.798753 0.456390 0.392048
|
||||||
|
vn -0.798753 0.456390 0.392048
|
||||||
|
vn -0.798753 0.456390 0.392048
|
||||||
|
vn -0.798753 0.456390 0.392048
|
||||||
|
vn -0.455097 0.635462 0.623759
|
||||||
|
vn -0.455097 0.635462 0.623759
|
||||||
|
vn -0.455097 0.635462 0.623759
|
||||||
|
vn -0.455097 0.635462 0.623759
|
||||||
|
vn 0.093149 0.477794 0.873519
|
||||||
|
vn 0.093149 0.477794 0.873519
|
||||||
|
vn 0.093149 0.477794 0.873519
|
||||||
|
vn 0.093149 0.477794 0.873519
|
||||||
|
vn 0.426084 0.519684 0.740527
|
||||||
|
vn 0.426084 0.519685 0.740527
|
||||||
|
vn 0.426084 0.519685 0.740527
|
||||||
|
vn 0.426084 0.519685 0.740527
|
||||||
|
vn 0.292845 0.735440 0.611040
|
||||||
|
vn 0.292845 0.735440 0.611040
|
||||||
|
vn 0.292845 0.735440 0.611040
|
||||||
|
vn 0.292845 0.735440 0.611040
|
||||||
|
vn 0.571919 0.810287 0.127844
|
||||||
|
vn 0.571919 0.810287 0.127844
|
||||||
|
vn 0.571919 0.810287 0.127844
|
||||||
|
vn 0.571919 0.810287 0.127844
|
||||||
|
vn -0.750908 0.256338 -0.608628
|
||||||
|
vn -0.750908 0.256338 -0.608628
|
||||||
|
vn -0.750908 0.256338 -0.608628
|
||||||
|
vn -0.750908 0.256338 -0.608628
|
||||||
|
vn -0.584539 0.607145 0.538227
|
||||||
|
vn -0.584539 0.607145 0.538227
|
||||||
|
vn -0.584539 0.607145 0.538227
|
||||||
|
vn -0.584539 0.607145 0.538227
|
||||||
|
vn 0.000551 -0.999995 -0.003129
|
||||||
|
vn 0.000551 -0.999995 -0.003129
|
||||||
|
vn 0.000551 -0.999995 -0.003129
|
||||||
|
vn 0.000551 -0.999995 -0.003129
|
||||||
|
vn 0.000551 -0.999995 -0.003129
|
||||||
|
vn 0.000551 -0.999995 -0.003129
|
||||||
|
vn 0.000551 -0.999995 -0.003129
|
||||||
|
vn 0.000551 -0.999995 -0.003129
|
||||||
|
vn 0.000551 -0.999995 -0.003129
|
||||||
|
vn 0.000551 -0.999995 -0.003129
|
||||||
|
vn 0.809645 0.306279 0.500668
|
||||||
|
vn 0.809645 0.306279 0.500668
|
||||||
|
vn 0.809645 0.306278 0.500668
|
||||||
|
vn -0.546598 0.537686 0.641969
|
||||||
|
vn -0.546598 0.537686 0.641969
|
||||||
|
vn -0.546598 0.537686 0.641969
|
||||||
|
vn -0.546598 0.537686 0.641969
|
||||||
|
vn -0.794478 0.342314 -0.501623
|
||||||
|
vn -0.794478 0.342314 -0.501623
|
||||||
|
vn -0.794478 0.342314 -0.501623
|
||||||
|
vn -0.058940 0.977204 -0.203958
|
||||||
|
vn -0.058940 0.977204 -0.203958
|
||||||
|
vn -0.058940 0.977204 -0.203958
|
||||||
|
vn -0.058940 0.977204 -0.203958
|
||||||
|
s off
|
||||||
|
g pasted__pasted__pSphere2 pasted__pasted__pSphere1SmoothProxyGroup pasted__group group2
|
||||||
|
usemtl pasted__pasted__lambert3SG1
|
||||||
|
f 1/1/1 2/2/2 12/13/3 11/12/4
|
||||||
|
f 2/2/5 3/3/6 13/14/7 12/13/8
|
||||||
|
f 3/3/9 4/4/10 14/15/11 13/14/12
|
||||||
|
f 4/4/13 5/5/14 15/16/15 14/15/16
|
||||||
|
f 5/5/17 6/6/18 16/17/19 15/16/20
|
||||||
|
f 6/6/21 7/7/22 17/18/23 16/17/24
|
||||||
|
f 7/7/25 8/8/26 18/19/27 17/18/28
|
||||||
|
f 8/8/29 9/9/30 19/20/31 18/19/32
|
||||||
|
f 9/9/33 10/10/34 20/21/35 19/20/36
|
||||||
|
f 10/10/37 1/11/38 11/22/39 20/21/40
|
||||||
|
f 11/12/41 12/13/42 22/24/43 21/23/44
|
||||||
|
f 12/13/45 13/14/46 23/25/47 22/24/48
|
||||||
|
f 13/14/49 14/15/50 24/26/51 23/25/52
|
||||||
|
f 14/15/53 15/16/54 25/27/55 24/26/56
|
||||||
|
f 15/16/57 16/17/58 26/28/59 25/27/60
|
||||||
|
f 16/17/61 17/18/62 27/29/63 26/28/64
|
||||||
|
f 17/18/65 18/19/66 28/30/67 27/29/68
|
||||||
|
f 18/19/69 19/20/70 29/31/71 28/30/72
|
||||||
|
f 19/20/73 20/21/74 30/32/75 29/31/76
|
||||||
|
f 20/21/77 11/22/78 21/33/79 30/32/80
|
||||||
|
f 21/23/81 22/24/82 32/35/83 31/34/84
|
||||||
|
f 22/24/85 23/25/86 33/36/87 32/35/88
|
||||||
|
f 24/26/89 25/27/90 34/37/91
|
||||||
|
f 26/28/92 27/29/93 35/38/94
|
||||||
|
f 27/29/95 28/30/96 36/39/97 35/38/98
|
||||||
|
f 28/30/99 29/31/100 37/40/101 36/39/102
|
||||||
|
f 29/31/103 30/32/104 38/41/105 37/40/106
|
||||||
|
f 30/32/107 21/33/108 31/42/109 38/41/110
|
||||||
|
f 31/34/111 32/35/112 40/44/113 39/43/114
|
||||||
|
f 32/35/115 33/36/116 41/45/117 40/44/118
|
||||||
|
f 33/36/119 34/37/120 42/46/121 41/45/122
|
||||||
|
f 34/37/123 25/27/124 43/47/125 42/46/126
|
||||||
|
f 25/27/127 26/28/128 44/48/129 43/47/130
|
||||||
|
f 26/28/131 35/38/132 45/49/133 44/48/134
|
||||||
|
f 35/38/135 36/39/136 46/50/137 45/49/138
|
||||||
|
f 36/39/139 37/40/140 47/51/141 46/50/142
|
||||||
|
f 37/40/143 38/41/144 48/52/145 47/51/146
|
||||||
|
f 38/41/147 31/42/148 39/53/149 48/52/150
|
||||||
|
f 34/37/151 33/36/152 23/25/153 24/26/154
|
||||||
|
f 40/44/155 41/45/156 48/52/157 39/43/158
|
||||||
|
f 5/5/159 4/4/160 3/3/161 2/2/162 1/11/163 10/10/164 9/9/165 8/8/166 7/7/167 6/6/168
|
||||||
|
f 48/52/169 46/50/170 47/51/171
|
||||||
|
f 46/50/172 43/47/173 44/48/174 45/49/175
|
||||||
|
f 43/47/176 41/45/177 42/46/178
|
||||||
|
f 48/52/179 41/45/180 43/47/181 46/50/182
|
||||||
@@ -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
|
||||||
@@ -0,0 +1,334 @@
|
|||||||
|
# This file uses centimeters as units for non-parametric coordinates.
|
||||||
|
|
||||||
|
mtllib Rock4.mtl
|
||||||
|
g default
|
||||||
|
v 3.156854 0.000000 21.076940
|
||||||
|
v 1.205811 0.000000 19.659424
|
||||||
|
v -1.205811 0.000000 18.795304
|
||||||
|
v -3.595087 0.000000 20.212820
|
||||||
|
v -4.340319 0.000000 23.370529
|
||||||
|
v -3.936182 0.000000 25.819004
|
||||||
|
v -1.985139 0.000000 27.646486
|
||||||
|
v 1.205811 0.000000 27.491600
|
||||||
|
v 3.721038 0.000000 26.837546
|
||||||
|
v 4.466270 0.000000 24.543957
|
||||||
|
v 3.002347 1.111030 21.189196
|
||||||
|
v 1.146794 1.111030 19.841058
|
||||||
|
v -1.146795 1.111030 18.976938
|
||||||
|
v -3.440580 1.111030 20.325076
|
||||||
|
v -4.149338 1.111030 23.370529
|
||||||
|
v -3.781675 1.111030 25.706748
|
||||||
|
v -1.926123 1.111030 27.464852
|
||||||
|
v 1.146794 1.111030 27.309965
|
||||||
|
v 4.009496 1.111030 26.725290
|
||||||
|
v 4.718253 1.111030 24.543957
|
||||||
|
v 2.553948 2.113304 21.514976
|
||||||
|
v 0.975521 2.113304 20.368182
|
||||||
|
v -0.975522 2.113304 20.368182
|
||||||
|
v -2.553949 2.113304 21.514977
|
||||||
|
v -3.156854 2.113304 23.370529
|
||||||
|
v -2.292145 2.113304 25.839641
|
||||||
|
v -0.713718 2.113304 26.986435
|
||||||
|
v 0.975522 2.113304 26.372876
|
||||||
|
v 3.348883 2.267616 25.226081
|
||||||
|
v 3.951788 2.267616 23.370529
|
||||||
|
v 1.855552 2.908714 22.022391
|
||||||
|
v 0.708758 2.908714 21.189196
|
||||||
|
v -1.170035 2.908714 20.989594
|
||||||
|
v -2.316829 2.908714 21.822789
|
||||||
|
v -2.754866 2.908714 23.170926
|
||||||
|
v -2.055026 2.908714 25.132624
|
||||||
|
v -0.446955 2.908714 26.165421
|
||||||
|
v 0.708758 2.908714 25.551861
|
||||||
|
v 2.207522 3.063025 24.718667
|
||||||
|
v 2.645558 3.063025 23.370529
|
||||||
|
v 0.975522 3.419398 22.661771
|
||||||
|
v 0.372616 3.419398 22.223734
|
||||||
|
v -0.833893 3.419398 22.024132
|
||||||
|
v -1.436798 3.419398 22.462168
|
||||||
|
v -1.667088 3.419398 23.170926
|
||||||
|
v -1.436798 3.419398 23.879684
|
||||||
|
v -0.372616 3.419398 24.517323
|
||||||
|
v 0.372616 3.419398 24.517323
|
||||||
|
v 0.975521 3.419398 24.079287
|
||||||
|
v 1.205811 3.419398 23.370529
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.100000 0.500000
|
||||||
|
vt 0.200000 0.500000
|
||||||
|
vt 0.300000 0.500000
|
||||||
|
vt 0.400000 0.500000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt 0.600000 0.500000
|
||||||
|
vt 0.700000 0.500000
|
||||||
|
vt 0.800000 0.500000
|
||||||
|
vt 0.900000 0.500000
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 0.000000 0.600000
|
||||||
|
vt 0.100000 0.600000
|
||||||
|
vt 0.200000 0.600000
|
||||||
|
vt 0.300000 0.600000
|
||||||
|
vt 0.400000 0.600000
|
||||||
|
vt 0.500000 0.600000
|
||||||
|
vt 0.600000 0.600000
|
||||||
|
vt 0.700000 0.600000
|
||||||
|
vt 0.800000 0.600000
|
||||||
|
vt 0.900000 0.600000
|
||||||
|
vt 1.000000 0.600000
|
||||||
|
vt 0.000000 0.700000
|
||||||
|
vt 0.100000 0.700000
|
||||||
|
vt 0.200000 0.700000
|
||||||
|
vt 0.300000 0.700000
|
||||||
|
vt 0.400000 0.700000
|
||||||
|
vt 0.500000 0.700000
|
||||||
|
vt 0.600000 0.700000
|
||||||
|
vt 0.700000 0.700000
|
||||||
|
vt 0.800000 0.700000
|
||||||
|
vt 0.900000 0.700000
|
||||||
|
vt 1.000000 0.700000
|
||||||
|
vt 0.000000 0.800000
|
||||||
|
vt 0.100000 0.800000
|
||||||
|
vt 0.200000 0.800000
|
||||||
|
vt 0.300000 0.800000
|
||||||
|
vt 0.400000 0.800000
|
||||||
|
vt 0.500000 0.800000
|
||||||
|
vt 0.600000 0.800000
|
||||||
|
vt 0.700000 0.800000
|
||||||
|
vt 0.800000 0.800000
|
||||||
|
vt 0.900000 0.800000
|
||||||
|
vt 1.000000 0.800000
|
||||||
|
vt 0.000000 0.900000
|
||||||
|
vt 0.100000 0.900000
|
||||||
|
vt 0.200000 0.900000
|
||||||
|
vt 0.300000 0.900000
|
||||||
|
vt 0.400000 0.900000
|
||||||
|
vt 0.500000 0.900000
|
||||||
|
vt 0.600000 0.900000
|
||||||
|
vt 0.700000 0.900000
|
||||||
|
vt 0.800000 0.900000
|
||||||
|
vt 0.900000 0.900000
|
||||||
|
vt 1.000000 0.900000
|
||||||
|
vn 0.580084 0.161341 -0.798418
|
||||||
|
vn 0.580084 0.161341 -0.798418
|
||||||
|
vn 0.580084 0.161341 -0.798418
|
||||||
|
vn 0.580084 0.161341 -0.798418
|
||||||
|
vn 0.340792 0.151683 -0.927822
|
||||||
|
vn 0.340792 0.151683 -0.927822
|
||||||
|
vn 0.340792 0.151683 -0.927822
|
||||||
|
vn 0.340792 0.151683 -0.927822
|
||||||
|
vn -0.501906 0.160634 -0.849874
|
||||||
|
vn -0.501906 0.160634 -0.849874
|
||||||
|
vn -0.501906 0.160634 -0.849874
|
||||||
|
vn -0.501906 0.160634 -0.849874
|
||||||
|
vn -0.960944 0.160788 -0.225240
|
||||||
|
vn -0.960944 0.160788 -0.225240
|
||||||
|
vn -0.960944 0.160788 -0.225240
|
||||||
|
vn -0.960944 0.160788 -0.225240
|
||||||
|
vn -0.974604 0.159475 0.157209
|
||||||
|
vn -0.974604 0.159475 0.157209
|
||||||
|
vn -0.974604 0.159475 0.157209
|
||||||
|
vn -0.974604 0.159475 0.157209
|
||||||
|
vn -0.676818 0.160071 0.718536
|
||||||
|
vn -0.676818 0.160071 0.718536
|
||||||
|
vn -0.676818 0.160071 0.718536
|
||||||
|
vn -0.676818 0.160071 0.718536
|
||||||
|
vn 0.048748 0.161149 0.985725
|
||||||
|
vn 0.048748 0.161149 0.985725
|
||||||
|
vn 0.048748 0.161149 0.985725
|
||||||
|
vn 0.048748 0.161149 0.985725
|
||||||
|
vn 0.223215 0.105123 0.969084
|
||||||
|
vn 0.223215 0.105123 0.969084
|
||||||
|
vn 0.223215 0.105123 0.969084
|
||||||
|
vn 0.223215 0.105123 0.969084
|
||||||
|
vn 0.929675 -0.210852 0.302070
|
||||||
|
vn 0.929675 -0.210852 0.302070
|
||||||
|
vn 0.929675 -0.210852 0.302070
|
||||||
|
vn 0.929675 -0.210852 0.302070
|
||||||
|
vn 0.913963 -0.019617 -0.405324
|
||||||
|
vn 0.913962 -0.019617 -0.405324
|
||||||
|
vn 0.913962 -0.019617 -0.405324
|
||||||
|
vn 0.913962 -0.019617 -0.405324
|
||||||
|
vn 0.520225 0.465477 -0.716029
|
||||||
|
vn 0.520225 0.465477 -0.716029
|
||||||
|
vn 0.520225 0.465477 -0.716029
|
||||||
|
vn 0.520225 0.465477 -0.716029
|
||||||
|
vn 0.145514 0.684047 -0.714777
|
||||||
|
vn 0.145514 0.684047 -0.714777
|
||||||
|
vn 0.145514 0.684047 -0.714777
|
||||||
|
vn 0.145514 0.684047 -0.714777
|
||||||
|
vn -0.319592 0.807359 -0.496017
|
||||||
|
vn -0.319592 0.807359 -0.496017
|
||||||
|
vn -0.319592 0.807359 -0.496017
|
||||||
|
vn -0.319592 0.807359 -0.496017
|
||||||
|
vn -0.663215 0.727077 -0.177497
|
||||||
|
vn -0.663215 0.727077 -0.177497
|
||||||
|
vn -0.663215 0.727077 -0.177497
|
||||||
|
vn -0.663215 0.727077 -0.177497
|
||||||
|
vn -0.625358 0.763680 0.160379
|
||||||
|
vn -0.625358 0.763680 0.160379
|
||||||
|
vn -0.625358 0.763680 0.160379
|
||||||
|
vn -0.625358 0.763680 0.160379
|
||||||
|
vn -0.456193 0.707859 0.539281
|
||||||
|
vn -0.456193 0.707859 0.539281
|
||||||
|
vn -0.456193 0.707859 0.539281
|
||||||
|
vn -0.456193 0.707859 0.539281
|
||||||
|
vn 0.135733 0.523482 0.841156
|
||||||
|
vn 0.135733 0.523482 0.841156
|
||||||
|
vn 0.135733 0.523482 0.841156
|
||||||
|
vn 0.135733 0.523482 0.841156
|
||||||
|
vn 0.181387 0.765946 0.616787
|
||||||
|
vn 0.181387 0.765946 0.616787
|
||||||
|
vn 0.181387 0.765946 0.616787
|
||||||
|
vn 0.181387 0.765946 0.616787
|
||||||
|
vn 0.691661 0.686367 0.224734
|
||||||
|
vn 0.691661 0.686367 0.224734
|
||||||
|
vn 0.691661 0.686367 0.224734
|
||||||
|
vn 0.691661 0.686367 0.224734
|
||||||
|
vn 0.823696 0.267139 -0.500162
|
||||||
|
vn 0.823696 0.267139 -0.500162
|
||||||
|
vn 0.823696 0.267139 -0.500162
|
||||||
|
vn 0.823696 0.267139 -0.500162
|
||||||
|
vn 0.408992 0.718217 -0.562929
|
||||||
|
vn 0.408992 0.718217 -0.562929
|
||||||
|
vn 0.408992 0.718217 -0.562929
|
||||||
|
vn 0.408992 0.718217 -0.562929
|
||||||
|
vn 0.038292 0.677288 -0.734721
|
||||||
|
vn 0.038292 0.677288 -0.734721
|
||||||
|
vn 0.038292 0.677288 -0.734721
|
||||||
|
vn 0.038292 0.677288 -0.734721
|
||||||
|
vn -0.882086 0.373872 -0.286607
|
||||||
|
vn -0.882086 0.373872 -0.286607
|
||||||
|
vn -0.882086 0.373872 -0.286607
|
||||||
|
vn -0.882086 0.373872 -0.286607
|
||||||
|
vn -0.819706 0.494272 0.289444
|
||||||
|
vn -0.819706 0.494271 0.289444
|
||||||
|
vn -0.819706 0.494271 0.289444
|
||||||
|
vn -0.819706 0.494271 0.289444
|
||||||
|
vn -0.404913 0.696861 0.591971
|
||||||
|
vn -0.404913 0.696861 0.591971
|
||||||
|
vn -0.404913 0.696861 0.591971
|
||||||
|
vn -0.404913 0.696861 0.591971
|
||||||
|
vn 0.287461 0.687903 0.666450
|
||||||
|
vn 0.287461 0.687903 0.666450
|
||||||
|
vn 0.287461 0.687903 0.666450
|
||||||
|
vn 0.287461 0.687903 0.666450
|
||||||
|
vn 0.256711 0.743190 0.617873
|
||||||
|
vn 0.256711 0.743190 0.617873
|
||||||
|
vn 0.256711 0.743190 0.617873
|
||||||
|
vn 0.256711 0.743190 0.617873
|
||||||
|
vn 0.512825 0.842167 0.166627
|
||||||
|
vn 0.512825 0.842167 0.166627
|
||||||
|
vn 0.512825 0.842167 0.166627
|
||||||
|
vn 0.512825 0.842167 0.166627
|
||||||
|
vn 0.499153 0.761108 -0.414199
|
||||||
|
vn 0.499153 0.761108 -0.414199
|
||||||
|
vn 0.499153 0.761108 -0.414199
|
||||||
|
vn 0.499153 0.761108 -0.414199
|
||||||
|
vn 0.260178 0.896698 -0.358105
|
||||||
|
vn 0.260178 0.896699 -0.358105
|
||||||
|
vn 0.260178 0.896698 -0.358105
|
||||||
|
vn 0.260178 0.896698 -0.358105
|
||||||
|
vn 0.057179 0.895231 -0.441918
|
||||||
|
vn 0.057179 0.895231 -0.441918
|
||||||
|
vn 0.057179 0.895231 -0.441918
|
||||||
|
vn 0.057179 0.895231 -0.441918
|
||||||
|
vn -0.260178 0.896698 -0.358105
|
||||||
|
vn -0.260178 0.896698 -0.358105
|
||||||
|
vn -0.260178 0.896698 -0.358105
|
||||||
|
vn -0.260178 0.896698 -0.358105
|
||||||
|
vn -0.420977 0.896698 -0.136784
|
||||||
|
vn -0.420978 0.896698 -0.136784
|
||||||
|
vn -0.420977 0.896698 -0.136784
|
||||||
|
vn -0.420977 0.896698 -0.136784
|
||||||
|
vn -0.425583 0.892696 0.148232
|
||||||
|
vn -0.425583 0.892696 0.148232
|
||||||
|
vn -0.425583 0.892696 0.148232
|
||||||
|
vn -0.425583 0.892696 0.148232
|
||||||
|
vn -0.180108 0.940502 0.288126
|
||||||
|
vn -0.180108 0.940502 0.288126
|
||||||
|
vn -0.180108 0.940502 0.288126
|
||||||
|
vn -0.180108 0.940502 0.288126
|
||||||
|
vn 0.111073 0.932329 0.344129
|
||||||
|
vn 0.111073 0.932329 0.344129
|
||||||
|
vn 0.111073 0.932329 0.344129
|
||||||
|
vn 0.111073 0.932329 0.344129
|
||||||
|
vn 0.141942 0.926990 0.347191
|
||||||
|
vn 0.141942 0.926990 0.347191
|
||||||
|
vn 0.141942 0.926990 0.347191
|
||||||
|
vn 0.141942 0.926990 0.347191
|
||||||
|
vn 0.239545 0.967760 0.077833
|
||||||
|
vn 0.239545 0.967761 0.077833
|
||||||
|
vn 0.239545 0.967760 0.077833
|
||||||
|
vn 0.239545 0.967760 0.077833
|
||||||
|
vn 0.289786 0.932921 -0.213733
|
||||||
|
vn 0.289786 0.932921 -0.213734
|
||||||
|
vn 0.289786 0.932921 -0.213733
|
||||||
|
vn 0.289786 0.932921 -0.213734
|
||||||
|
vn -0.528179 0.438785 -0.726976
|
||||||
|
vn -0.528179 0.438785 -0.726976
|
||||||
|
vn -0.528179 0.438785 -0.726976
|
||||||
|
vn -0.528179 0.438785 -0.726976
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
s off
|
||||||
|
g pasted__pasted__pSphere1 pasted__pasted__pSphere1SmoothProxyGroup pasted__group group2
|
||||||
|
usemtl pasted__pasted__lambert3SG1
|
||||||
|
f 1/1/1 2/2/2 12/13/3 11/12/4
|
||||||
|
f 2/2/5 3/3/6 13/14/7 12/13/8
|
||||||
|
f 3/3/9 4/4/10 14/15/11 13/14/12
|
||||||
|
f 4/4/13 5/5/14 15/16/15 14/15/16
|
||||||
|
f 5/5/17 6/6/18 16/17/19 15/16/20
|
||||||
|
f 6/6/21 7/7/22 17/18/23 16/17/24
|
||||||
|
f 7/7/25 8/8/26 18/19/27 17/18/28
|
||||||
|
f 8/8/29 9/9/30 19/20/31 18/19/32
|
||||||
|
f 9/9/33 10/10/34 20/21/35 19/20/36
|
||||||
|
f 10/10/37 1/11/38 11/22/39 20/21/40
|
||||||
|
f 11/12/41 12/13/42 22/24/43 21/23/44
|
||||||
|
f 12/13/45 13/14/46 23/25/47 22/24/48
|
||||||
|
f 13/14/49 14/15/50 24/26/51 23/25/52
|
||||||
|
f 14/15/53 15/16/54 25/27/55 24/26/56
|
||||||
|
f 15/16/57 16/17/58 26/28/59 25/27/60
|
||||||
|
f 16/17/61 17/18/62 27/29/63 26/28/64
|
||||||
|
f 17/18/65 18/19/66 28/30/67 27/29/68
|
||||||
|
f 18/19/69 19/20/70 29/31/71 28/30/72
|
||||||
|
f 19/20/73 20/21/74 30/32/75 29/31/76
|
||||||
|
f 20/21/77 11/22/78 21/33/79 30/32/80
|
||||||
|
f 21/23/81 22/24/82 32/35/83 31/34/84
|
||||||
|
f 22/24/85 23/25/86 33/36/87 32/35/88
|
||||||
|
f 24/26/89 25/27/90 35/38/91 34/37/92
|
||||||
|
f 25/27/93 26/28/94 36/39/95 35/38/96
|
||||||
|
f 26/28/97 27/29/98 37/40/99 36/39/100
|
||||||
|
f 27/29/101 28/30/102 38/41/103 37/40/104
|
||||||
|
f 28/30/105 29/31/106 39/42/107 38/41/108
|
||||||
|
f 29/31/109 30/32/110 40/43/111 39/42/112
|
||||||
|
f 30/32/113 21/33/114 31/44/115 40/43/116
|
||||||
|
f 31/34/117 32/35/118 42/46/119 41/45/120
|
||||||
|
f 32/35/121 33/36/122 43/47/123 42/46/124
|
||||||
|
f 33/36/125 34/37/126 44/48/127 43/47/128
|
||||||
|
f 34/37/129 35/38/130 45/49/131 44/48/132
|
||||||
|
f 35/38/133 36/39/134 46/50/135 45/49/136
|
||||||
|
f 36/39/137 37/40/138 47/51/139 46/50/140
|
||||||
|
f 37/40/141 38/41/142 48/52/143 47/51/144
|
||||||
|
f 38/41/145 39/42/146 49/53/147 48/52/148
|
||||||
|
f 39/42/149 40/43/150 50/54/151 49/53/152
|
||||||
|
f 40/43/153 31/44/154 41/55/155 50/54/156
|
||||||
|
f 34/37/157 33/36/158 23/25/159 24/26/160
|
||||||
|
f 42/46/161 43/47/162 44/48/163 45/49/164 46/50/165 47/51/166 48/52/167 49/53/168 50/54/169 41/45/170
|
||||||
|
f 5/5/171 4/4/172 3/3/173 2/2/174 1/11/175 10/10/176 9/9/177 8/8/178 7/7/179 6/6/180
|
||||||
@@ -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
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user