summaryrefslogtreecommitdiff
path: root/gui/src/chainImageSet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/chainImageSet.cpp')
-rw-r--r--gui/src/chainImageSet.cpp34
1 files changed, 31 insertions, 3 deletions
diff --git a/gui/src/chainImageSet.cpp b/gui/src/chainImageSet.cpp
index 65ea5f9..e5c4ca6 100644
--- a/gui/src/chainImageSet.cpp
+++ b/gui/src/chainImageSet.cpp
@@ -1,5 +1,15 @@
#include "chainImageSet.h"
+//alternative algorithm
+//allow more images, and fade them up before they become full screen
+//possibly do no fading.. just draw until down to a single pixel
+
+//retouch canal images
+//practice wth controller
+
+//control the fadein
+//
+
void chainImageSet::drawOutput(){
float camera_throw= (float)outputSize.y/(float)outputSize.x; //the ratio of z distance to x width
@@ -27,7 +37,9 @@ void chainImageSet::drawOutput(){
(*currentImage)->getTransform().x*4
);
*/
- glScalef(8,8,8); //easy way to limit camera cutoff
+ glScalef(ZOOM_FUDGE_FACTOR,ZOOM_FUDGE_FACTOR,ZOOM_FUDGE_FACTOR); //easy way to limit camera cutoff
+
+ printf("drawing rotation %f for transition %f\n",(*currentImage)->getRotation(),(*currentImage)->transition);
gluLookAt( (*currentImage)->getTransform().x,
(*currentImage)->getTransform().y, // i1.linkPos.y+(xform.y*intervalpoint),
@@ -484,8 +496,24 @@ void chainImageSet::mouseDragged(int x, int y, int button){
//--------------------------------------------------------------
void chainImageSet::mousePressed(int x, int y, int button){
- //todo: select
- clickPoint=ofPoint(x,y);
+
+ if (button==OF_MOUSE_BUTTON_4){
+ int toSelect=max(0,x/(((*selected)->thumbnail.getWidth())*1.2));
+ if (toSelect<images.size()){
+ currentImage=images.begin();
+ int counter=toSelect;
+ while(counter>0){
+ currentImage++;
+ counter--;
+ }
+
+ ofLogNotice() << "Selected image " << toSelect << " :" << (*currentImage)->filename;
+
+ (*currentImage)->start(false);
+ (*currentImage)->updateOutput(decayFactor);
+ }
+ }
+ else clickPoint=ofPoint(x,y);
}
//--------------------------------------------------------------