init
This commit is contained in:
@@ -13,7 +13,6 @@ using namespace std;
|
||||
using namespace rapidxml;
|
||||
|
||||
|
||||
|
||||
DataModelInstance::DataModelInstance(void)
|
||||
{
|
||||
Instance::Instance();
|
||||
@@ -519,6 +518,7 @@ bool DataModelInstance::getOpen()
|
||||
of.lpstrFile[0]='\0';
|
||||
of.nMaxFile=500;
|
||||
of.lpstrTitle="Hello";
|
||||
of.Flags = OFN_FILEMUSTEXIST;
|
||||
ShowCursor(TRUE);
|
||||
BOOL file = GetOpenFileName(&of);
|
||||
if (file)
|
||||
@@ -526,7 +526,6 @@ bool DataModelInstance::getOpen()
|
||||
_loadedFileName = of.lpstrFile;
|
||||
load(of.lpstrFile,true);
|
||||
}
|
||||
//else MessageBox(NULL, "Failed to open dialog", "Failure", MB_ICONHAND | MB_OK);
|
||||
return true;
|
||||
}
|
||||
void DataModelInstance::setMessage(std::string msg)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#define WINVER 0x0400
|
||||
#include <G3DAll.h>
|
||||
#include "DataModelV2/Instance.h"
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ PartInstance::PartInstance(void)
|
||||
left = Enum::SurfaceType::Smooth;
|
||||
bottom = Enum::SurfaceType::Smooth;
|
||||
shape = Enum::Shape::Block;
|
||||
physBody = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -279,7 +280,6 @@ void PartInstance::render(RenderDevice* rd) {
|
||||
changed=false;
|
||||
Vector3 renderSize = size/2;
|
||||
glNewList(glList, GL_COMPILE);
|
||||
//glScalef(0.5f,0.5f,0.5f);
|
||||
renderShape(this->shape, renderSize, color);
|
||||
renderSurface(TOP, this->top, renderSize, this->controller, color);
|
||||
renderSurface(FRONT, this->front, renderSize, this->controller, color);
|
||||
@@ -297,6 +297,16 @@ void PartInstance::render(RenderDevice* rd) {
|
||||
PartInstance::~PartInstance(void)
|
||||
{
|
||||
glDeleteLists(glList, 1);
|
||||
/*
|
||||
// Causes some weird ODE error
|
||||
// Someone, please look into this
|
||||
|
||||
dBodyDestroy(physBody);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (physGeom[i] != NULL)
|
||||
dGeomDestroy(physGeom[i]);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
char pto[512];
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "DataModelV2/WorkspaceInstance.h"
|
||||
|
||||
#include "Globals.h"
|
||||
#include "Application.h"
|
||||
|
||||
WorkspaceInstance::WorkspaceInstance(void)
|
||||
{
|
||||
@@ -15,6 +16,11 @@ void WorkspaceInstance::clearChildren()
|
||||
Instance::clearChildren();
|
||||
}
|
||||
|
||||
void WorkspaceInstance::zoomToExtents()
|
||||
{
|
||||
g_usableApp->cameraController.zoomExtents();
|
||||
}
|
||||
|
||||
WorkspaceInstance::~WorkspaceInstance(void)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user