diff --git a/bazaar/SurfaceCtrl/Object3D.cpp b/bazaar/SurfaceCtrl/Object3D.cpp index b762f2892..1c6b32ee3 100644 --- a/bazaar/SurfaceCtrl/Object3D.cpp +++ b/bazaar/SurfaceCtrl/Object3D.cpp @@ -1,6 +1,9 @@ #include "Object3D.h" #include namespace Upp{ +int Object3D::GlobalID = 0; + + Object3D::Object3D(Surface& surface, Color color) : ID(GlobalID++){ glm::vec3 col(color.GetR()/255.0f,color.GetG()/255.0f,color.GetB()/255.0f); Upp::Vector vertexData; @@ -71,17 +74,21 @@ Object3D::Object3D(Upp::Vector& surface, Upp::Vector& normal, Upp: BuildOpenGLData(surface,normal,color); } -Object3D& LoadObj(String& FileObj){ +Object3D& Object3D::LoadObj(String& FileObj){ //TODO + return *this; } -Object3D& LoadStl(String& StlFile){ +Object3D& Object3D::LoadStl(String& StlFile){ //TODO + return *this; } -Object3D& LoadSurface(Surface& Surface){ +Object3D& Object3D::LoadSurface(Surface& Surface){ //TODO + return *this; } -Surface GetSurface(){ +Surface Object3D::GetSurface(){ //TODO + return Surface(); } void Object3D::BuildOpenGLData(Upp::Vector& surface, Upp::Vector& normal, Upp::Vector& color){ diff --git a/bazaar/SurfaceCtrl/Object3D.h b/bazaar/SurfaceCtrl/Object3D.h index 6383a318a..a6f7348fa 100644 --- a/bazaar/SurfaceCtrl/Object3D.h +++ b/bazaar/SurfaceCtrl/Object3D.h @@ -56,7 +56,7 @@ class Surface; class Object3D : public Upp::Moveable{ private: - inline static int GlobalID = 0; + static int GlobalID; int ID; @@ -127,7 +127,6 @@ class Object3D : public Upp::Moveable{ return *this; } - Object3D& LoadObj(String& FileObj); Object3D& LoadStl(String& StlFile); Object3D& LoadSurface(Surface& Surface); diff --git a/bazaar/SurfaceCtrl/SurfaceCtrl.cpp b/bazaar/SurfaceCtrl/SurfaceCtrl.cpp index 98f15c3e5..6aea8e6dd 100644 --- a/bazaar/SurfaceCtrl/SurfaceCtrl.cpp +++ b/bazaar/SurfaceCtrl/SurfaceCtrl.cpp @@ -276,7 +276,10 @@ void SurfaceCtrl::MouseMove(Point p, dword keyflags){ float XOffset = p.x - camera.lastPress.x; float YOffset = p.y - camera.lastPress.y; if(camera.MouseMiddlePressed){ - camera.MouseWheelMouvement(XOffset,YOffset); + if(camera.ShiftPressed) + camera.ProcessMouseWheelTranslation(XOffset,YOffset); + else + camera.MouseWheelMouvement(XOffset,YOffset); if(!fastMode) Refresh(); }else if(camera.MouseLeftPressed){ glm::vec3 x = GetCamera().GetTransform().GetRight() * (XOffset * GetCamera().GetMouvementSpeed());