summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/data/defaults.xml30
-rw-r--r--bin/data/settings.xml20
-rwxr-xr-xbin/data/tigerbottle.3DSbin0 -> 55201 bytes
-rw-r--r--map4.cbp3
-rw-r--r--map4.layout23
-rw-r--r--src/main.cpp4
-rw-r--r--src/testApp.cpp11
-rw-r--r--src/viewpoint.cpp16
-rw-r--r--src/viewpoint.h2
9 files changed, 82 insertions, 27 deletions
diff --git a/bin/data/defaults.xml b/bin/data/defaults.xml
new file mode 100644
index 0000000..e39dc29
--- /dev/null
+++ b/bin/data/defaults.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<map4>
+ <view>
+ <settings x="0.000000" y="0.000000" w="0.500000" h="1.000000" distort="0.000000" fov="17.250000" roll="90.0" targX="0.000000" targY="112.000000" targZ="0.000000" lat="0.000000" lng="0.000000" dolly="500.000000" />
+ </view>
+ <view>
+ <settings x="0.500000" y="0.000000" w="0.500000" h="1.000000" distort="0.000000" fov="17.250000" roll="90.0" targX="0.000000" targY="112.000000" targZ="0.000000" lat="0.000000" lng="0.000000" dolly="500.000000" />
+ </view>
+ <clip>
+ <settings file="glow_bars.mov"/>
+ </clip>
+ <clip>
+ <settings file="glow_cracks.mov"/>
+ </clip>
+ <clip>
+ <settings file="shift over.mov"/>
+ </clip>
+ <clip>
+ <settings file="tiger_squares.mov"/>
+ </clip>
+ <clip>
+ <settings file="MadMapper_update.mov"/>
+ </clip>
+ <clip>
+ <settings file="label_animation.mov"/>
+ </clip>
+ <clip>
+ <settings file="label_animation_2.mov"/>
+ </clip>
+</map4>
diff --git a/bin/data/settings.xml b/bin/data/settings.xml
index 46a83b5..1804f5e 100644
--- a/bin/data/settings.xml
+++ b/bin/data/settings.xml
@@ -1,15 +1,27 @@
<?xml version="1.0" encoding="UTF-8" ?>
<map4>
<view>
- <settings x="0.000000" y="0.000000" w="0.500000" h="1.000000" distort="0.000000" fov="17.250000" roll="90.0" targX="0.000000" targY="112.000000" targZ="0.000000" lat="0.000000" lng="0.000000" dolly="1000.000000" />
+ <settings x="0.000000" y="0.000000" w="0.500000" h="1.000000" distort="0.000000" fov="17.250000" roll="90.294998" targX="20.669331" targY="112.000000" targZ="0.000000" lat="37.926994" lng="-41.419994" dolly="886.637329" />
</view>
<view>
- <settings x="0.500000" y="0.000000" w="0.500000" h="1.000000" distort="0.000000" fov="17.250000" roll="90.0" targX="0.000000" targY="112.000000" targZ="0.000000" lat="0.000000" lng="0.000000" dolly="1000.000000" />
+ <settings x="0.500000" y="0.000000" w="0.500000" h="1.000000" distort="0.000000" fov="17.250000" roll="90.000000" targX="-20.790003" targY="112.000000" targZ="0.000000" lat="34.416656" lng="138.430984" dolly="886.636963" />
</view>
<clip>
- <settings file="stripey2.mov"/>
+ <settings file="glow_bars.mov" />
</clip>
<clip>
- <settings file="gradblend01.mov"/>
+ <settings file="glow_cracks.mov" />
+ </clip>
+ <clip>
+ <settings file="shift over.mov" />
+ </clip>
+ <clip>
+ <settings file="tiger_squares.mov" />
+ </clip>
+ <clip>
+ <settings file="label_animation.mov" />
+ </clip>
+ <clip>
+ <settings file="label_animation_2.mov" />
</clip>
</map4>
diff --git a/bin/data/tigerbottle.3DS b/bin/data/tigerbottle.3DS
new file mode 100755
index 0000000..abf920a
--- /dev/null
+++ b/bin/data/tigerbottle.3DS
Binary files differ
diff --git a/map4.cbp b/map4.cbp
index c0eaebd..13593e5 100644
--- a/map4.cbp
+++ b/map4.cbp
@@ -111,6 +111,9 @@
<Unit filename="../../../addons/ofxXmlSettings/src/ofxXmlSettings.h">
<Option virtualFolder="addons/ofxXmlSettings/src" />
</Unit>
+ <Unit filename="bin/data/defaults.xml">
+ <Option virtualFolder="build config/" />
+ </Unit>
<Unit filename="bin/data/settings.xml">
<Option virtualFolder="build config/" />
</Unit>
diff --git a/map4.layout b/map4.layout
index 2967843..9ee2048 100644
--- a/map4.layout
+++ b/map4.layout
@@ -4,8 +4,11 @@
<File name="../../../addons/ofx3DModelLoader/src/3DS/model3DS.h" open="0" top="0" tabpos="0">
<Cursor position="136" topLine="0" />
</File>
- <File name="bin/data/settings.xml" open="1" top="1" tabpos="6">
- <Cursor position="517" topLine="0" />
+ <File name="bin/data/defaults.xml" open="1" top="0" tabpos="4">
+ <Cursor position="1033" topLine="0" />
+ </File>
+ <File name="bin/data/settings.xml" open="1" top="0" tabpos="3">
+ <Cursor position="797" topLine="0" />
</File>
<File name="config.make" open="0" top="0" tabpos="3">
<Cursor position="548" topLine="0" />
@@ -13,8 +16,8 @@
<File name="src/keyVar.h" open="0" top="0" tabpos="8">
<Cursor position="0" topLine="0" />
</File>
- <File name="src/main.cpp" open="1" top="0" tabpos="3">
- <Cursor position="421" topLine="0" />
+ <File name="src/main.cpp" open="1" top="0" tabpos="6">
+ <Cursor position="275" topLine="0" />
</File>
<File name="src/mapUtils.cpp" open="0" top="0" tabpos="7">
<Cursor position="0" topLine="8" />
@@ -22,16 +25,16 @@
<File name="src/mapUtils.h" open="0" top="0" tabpos="6">
<Cursor position="165" topLine="0" />
</File>
- <File name="src/testApp.cpp" open="1" top="0" tabpos="2">
- <Cursor position="737" topLine="24" />
+ <File name="src/testApp.cpp" open="1" top="1" tabpos="2">
+ <Cursor position="807" topLine="6" />
</File>
<File name="src/testApp.h" open="1" top="0" tabpos="1">
- <Cursor position="1432" topLine="29" />
+ <Cursor position="1326" topLine="31" />
</File>
<File name="src/viewpoint.cpp" open="1" top="0" tabpos="5">
- <Cursor position="2656" topLine="0" />
+ <Cursor position="1494" topLine="0" />
</File>
- <File name="src/viewpoint.h" open="1" top="0" tabpos="4">
- <Cursor position="426" topLine="7" />
+ <File name="src/viewpoint.h" open="1" top="0" tabpos="7">
+ <Cursor position="808" topLine="19" />
</File>
</CodeBlocks_layout_file>
diff --git a/src/main.cpp b/src/main.cpp
index 15650ab..d8de5c8 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -17,8 +17,8 @@
int main( ){
ofAppGlutWindow window;
- //ofSetupOpenGL(&window, 1024,768, OF_FULLSCREEN); // <-------- setup the GL context
- ofSetupOpenGL(&window, 1024,300, OF_WINDOW);
+ ofSetupOpenGL(&window, 1440,900, OF_FULLSCREEN); // <-------- setup the GL context
+ //ofSetupOpenGL(&window, 1024,300, OF_WINDOW);
glutIgnoreKeyRepeat(1);
glutSetKeyRepeat(GLUT_KEY_REPEAT_OFF); //these don't work!!!
printf("key repeat ignore: %i\n",glutDeviceGet(GLUT_DEVICE_IGNORE_KEY_REPEAT));
diff --git a/src/testApp.cpp b/src/testApp.cpp
index 4aaa009..c2772aa 100644
--- a/src/testApp.cpp
+++ b/src/testApp.cpp
@@ -17,18 +17,19 @@ void testApp::setup(){
glEnable (GL_COLOR_MATERIAL);
//load the bottle model - the 3ds and the texture file need to be in the same folder
- bottle.loadModel("bottle.3DS", 1);
+ bottle.loadModel("tigerbottle.3DS", 1);
bottle.setRotation(0, 180, 1, 0, 0);
- bottle.setPosition(0, 112, 0);
+ bottle.setPosition(0, 101, 0);
//ofDisableArbTex();
- mode=CALIBRATE;
+ mode=DISPLAY;
loadSettings("settings.xml");
whichClip=0;
texture.loadMovie(clips[whichClip]);
+ texture.setLoopState(OF_LOOP_NORMAL);
texture.play();
light=true;
@@ -109,14 +110,14 @@ void testApp::keyPressed(int key){
case '<':
whichClip--;
if (whichClip<0) whichClip+=numClips;
- texture.close();
+ texture.stop();
texture.loadMovie(clips[whichClip]);
texture.play();
break;
case '.':
case '>':
whichClip=(whichClip+1)%numClips;
- texture.close();
+ texture.stop();
texture.loadMovie(clips[whichClip]);
texture.play();
break;
diff --git a/src/viewpoint.cpp b/src/viewpoint.cpp
index 6a12c99..287cf26 100644
--- a/src/viewpoint.cpp
+++ b/src/viewpoint.cpp
@@ -3,8 +3,12 @@
void viewpoint::setup(map<string,string>&settings){
//setup(float w, float h, float x, float y) {
- if (DEBUG) printf("window: %f,%f %fx%f n",ofGetWidth()*ofToFloat(settings["x"]),ofGetHeight()*ofToFloat(settings["y"]),ofGetWidth()*ofToFloat(settings["w"]),ofGetHeight()*ofToFloat(settings["h"]));
- window=ofRectangle(ofGetWidth()*ofToFloat(settings["x"]),ofGetHeight()*ofToFloat(settings["y"]),ofGetWidth()*ofToFloat(settings["w"]),ofGetHeight()*ofToFloat(settings["h"]));
+ x=ofToFloat(settings["x"]);
+ y=ofToFloat(settings["y"]);
+ w=ofToFloat(settings["w"]);
+ h=ofToFloat(settings["h"]);
+ if (DEBUG) printf("window: %f,%f %fx%f n",ofGetWidth()*x,ofGetHeight()*y,ofGetWidth()*w,ofGetHeight()*h);
+ window=ofRectangle(ofGetWidth()*x,ofGetHeight()*y,ofGetWidth()*w,ofGetHeight()*h);
distortFactor=ofToFloat(settings["distort"]);
renderFBO.allocate(window.width,window.height,GL_RGB);
@@ -30,10 +34,10 @@ void viewpoint::setup(map<string,string>&settings){
light.setDirectional();
}
double viewpoint::getSetting(const string& setting){
- if (setting=="x") return window.x/ofGetWidth();
- if (setting=="y") return window.y/ofGetHeight();
- if (setting=="w") return window.width/ofGetWidth();
- if (setting=="h") return window.height/ofGetHeight();
+ if (setting=="x") return x;
+ if (setting=="y") return y;
+ if (setting=="w") return w;
+ if (setting=="h") return h;
if (setting=="fov") return vars[0].getVal();
if (setting=="targX") return vars[1].getVal();
if (setting=="targY") return vars[2].getVal();
diff --git a/src/viewpoint.h b/src/viewpoint.h
index b5923bd..5ee9b63 100644
--- a/src/viewpoint.h
+++ b/src/viewpoint.h
@@ -49,4 +49,6 @@ class viewpoint {
ofLight light;
+ float x,y,w,h;
+
};