diff options
| author | Tim Redfern <tim@getdrop.com> | 2017-12-17 16:14:27 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2017-12-17 16:14:27 +0000 |
| commit | b470c73bfc271c032f4df9a3fd1b9770cf627f00 (patch) | |
| tree | 9f1a716eab400c7e329afcb7b428d50b19c48e61 /gui/src/chainImageSet.cpp | |
| parent | 3418dd0859106791d5534c53b901c2be4ea6b4c4 (diff) | |
select images
Diffstat (limited to 'gui/src/chainImageSet.cpp')
| -rw-r--r-- | gui/src/chainImageSet.cpp | 34 |
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); } //-------------------------------------------------------------- |
