Skip to content

Commit

Permalink
Merge pull request #16 from linuxmao-org/master
Browse files Browse the repository at this point in the history
maj depuis master officiel integrant trajectoires
  • Loading branch information
olof29 authored Jun 5, 2019
2 parents 740ea8f + 8121bd9 commit 00fbedc
Show file tree
Hide file tree
Showing 27 changed files with 2,078 additions and 166 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ moc_*.cpp
moc_predefs.h
*.o
*.exe
*.autosave
/Frontieres
/build/
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ add_executable(Frontieres WIN32
sources/visual/CloudVis.cpp
sources/visual/SampleVis.cpp
sources/utility/GTime.cpp
sources/visual/Trajectory.cpp
sources/visual/Bouncing.cpp
sources/visual/Circular.cpp
libraries/QtFont3D/QtFont3D.cpp
libraries/Stk.cpp
libraries/RtAudio.cpp
Expand Down
11 changes: 10 additions & 1 deletion Frontieres.pro
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,17 @@ SOURCES += \
sources/visual/SampleVis.cpp \
sources/visual/GrainVis.cpp \
sources/visual/CloudVis.cpp \
sources/visual/Trajectory.cpp \
sources/visual/Bouncing.cpp \
sources/visual/Circular.cpp \
sources/utility/GTime.cpp \
libraries/Stk.cpp \
libraries/RtAudio.cpp \
libraries/RtMidi.cpp \
libraries/minimp3_custom.c \
libraries/ring_buffer.cpp



HEADERS += \
sources/theglobals.h \
Expand Down Expand Up @@ -109,13 +114,17 @@ HEADERS += \
sources/visual/SampleVis.h \
sources/visual/GrainVis.h \
sources/visual/CloudVis.h \
sources/visual/Trajectory.h \
sources/visual/Bouncing.h \
sources/visual/Circular.h \
sources/utility/GTime.h \
libraries/RtMidi.h \
libraries/RtAudio.h \
libraries/Stk.h \
libraries/minimp3_custom.h \
libraries/ring_buffer.h \
libraries/ring_buffer.tcc
libraries/ring_buffer.tcc \
libraries/minimp3_custom.h

FORMS += \
sources/interface/MyGLWindow.ui \
Expand Down
25 changes: 23 additions & 2 deletions sources/Frontieres.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,27 @@ void printParam()
draw_string((GLfloat)mouseX, (GLfloat)(screenHeight - mouseY), 0.0,
myValue.c_str(), 100.0f);
break;
case TRAJECTORY:
cout << "trajectory dans frontieres.cpp, trajectory = " << theCloud.getTrajectoryType() << endl;
cout << "static="<< STATIC <<",bouncing="<<BOUNCING<<",circular="<<CIRCULAR<<endl;
switch (theCloud.getTrajectoryType()) {
case STATIC:
myValue = QObject::tr("Trajectory: STATIC").toStdString();
break;
case BOUNCING:
myValue = QObject::tr("Trajectory: BOUNCING").toStdString();
break;
case CIRCULAR:
myValue = QObject::tr("Trajectory: CIRCULAR").toStdString();
break;
default:
myValue = "";
break;
}
cout << "myvalue="<<myValue<<endl;
draw_string((GLfloat)mouseX, (GLfloat)(screenHeight - mouseY), 0.0,
myValue.c_str(), 100.0f);

default:
break;
}
Expand Down Expand Up @@ -713,8 +734,8 @@ void mouseDrag(int x, int y)
Scene *scene = ::currentScene;
SceneSample *selectedSample = scene->selectedSample();
SceneCloud *selectedCloud = scene->selectedCloud();

if (selectedCloud) {
if (selectedCloud)
{
selectedCloud->view->updateCloudPosition(mouseX, mouseY);
}
else {
Expand Down
18 changes: 3 additions & 15 deletions sources/Frontieres.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#ifndef FRONTIERES_H
#define FRONTIERES_H

#include "theglobals.h"
#include <string>
#include <vector>
#include <mutex>
Expand All @@ -39,20 +40,6 @@ class QtFont3D;
// parameter string
extern std::string paramString;

//-----------------------------------------------------------------------------
// Defines a point in a 3D space (coords x, y and z)
//-----------------------------------------------------------------------------
struct pt3d {
pt3d(float _x, float _y, float _z)
: x(_x)
, y(_y)
, z(_z){};

float x;
float y;
float z;
};

// Initial camera movement vars
// my position
extern pt3d position;
Expand Down Expand Up @@ -98,7 +85,8 @@ enum {
SPATIALIZE,
VOLUME,
NUM,
NAME
NAME,
TRAJECTORY
};

// flag indicating parameter change
Expand Down
Loading

0 comments on commit 00fbedc

Please sign in to comment.