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