For some reason half the Datamodelv3 files were not in the project, wtf?
This commit is contained in:
124
Blocks3D.vcproj
124
Blocks3D.vcproj
@@ -810,28 +810,78 @@
|
|||||||
RelativePath=".\src\source\DataModelV3\WorkspaceInstance.cpp"
|
RelativePath=".\src\source\DataModelV3\WorkspaceInstance.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<Filter
|
||||||
RelativePath=".\src\source\DataModelV3\XplicitNgine\XplicitNgine.cpp"
|
Name="XplicitNgine"
|
||||||
>
|
>
|
||||||
<FileConfiguration
|
<File
|
||||||
Name="Release|Win32"
|
RelativePath=".\src\source\DataModelV3\XplicitNgine\XplicitNgine.cpp"
|
||||||
>
|
>
|
||||||
<Tool
|
<FileConfiguration
|
||||||
Name="VCCLCompilerTool"
|
Name="Release|Win32"
|
||||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
>
|
||||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
<Tool
|
||||||
/>
|
Name="VCCLCompilerTool"
|
||||||
</FileConfiguration>
|
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||||
<FileConfiguration
|
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||||
Name="Debug|Win32"
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||||
|
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="Gui"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV3\Gui\BaseButtonInstance.cpp"
|
||||||
>
|
>
|
||||||
<Tool
|
</File>
|
||||||
Name="VCCLCompilerTool"
|
<File
|
||||||
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
RelativePath=".\src\source\DataModelV3\Gui\BaseGuiInstance.cpp"
|
||||||
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
>
|
||||||
/>
|
<FileConfiguration
|
||||||
</FileConfiguration>
|
Name="Release|Win32"
|
||||||
</File>
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||||
|
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
<FileConfiguration
|
||||||
|
Name="Debug|Win32"
|
||||||
|
>
|
||||||
|
<Tool
|
||||||
|
Name="VCCLCompilerTool"
|
||||||
|
ObjectFile="$(IntDir)\$(InputName)1.obj"
|
||||||
|
XMLDocumentationFileName="$(IntDir)\$(InputName)1.xdc"
|
||||||
|
/>
|
||||||
|
</FileConfiguration>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV3\Gui\GuiRootInstance.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV3\Gui\ImageButtonInstance.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV3\Gui\TextButtonInstance.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\source\DataModelV3\Gui\ToggleImageButtonInstance.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
</Filter>
|
</Filter>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
@@ -1173,6 +1223,42 @@
|
|||||||
RelativePath=".\src\include\DataModelV3\WorkspaceInstance.h"
|
RelativePath=".\src\include\DataModelV3\WorkspaceInstance.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<Filter
|
||||||
|
Name="Gui"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV3\Gui\BaseButtonInstance.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV3\Gui\BaseGuiInstance.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV3\Gui\GuiRootInstance.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV3\Gui\ImageButtonInstance.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV3\Gui\TextButtonInstance.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV3\Gui\ToggleImageButtonInstance.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
|
<Filter
|
||||||
|
Name="XplicitNgin"
|
||||||
|
>
|
||||||
|
<File
|
||||||
|
RelativePath=".\src\include\DataModelV3\XplicitNgine\XplicitNgine.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
</Filter>
|
||||||
</Filter>
|
</Filter>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
|
|||||||
@@ -1,63 +1,63 @@
|
|||||||
#include "Instance.h"
|
#include "Instance.h"
|
||||||
using namespace B3D;
|
using namespace B3D;
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Instances
|
// Instances
|
||||||
#include "WorkspaceInstance.h"
|
#include "WorkspaceInstance.h"
|
||||||
#include "LevelInstance.h"
|
#include "LevelInstance.h"
|
||||||
#include "PartInstance.h"
|
#include "PartInstance.h"
|
||||||
#include "SelectionService.h"
|
#include "SelectionService.h"
|
||||||
#include "Gui/GuiRootInstance.h"
|
#include "Gui/GuiRootInstance.h"
|
||||||
//#include "ThumbnailGeneratorInstance.h"
|
//#include "ThumbnailGeneratorInstance.h"
|
||||||
#include "XplicitNgine/XplicitNgine.h"
|
#include "XplicitNgine/XplicitNgine.h"
|
||||||
#include "SoundService.h"
|
#include "SoundService.h"
|
||||||
#include "LightingInstance.h"
|
#include "LightingInstance.h"
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
//#include "rapidxml/rapidxml.hpp"
|
//#include "rapidxml/rapidxml.hpp"
|
||||||
namespace B3D {
|
namespace B3D {
|
||||||
class DataModelInstance : public Instance
|
class DataModelInstance : public Instance
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DataModelInstance(void);
|
DataModelInstance(void);
|
||||||
~DataModelInstance(void);
|
~DataModelInstance(void);
|
||||||
void setMessage(std::string);
|
void setMessage(std::string);
|
||||||
void setMessageBrickCount();
|
void setMessageBrickCount();
|
||||||
void clearMessage();
|
void clearMessage();
|
||||||
void drawMessage(RenderDevice*);
|
void drawMessage(RenderDevice*);
|
||||||
|
|
||||||
// Instance getters
|
// Instance getters
|
||||||
WorkspaceInstance* getWorkspace();
|
WorkspaceInstance* getWorkspace();
|
||||||
LevelInstance* getLevel();
|
LevelInstance* getLevel();
|
||||||
XplicitNgine* getEngine();
|
XplicitNgine* getEngine();
|
||||||
// ThumbnailGeneratorInstance* getThumbnailGenerator();
|
// ThumbnailGeneratorInstance* getThumbnailGenerator();
|
||||||
SoundService* getSoundService();
|
SoundService* getSoundService();
|
||||||
LightingInstance* getLighting();
|
LightingInstance* getLighting();
|
||||||
|
|
||||||
std::string message;
|
std::string message;
|
||||||
bool showMessage;
|
bool showMessage;
|
||||||
//Should probably not be here???
|
//Should probably not be here???
|
||||||
G3D::GFontRef font;
|
G3D::GFontRef font;
|
||||||
GuiRootInstance* getGuiRoot();
|
GuiRootInstance* getGuiRoot();
|
||||||
SelectionService* getSelectionService();
|
SelectionService* getSelectionService();
|
||||||
void clearLevel();
|
void clearLevel();
|
||||||
void toggleRun();
|
void toggleRun();
|
||||||
bool isRunning();
|
bool isRunning();
|
||||||
void resetEngine();
|
void resetEngine();
|
||||||
private:
|
private:
|
||||||
bool isBrickCount;
|
bool isBrickCount;
|
||||||
Color3 DataModelInstance::bcToRGB(short bc);
|
Color3 DataModelInstance::bcToRGB(short bc);
|
||||||
// Instances
|
// Instances
|
||||||
WorkspaceInstance* workspace;
|
WorkspaceInstance* workspace;
|
||||||
LevelInstance* level;
|
LevelInstance* level;
|
||||||
GuiRootInstance* guiRoot;
|
GuiRootInstance* guiRoot;
|
||||||
SelectionService* selectionService;
|
SelectionService* selectionService;
|
||||||
// ThumbnailGeneratorInstance* thumbnailGenerator;
|
// ThumbnailGeneratorInstance* thumbnailGenerator;
|
||||||
XplicitNgine* xplicitNgine;
|
XplicitNgine* xplicitNgine;
|
||||||
SoundService* soundService;
|
SoundService* soundService;
|
||||||
LightingInstance* lightingInstance;
|
LightingInstance* lightingInstance;
|
||||||
bool running;
|
bool running;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,8 @@
|
|||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
// This class exists so that B3D compiles on VS 2003.
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
std::string toString(const T &value)
|
std::string toString(const T &value)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,63 +1,63 @@
|
|||||||
#include "DataModelV3/GroupInstance.h"
|
#include "DataModelV3/GroupInstance.h"
|
||||||
|
|
||||||
using namespace B3D;
|
using namespace B3D;
|
||||||
|
|
||||||
|
|
||||||
GroupInstance::GroupInstance(std::string className)
|
GroupInstance::GroupInstance(std::string className)
|
||||||
{
|
{
|
||||||
PVInstance::PVInstance(className);
|
PVInstance::PVInstance(className);
|
||||||
name = "Model";
|
name = "Model";
|
||||||
primaryPart = NULL;
|
primaryPart = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
GroupInstance::GroupInstance(void)
|
GroupInstance::GroupInstance(void)
|
||||||
{
|
{
|
||||||
GroupInstance::GroupInstance("Model");
|
GroupInstance::GroupInstance("Model");
|
||||||
}
|
}
|
||||||
|
|
||||||
GroupInstance::~GroupInstance(void)
|
GroupInstance::~GroupInstance(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<Instance *> GroupInstance::unGroup()
|
std::vector<Instance *> GroupInstance::unGroup()
|
||||||
{
|
{
|
||||||
while(children.size() > 0)
|
while(children.size() > 0)
|
||||||
{
|
{
|
||||||
children[0]->setParent(parent);
|
children[0]->setParent(parent);
|
||||||
}
|
}
|
||||||
return std::vector<Instance *>();
|
return std::vector<Instance *>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GroupInstance::render(RenderDevice * rd)
|
void GroupInstance::render(RenderDevice * rd)
|
||||||
{
|
{
|
||||||
Instance::render(rd);
|
Instance::render(rd);
|
||||||
//Controllerflag!
|
//Controllerflag!
|
||||||
if(primaryPart != NULL && controllerFlagShown.getValue() && getControllerColor(controller.getValue()) != Color3::gray())
|
if(primaryPart != NULL && controllerFlagShown.getValue() && getControllerColor(controller.getValue()) != Color3::gray())
|
||||||
{
|
{
|
||||||
rd->disableLighting();
|
rd->disableLighting();
|
||||||
Vector3 vec = Vector3(0,0,0);
|
Vector3 vec = Vector3(0,0,0);
|
||||||
Vector3 up = Vector3(0,8,0);
|
Vector3 up = Vector3(0,8,0);
|
||||||
rd->setColor(getControllerColor(controller.getValue()));
|
rd->setColor(getControllerColor(controller.getValue()));
|
||||||
rd->setObjectToWorldMatrix(primaryPart->getCFrame());
|
rd->setObjectToWorldMatrix(primaryPart->getCFrame());
|
||||||
rd->beforePrimitive();
|
rd->beforePrimitive();
|
||||||
|
|
||||||
glBegin(GL_LINES);
|
glBegin(GL_LINES);
|
||||||
glVertex3f(vec.x, vec.y, vec.z);
|
glVertex3f(vec.x, vec.y, vec.z);
|
||||||
glVertex3f(up.x, up.y, up.z);
|
glVertex3f(up.x, up.y, up.z);
|
||||||
glEnd();
|
glEnd();
|
||||||
|
|
||||||
glBegin( GL_TRIANGLES );
|
glBegin( GL_TRIANGLES );
|
||||||
glVertex3f(up.x, up.y-2, up.z);
|
glVertex3f(up.x, up.y-2, up.z);
|
||||||
glVertex3f(up.x, up.y-1, up.z-2);
|
glVertex3f(up.x, up.y-1, up.z-2);
|
||||||
glVertex3f(up.x, up.y, up.z);
|
glVertex3f(up.x, up.y, up.z);
|
||||||
|
|
||||||
glVertex3f(up.x, up.y, up.z);
|
glVertex3f(up.x, up.y, up.z);
|
||||||
glVertex3f(up.x, up.y-1, up.z-2);
|
glVertex3f(up.x, up.y-1, up.z-2);
|
||||||
glVertex3f(up.x, up.y-2, up.z);
|
glVertex3f(up.x, up.y-2, up.z);
|
||||||
|
|
||||||
glEnd();
|
glEnd();
|
||||||
rd->afterPrimitive();
|
rd->afterPrimitive();
|
||||||
rd->setColor(Color3::white());
|
rd->setColor(Color3::white());
|
||||||
rd->enableLighting();
|
rd->enableLighting();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user