mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-11 14:22:58 -06:00
SurfaceCtrl: Readded Shift mouse move
git-svn-id: svn://ultimatepp.org/upp/trunk@14850 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
50af63544d
commit
6aeb4510d6
3 changed files with 16 additions and 7 deletions
|
|
@ -1,6 +1,9 @@
|
|||
#include "Object3D.h"
|
||||
#include <Surface/Surface.h>
|
||||
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<float> vertexData;
|
||||
|
|
@ -71,17 +74,21 @@ Object3D::Object3D(Upp::Vector<float>& surface, Upp::Vector<float>& 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<float>& surface, Upp::Vector<float>& normal, Upp::Vector<float>& color){
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class Surface;
|
|||
|
||||
class Object3D : public Upp::Moveable<Object3D>{
|
||||
private:
|
||||
inline static int GlobalID = 0;
|
||||
static int GlobalID;
|
||||
|
||||
int ID;
|
||||
|
||||
|
|
@ -127,7 +127,6 @@ class Object3D : public Upp::Moveable<Object3D>{
|
|||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Object3D& LoadObj(String& FileObj);
|
||||
Object3D& LoadStl(String& StlFile);
|
||||
Object3D& LoadSurface(Surface& Surface);
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue