summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-02-23 01:07:34 +0000
committerTim Redfern <tim@eclectronics.org>2012-02-23 01:07:34 +0000
commit61e590513b2e725a8df7eed75a041b188d4ecd39 (patch)
tree3e81b514ad7c225dbf491316d4acd35559572e4f
parentb3a0d6eb435fc2584466106ef613b99100b0a470 (diff)
proper vertigo effect
-rw-r--r--bin/data/settings.xml9
-rw-r--r--map4.xcodeproj/tim.mode1v378
-rw-r--r--map4.xcodeproj/tim.pbxuser305
-rw-r--r--src/keyVar.cpp8
-rw-r--r--src/keyVar.h3
-rw-r--r--src/main.cpp4
-rw-r--r--src/testApp.cpp23
-rw-r--r--src/testApp.h1
-rw-r--r--src/viewpoint.cpp73
-rw-r--r--src/viewpoint.h4
10 files changed, 277 insertions, 231 deletions
diff --git a/bin/data/settings.xml b/bin/data/settings.xml
index 7a88929..53dfbf7 100644
--- a/bin/data/settings.xml
+++ b/bin/data/settings.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<map4 model="tigerbottle.3DS" x="0" y="101" z="0">
+<map4>
<view>
- <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" />
+ <settings x="0.000000" y="0.000000" w="0.500000" h="1.000000" distort="0.000000" fov="16.349150" roll="90.000000" targX="0.000000" targY="112.000000" targZ="0.000000" lat="37.457062" lng="12.734703" dolly="632.609375" />
</view>
<view>
- <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" />
+ <settings x="0.500000" y="0.000000" w="0.500000" h="1.000000" distort="0.000000" fov="16.348951" roll="90.000000" targX="0.000000" targY="112.000000" targZ="0.000000" lat="37.458065" lng="106.842819" dolly="632.617554" />
</view>
<clip>
<settings file="glow_bars.mov" />
@@ -19,6 +19,9 @@
<settings file="tiger_squares.mov" />
</clip>
<clip>
+ <settings file="MadMapper_update.mov" />
+ </clip>
+ <clip>
<settings file="label_animation.mov" />
</clip>
<clip>
diff --git a/map4.xcodeproj/tim.mode1v3 b/map4.xcodeproj/tim.mode1v3
index 9e222b9..8b9a383 100644
--- a/map4.xcodeproj/tim.mode1v3
+++ b/map4.xcodeproj/tim.mode1v3
@@ -216,10 +216,10 @@
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>22B5C81E14BCBE3D00A0B0F0</string>
+ <string>220A9C1514F5C89B00B8DE00</string>
<key>history</key>
<array>
- <string>22C695F914BC9440006CB636</string>
+ <string>22B5C81E14BCBE3D00A0B0F0</string>
</array>
</dict>
<key>SplitCount</key>
@@ -313,7 +313,7 @@
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>10</integer>
+ <integer>8</integer>
<integer>3</integer>
<integer>0</integer>
</array>
@@ -356,7 +356,7 @@
<key>PBXProjectModuleGUID</key>
<string>1CE0B20306471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
- <string>main.cpp</string>
+ <string>viewpoint.cpp</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
@@ -364,32 +364,32 @@
<key>PBXProjectModuleGUID</key>
<string>1CE0B20406471E060097A5F4</string>
<key>PBXProjectModuleLabel</key>
- <string>main.cpp</string>
+ <string>viewpoint.cpp</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>22B5C81D14BCBE3D00A0B0F0</string>
+ <string>220A9C1414F5C89B00B8DE00</string>
<key>history</key>
<array>
<string>220EA1EF14925D45004424ED</string>
<string>22AFFECF149798EE0079DDC5</string>
<string>22AFFED1149798EE0079DDC5</string>
<string>2257104214B1404F009BC2A4</string>
- <string>2257104414B1404F009BC2A4</string>
<string>2226A47A14B3C58400A9FC9F</string>
<string>2226A47C14B3C58400A9FC9F</string>
<string>226875D414B51C4B006FAF1F</string>
- <string>226875D714B51C4B006FAF1F</string>
- <string>2282731214BA65240017A99F</string>
- <string>22C9B6DB14BBB4ED0055B293</string>
<string>22C9B6DE14BBB4ED0055B293</string>
- <string>22C9B75D14BBB9290055B293</string>
<string>22D6C70114BC4B8C00A0C31F</string>
<string>22D6C72B14BC68B500A0C31F</string>
- <string>22D6C72C14BC68B500A0C31F</string>
- <string>22D6C72D14BC68B500A0C31F</string>
- <string>22C695F614BC9440006CB636</string>
- <string>22C695F814BC9440006CB636</string>
+ <string>220A9BBB14F5C0DE00B8DE00</string>
+ <string>220A9BBC14F5C0DE00B8DE00</string>
+ <string>220A9BBD14F5C0DE00B8DE00</string>
+ <string>220A9BBF14F5C0DE00B8DE00</string>
+ <string>220A9BC014F5C0DE00B8DE00</string>
+ <string>220A9BC214F5C0DE00B8DE00</string>
+ <string>220A9BC314F5C0DE00B8DE00</string>
+ <string>220A9C0C14F5C87A00B8DE00</string>
+ <string>220A9C1314F5C89B00B8DE00</string>
</array>
</dict>
<key>SplitCount</key>
@@ -401,14 +401,14 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {816, 427}}</string>
+ <string>{{0, 0}, {816, 425}}</string>
<key>RubberWindowFrame</key>
<string>0 59 1024 519 0 0 1024 578 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>427pt</string>
+ <string>425pt</string>
</dict>
<dict>
<key>ContentConfiguration</key>
@@ -421,14 +421,14 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 432}, {816, 46}}</string>
+ <string>{{0, 430}, {816, 48}}</string>
<key>RubberWindowFrame</key>
<string>0 59 1024 519 0 0 1024 578 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
<key>Proportion</key>
- <string>46pt</string>
+ <string>48pt</string>
</dict>
</array>
<key>Proportion</key>
@@ -447,9 +447,9 @@
</array>
<key>TableOfContents</key>
<array>
- <string>22B5C80C14BCAB5400A0B0F0</string>
+ <string>220A9BC614F5C0DE00B8DE00</string>
<string>1CE0B1FE06471DED0097A5F4</string>
- <string>22B5C80D14BCAB5400A0B0F0</string>
+ <string>220A9BC714F5C0DE00B8DE00</string>
<string>1CE0B20306471E060097A5F4</string>
<string>1CE0B20506471E060097A5F4</string>
</array>
@@ -587,8 +587,8 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
- <string>22B5C81814BCAB5400A0B0F0</string>
- <string>22B5C81914BCAB5400A0B0F0</string>
+ <string>220A9BCA14F5C0DE00B8DE00</string>
+ <string>220A9BCB14F5C0DE00B8DE00</string>
<string>1C78EAAD065D492600B07095</string>
<string>1CD10A99069EF8BA00B06720</string>
<string>22C080D114918C2F00E6B4C0</string>
@@ -617,7 +617,7 @@
<key>PBXProjectModuleGUID</key>
<string>1CD0528F0623707200166675</string>
<key>PBXProjectModuleLabel</key>
- <string></string>
+ <string>viewpoint.cpp</string>
<key>StatusBarVisibility</key>
<true/>
</dict>
@@ -634,6 +634,8 @@
<string>183pt</string>
</dict>
<dict>
+ <key>BecomeActive</key>
+ <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
@@ -673,7 +675,7 @@
<key>TableOfContents</key>
<array>
<string>22C080D114918C2F00E6B4C0</string>
- <string>22B5C80F14BCAB5400A0B0F0</string>
+ <string>220A9BAF14F5C06900B8DE00</string>
<string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string>
</array>
@@ -795,13 +797,13 @@
<key>TableOfContents</key>
<array>
<string>1CD10A99069EF8BA00B06720</string>
- <string>22B5C81014BCAB5400A0B0F0</string>
+ <string>220A9BB014F5C06900B8DE00</string>
<string>1C162984064C10D400B95A72</string>
- <string>22B5C81114BCAB5400A0B0F0</string>
- <string>22B5C81214BCAB5400A0B0F0</string>
- <string>22B5C81314BCAB5400A0B0F0</string>
- <string>22B5C81414BCAB5400A0B0F0</string>
- <string>22B5C81514BCAB5400A0B0F0</string>
+ <string>220A9BB114F5C06900B8DE00</string>
+ <string>220A9BB214F5C06900B8DE00</string>
+ <string>220A9BB314F5C06900B8DE00</string>
+ <string>220A9BB414F5C06900B8DE00</string>
+ <string>220A9BB514F5C06900B8DE00</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debugV3</string>
@@ -920,6 +922,8 @@
<key>Dock</key>
<array>
<dict>
+ <key>BecomeActive</key>
+ <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXProjectModuleGUID</key>
@@ -930,18 +934,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {1024, 503}}</string>
+ <string>{{0, 0}, {1024, 477}}</string>
<key>RubberWindowFrame</key>
- <string>190 887 1024 544 0 0 1024 578 </string>
+ <string>0 60 1024 518 0 0 1024 578 </string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
<key>Proportion</key>
- <string>503pt</string>
+ <string>477pt</string>
</dict>
</array>
<key>Proportion</key>
- <string>503pt</string>
+ <string>477pt</string>
</dict>
</array>
<key>Name</key>
@@ -955,13 +959,13 @@
<key>TableOfContents</key>
<array>
<string>1C78EAAD065D492600B07095</string>
- <string>22B5C81614BCAB5400A0B0F0</string>
+ <string>220A9BB614F5C06900B8DE00</string>
<string>1C78EAAC065D492600B07095</string>
</array>
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.consoleV3</string>
<key>WindowString</key>
- <string>190 887 1024 544 0 0 1024 578 </string>
+ <string>0 60 1024 518 0 0 1024 578 </string>
<key>WindowToolGUID</key>
<string>1C78EAAD065D492600B07095</string>
<key>WindowToolIsVisible</key>
diff --git a/map4.xcodeproj/tim.pbxuser b/map4.xcodeproj/tim.pbxuser
index 8d69b0e..909c3c4 100644
--- a/map4.xcodeproj/tim.pbxuser
+++ b/map4.xcodeproj/tim.pbxuser
@@ -1,5 +1,121 @@
// !$*UTF8*$!
{
+ 220A9BBB14F5C0DE00B8DE00 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = E4B69E1F0A3A1BDC003C02F2 /* testApp.h */;
+ name = "testApp.h: 75";
+ rLen = 0;
+ rLoc = 1602;
+ rType = 0;
+ vrLen = 634;
+ vrLoc = 972;
+ };
+ 220A9BBC14F5C0DE00B8DE00 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */;
+ name = "main.cpp: 21";
+ rLen = 0;
+ rLoc = 482;
+ rType = 0;
+ vrLen = 868;
+ vrLoc = 0;
+ };
+ 220A9BBD14F5C0DE00B8DE00 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 223429A214AF70B100D0B406 /* keyVar.h */;
+ name = "keyVar.h: 23";
+ rLen = 0;
+ rLoc = 438;
+ rType = 0;
+ vrLen = 573;
+ vrLoc = 16;
+ };
+ 220A9BBF14F5C0DE00B8DE00 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 223429A114AF70B100D0B406 /* keyVar.cpp */;
+ name = "keyVar.cpp: 50";
+ rLen = 0;
+ rLoc = 1291;
+ rType = 0;
+ vrLen = 885;
+ vrLoc = 552;
+ };
+ 220A9BC014F5C0DE00B8DE00 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 220A9BC114F5C0DE00B8DE00 /* settings.xml */;
+ name = "settings.xml: 4";
+ rLen = 0;
+ rLoc = 308;
+ rType = 0;
+ vrLen = 1006;
+ vrLoc = 0;
+ };
+ 220A9BC114F5C0DE00B8DE00 /* settings.xml */ = {
+ isa = PBXFileReference;
+ name = settings.xml;
+ path = /Developer/Library/openFrameworks/custom/dev/map4/bin/data/settings.xml;
+ sourceTree = "<absolute>";
+ };
+ 220A9BC214F5C0DE00B8DE00 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 223429A414AF70B100D0B406 /* viewpoint.h */;
+ name = "viewpoint.h: 43";
+ rLen = 8;
+ rLoc = 645;
+ rType = 0;
+ vrLen = 437;
+ vrLoc = 393;
+ };
+ 220A9BC314F5C0DE00B8DE00 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 22570FEC14B131A0009BC2A4 /* ofCamera.h */;
+ name = "ofCamera.h: 16";
+ rLen = 0;
+ rLoc = 361;
+ rType = 0;
+ vrLen = 842;
+ vrLoc = 361;
+ };
+ 220A9C0C14F5C87A00B8DE00 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */;
+ name = "testApp.cpp: 33";
+ rLen = 9;
+ rLoc = 874;
+ rType = 0;
+ vrLen = 908;
+ vrLoc = 6025;
+ };
+ 220A9C1314F5C89B00B8DE00 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 223429A314AF70B100D0B406 /* viewpoint.cpp */;
+ name = "viewpoint.cpp: 136";
+ rLen = 0;
+ rLoc = 4831;
+ rType = 0;
+ vrLen = 1261;
+ vrLoc = 4156;
+ };
+ 220A9C1414F5C89B00B8DE00 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 223429A314AF70B100D0B406 /* viewpoint.cpp */;
+ name = "viewpoint.cpp: 136";
+ rLen = 0;
+ rLoc = 4831;
+ rType = 0;
+ vrLen = 1283;
+ vrLoc = 4156;
+ };
+ 220A9C1514F5C89B00B8DE00 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 22C9B6AB14BBB0B90055B293 /* ofxXmlSettings.cpp */;
+ name = "ofxXmlSettings.cpp: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 828;
+ vrLoc = 557;
+ };
220EA1CD14925A00004424ED /* ofx3DModelLoader.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {586, 351}}";
@@ -78,32 +194,33 @@
};
223429A114AF70B100D0B406 /* keyVar.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {755, 998}}";
- sepNavSelRange = "{1511, 0}";
- sepNavVisRange = "{0, 1514}";
+ sepNavIntBoundsRect = "{{0, 0}, {755, 832}}";
+ sepNavSelRange = "{1291, 0}";
+ sepNavVisRange = "{552, 885}";
sepNavWindowFrame = "{{15, 4}, {976, 1254}}";
};
};
223429A214AF70B100D0B406 /* keyVar.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {755, 1072}}";
- sepNavSelRange = "{392, 0}";
- sepNavVisRange = "{0, 548}";
+ sepNavIntBoundsRect = "{{0, 0}, {755, 481}}";
+ sepNavSelRange = "{438, 0}";
+ sepNavVisRange = "{16, 573}";
};
};
223429A314AF70B100D0B406 /* viewpoint.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1419, 1534}}";
- sepNavSelRange = "{770, 0}";
- sepNavVisRange = "{0, 1261}";
+ sepNavIntBoundsRect = "{{0, 0}, {1517, 2210}}";
+ sepNavSelRange = "{4678, 0}";
+ sepNavVisRange = "{4179, 803}";
sepNavWindowFrame = "{{15, 4}, {976, 574}}";
};
};
223429A414AF70B100D0B406 /* viewpoint.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {755, 624}}";
- sepNavSelRange = "{226, 0}";
- sepNavVisRange = "{0, 492}";
+ sepNavIntBoundsRect = "{{0, 0}, {755, 767}}";
+ sepNavSelRange = "{645, 8}";
+ sepNavVisRange = "{393, 437}";
+ sepNavWindowFrame = "{{15, 4}, {976, 574}}";
};
};
22570FEC14B131A0009BC2A4 /* ofCamera.h */ = {
@@ -112,6 +229,11 @@
name = ofCamera.h;
path = /Developer/Library/openFrameworks/libs/openFrameworks/3d/ofCamera.h;
sourceTree = "<absolute>";
+ uiCtxt = {
+ sepNavIntBoundsRect = "{{0, 0}, {1573, 988}}";
+ sepNavSelRange = "{361, 0}";
+ sepNavVisRange = "{361, 842}";
+ };
};
22570FEE14B131A0009BC2A4 /* ofNode.h */ = {
isa = PBXFileReference;
@@ -137,16 +259,6 @@
path = /Developer/Library/openFrameworks/libs/openFrameworks/3d/ofNode.cpp;
sourceTree = "<absolute>";
};
- 2257104414B1404F009BC2A4 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 22570FEC14B131A0009BC2A4 /* ofCamera.h */;
- name = "ofCamera.h: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 830;
- vrLoc = 0;
- };
226875D414B51C4B006FAF1F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 22EF433914AF89EF003C3497 /* mapUtils.h */;
@@ -157,33 +269,6 @@
vrLen = 329;
vrLoc = 0;
};
- 226875D714B51C4B006FAF1F /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 223429A414AF70B100D0B406 /* viewpoint.h */;
- name = "viewpoint.h: 18";
- rLen = 0;
- rLoc = 226;
- rType = 0;
- vrLen = 492;
- vrLoc = 0;
- };
- 2282731214BA65240017A99F /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 2282731314BA65240017A99F /* iostream */;
- name = "iostream: 77";
- rLen = 0;
- rLoc = 2900;
- rType = 0;
- vrLen = 2990;
- vrLoc = 0;
- };
- 2282731314BA65240017A99F /* iostream */ = {
- isa = PBXFileReference;
- lastKnownFileType = sourcecode.cpp.h;
- name = iostream;
- path = "/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1/iostream";
- sourceTree = "<absolute>";
- };
22AFFECF149798EE0079DDC5 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 22AFFED0149798EE0079DDC5 /* ofGraphics.h */;
@@ -218,16 +303,6 @@
path = /Developer/Library/openFrameworks/libs/openFrameworks/graphics/ofGraphics.cpp;
sourceTree = "<absolute>";
};
- 22B5C81D14BCBE3D00A0B0F0 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */;
- name = "main.cpp: 7";
- rLen = 0;
- rLoc = 142;
- rType = 0;
- vrLen = 867;
- vrLoc = 0;
- };
22B5C81E14BCBE3D00A0B0F0 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 22C9B6AB14BBB0B90055B293 /* ofxXmlSettings.cpp */;
@@ -252,36 +327,6 @@
isa = PBXCodeSenseManager;
indexTemplatePath = "";
};
- 22C695F614BC9440006CB636 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 223429A314AF70B100D0B406 /* viewpoint.cpp */;
- name = "viewpoint.cpp: 19";
- rLen = 0;
- rLoc = 770;
- rType = 0;
- vrLen = 1261;
- vrLoc = 0;
- };
- 22C695F814BC9440006CB636 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = E4B69E1D0A3A1BDC003C02F2 /* main.cpp */;
- name = "main.cpp: 7";
- rLen = 0;
- rLoc = 142;
- rType = 0;
- vrLen = 867;
- vrLoc = 0;
- };
- 22C695F914BC9440006CB636 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 22C9B6AB14BBB0B90055B293 /* ofxXmlSettings.cpp */;
- name = "ofxXmlSettings.cpp: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 828;
- vrLoc = 557;
- };
22C9B6AB14BBB0B90055B293 /* ofxXmlSettings.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {917, 9230}}";
@@ -297,16 +342,6 @@
sepNavVisRange = "{0, 3177}";
};
};
- 22C9B6DB14BBB4ED0055B293 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 223429A214AF70B100D0B406 /* keyVar.h */;
- name = "keyVar.h: 20";
- rLen = 0;
- rLoc = 392;
- rType = 0;
- vrLen = 548;
- vrLoc = 0;
- };
22C9B6DE14BBB4ED0055B293 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 22C9B6AC14BBB0B90055B293 /* ofxXmlSettings.h */;
@@ -324,16 +359,6 @@
sepNavVisRange = "{0, 2259}";
};
};
- 22C9B75D14BBB9290055B293 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 223429A114AF70B100D0B406 /* keyVar.cpp */;
- name = "keyVar.cpp: 56";
- rLen = 0;
- rLoc = 1511;
- rType = 0;
- vrLen = 1514;
- vrLoc = 0;
- };
22D6C70114BC4B8C00A0C31F /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 22D6C70214BC4B8C00A0C31F /* basic_string.h */;
@@ -361,26 +386,6 @@
vrLen = 3885;
vrLoc = 0;
};
- 22D6C72C14BC68B500A0C31F /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = E4B69E1F0A3A1BDC003C02F2 /* testApp.h */;
- name = "testApp.h: 28";
- rLen = 0;
- rLoc = 619;
- rType = 0;
- vrLen = 1415;
- vrLoc = 0;
- };
- 22D6C72D14BC68B500A0C31F /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */;
- name = "testApp.cpp: 71";
- rLen = 0;
- rLoc = 1797;
- rType = 0;
- vrLen = 2041;
- vrLoc = 0;
- };
22EF433814AF89EF003C3497 /* mapUtils.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {761, 1547}}";
@@ -432,32 +437,32 @@
PBXFileDataSource_Target_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 347908937;
- PBXWorkspaceStateSaveDate = 347908937;
+ PBXPerProjectTemplateStateSaveDate = 351639998;
+ PBXWorkspaceStateSaveDate = 351639998;
};
perUserProjectItems = {
+ 220A9BBB14F5C0DE00B8DE00 /* PBXTextBookmark */ = 220A9BBB14F5C0DE00B8DE00 /* PBXTextBookmark */;
+ 220A9BBC14F5C0DE00B8DE00 /* PBXTextBookmark */ = 220A9BBC14F5C0DE00B8DE00 /* PBXTextBookmark */;
+ 220A9BBD14F5C0DE00B8DE00 /* PBXTextBookmark */ = 220A9BBD14F5C0DE00B8DE00 /* PBXTextBookmark */;
+ 220A9BBF14F5C0DE00B8DE00 /* PBXTextBookmark */ = 220A9BBF14F5C0DE00B8DE00 /* PBXTextBookmark */;
+ 220A9BC014F5C0DE00B8DE00 /* PBXTextBookmark */ = 220A9BC014F5C0DE00B8DE00 /* PBXTextBookmark */;
+ 220A9BC214F5C0DE00B8DE00 /* PBXTextBookmark */ = 220A9BC214F5C0DE00B8DE00 /* PBXTextBookmark */;
+ 220A9BC314F5C0DE00B8DE00 /* PBXTextBookmark */ = 220A9BC314F5C0DE00B8DE00 /* PBXTextBookmark */;
+ 220A9C0C14F5C87A00B8DE00 /* PBXTextBookmark */ = 220A9C0C14F5C87A00B8DE00 /* PBXTextBookmark */;
+ 220A9C1314F5C89B00B8DE00 /* PBXTextBookmark */ = 220A9C1314F5C89B00B8DE00 /* PBXTextBookmark */;
+ 220A9C1414F5C89B00B8DE00 /* PBXTextBookmark */ = 220A9C1414F5C89B00B8DE00 /* PBXTextBookmark */;
+ 220A9C1514F5C89B00B8DE00 /* PBXTextBookmark */ = 220A9C1514F5C89B00B8DE00 /* PBXTextBookmark */;
220EA1EF14925D45004424ED /* PBXTextBookmark */ = 220EA1EF14925D45004424ED /* PBXTextBookmark */;
2226A47A14B3C58400A9FC9F /* PBXTextBookmark */ = 2226A47A14B3C58400A9FC9F /* PBXTextBookmark */;
2226A47C14B3C58400A9FC9F /* PBXTextBookmark */ = 2226A47C14B3C58400A9FC9F /* PBXTextBookmark */;
2257104214B1404F009BC2A4 /* PBXTextBookmark */ = 2257104214B1404F009BC2A4 /* PBXTextBookmark */;
- 2257104414B1404F009BC2A4 /* PBXTextBookmark */ = 2257104414B1404F009BC2A4 /* PBXTextBookmark */;
226875D414B51C4B006FAF1F /* PBXTextBookmark */ = 226875D414B51C4B006FAF1F /* PBXTextBookmark */;
- 226875D714B51C4B006FAF1F /* PBXTextBookmark */ = 226875D714B51C4B006FAF1F /* PBXTextBookmark */;
- 2282731214BA65240017A99F /* PBXTextBookmark */ = 2282731214BA65240017A99F /* PBXTextBookmark */;
22AFFECF149798EE0079DDC5 /* PBXTextBookmark */ = 22AFFECF149798EE0079DDC5 /* PBXTextBookmark */;
22AFFED1149798EE0079DDC5 /* PBXTextBookmark */ = 22AFFED1149798EE0079DDC5 /* PBXTextBookmark */;
- 22B5C81D14BCBE3D00A0B0F0 /* PBXTextBookmark */ = 22B5C81D14BCBE3D00A0B0F0 /* PBXTextBookmark */;
22B5C81E14BCBE3D00A0B0F0 /* PBXTextBookmark */ = 22B5C81E14BCBE3D00A0B0F0 /* PBXTextBookmark */;
- 22C695F614BC9440006CB636 /* PBXTextBookmark */ = 22C695F614BC9440006CB636 /* PBXTextBookmark */;
- 22C695F814BC9440006CB636 /* PBXTextBookmark */ = 22C695F814BC9440006CB636 /* PBXTextBookmark */;
- 22C695F914BC9440006CB636 /* PBXTextBookmark */ = 22C695F914BC9440006CB636 /* PBXTextBookmark */;
- 22C9B6DB14BBB4ED0055B293 /* PBXTextBookmark */ = 22C9B6DB14BBB4ED0055B293 /* PBXTextBookmark */;
22C9B6DE14BBB4ED0055B293 /* PBXTextBookmark */ = 22C9B6DE14BBB4ED0055B293 /* PBXTextBookmark */;
- 22C9B75D14BBB9290055B293 /* PBXTextBookmark */ = 22C9B75D14BBB9290055B293 /* PBXTextBookmark */;
22D6C70114BC4B8C00A0C31F /* PBXTextBookmark */ = 22D6C70114BC4B8C00A0C31F /* PBXTextBookmark */;
22D6C72B14BC68B500A0C31F /* PBXTextBookmark */ = 22D6C72B14BC68B500A0C31F /* PBXTextBookmark */;
- 22D6C72C14BC68B500A0C31F /* PBXTextBookmark */ = 22D6C72C14BC68B500A0C31F /* PBXTextBookmark */;
- 22D6C72D14BC68B500A0C31F /* PBXTextBookmark */ = 22D6C72D14BC68B500A0C31F /* PBXTextBookmark */;
};
sourceControlManager = 22C080CC1491244000E6B4C0 /* Source Control */;
userBuildSettings = {
@@ -472,24 +477,24 @@
E4B69E1D0A3A1BDC003C02F2 /* main.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {755, 416}}";
- sepNavSelRange = "{142, 0}";
- sepNavVisRange = "{0, 867}";
+ sepNavSelRange = "{482, 0}";
+ sepNavVisRange = "{0, 868}";
sepNavWindowFrame = "{{15, 4}, {976, 574}}";
};
};
E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {755, 2626}}";
- sepNavSelRange = "{1797, 0}";
- sepNavVisRange = "{0, 2041}";
+ sepNavIntBoundsRect = "{{0, 0}, {755, 3341}}";
+ sepNavSelRange = "{874, 9}";
+ sepNavVisRange = "{6025, 908}";
sepNavWindowFrame = "{{15, 4}, {976, 574}}";
};
};
E4B69E1F0A3A1BDC003C02F2 /* testApp.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {755, 1019}}";
- sepNavSelRange = "{619, 0}";
- sepNavVisRange = "{0, 1415}";
+ sepNavIntBoundsRect = "{{0, 0}, {755, 1001}}";
+ sepNavSelRange = "{1602, 0}";
+ sepNavVisRange = "{972, 634}";
sepNavWindowFrame = "{{15, 4}, {976, 1254}}";
};
};
diff --git a/src/keyVar.cpp b/src/keyVar.cpp
index 06fd2bd..1bf562a 100644
--- a/src/keyVar.cpp
+++ b/src/keyVar.cpp
@@ -17,6 +17,7 @@ void keyVar::set(char _keyInc,char _keyDec,float _val,float _speed,float _accel,
accelTime=_accelTime;
state=0;
timePressed=timeCalc=0;
+ inc=0;
}
void keyVar::keyPressed(char _key){
@@ -44,10 +45,15 @@ void keyVar::keyReleased(char _key){
}
float keyVar::getVal(){
float segment = min(1.0f,(ofGetElapsedTimef()-timePressed)/accelTime);
- if (state) val+=pow(segment,accel)*speed*state; //(ofGetElapsedTimef()-timeCalc)*
+ //if (state)
+ val+=pow(segment,accel)*speed*state; //(ofGetElapsedTimef()-timeCalc)*
+ inc=pow(segment,accel)*speed*state;
timeCalc=ofGetElapsedTimef();
return val;
}
+float keyVar::readVal(){
+ return val;
+}
float keyVar::getInc(){
float segment = min(1.0f,(ofGetElapsedTimef()-timePressed)/accelTime);
return pow(segment,accel)*speed*state;
diff --git a/src/keyVar.h b/src/keyVar.h
index c68ffab..043a963 100644
--- a/src/keyVar.h
+++ b/src/keyVar.h
@@ -18,6 +18,9 @@ class keyVar{
float getVal();
float getInc();
void setVal(float _val);
+
+ float readVal();
+ float inc; //for syncing
private:
char keyInc,keyDec;
diff --git a/src/main.cpp b/src/main.cpp
index 7391c9e..a0adc83 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -17,8 +17,8 @@
int main( ){
ofAppGlutWindow window;
- ofSetupOpenGL(&window, 2048,768, OF_FULLSCREEN); // <-------- setup the GL context
- //ofSetupOpenGL(&window, 1024,300, OF_WINDOW);
+ //ofSetupOpenGL(&window, 2048,768, 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 6f8b00f..5e0661e 100644
--- a/src/testApp.cpp
+++ b/src/testApp.cpp
@@ -30,7 +30,7 @@ void testApp::setup(){
//ofDisableArbTex();
- mode=DISPLAY;
+ mode=CALIBRATE;
@@ -40,6 +40,7 @@ void testApp::setup(){
texture.play();
light=true;
+
}
//--------------------------------------------------------------
@@ -95,15 +96,6 @@ void testApp::keyPressed(int key){
if (activeView<0) for (int i=0;i<numViews;i++) views[i].keyPressed(key);
else if (activeView<numViews) views[activeView].keyPressed(key);
switch (key) {
- //'vertigo effect' always affects ALL VIEWPOINTS
- case 'i':
- for (int i=0;i<numViews;i++) views[i].keyPressed('o');
- for (int i=0;i<numViews;i++) views[i].keyPressed('s');
- break;
- case 'k':
- for (int i=0;i<numViews;i++) views[i].keyPressed('l');
- for (int i=0;i<numViews;i++) views[i].keyPressed('w');
- break;
case '8':
mode=CALIBRATE;
break;
@@ -153,17 +145,6 @@ void testApp::keyPressed(int key){
void testApp::keyReleased(int key){
if (activeView<0) for (int i=0;i<numViews;i++) views[i].keyReleased(key);
else if (activeView<numViews) views[activeView].keyReleased(key);
- switch (key) {
- //'vertigo effect' always affects ALL VIEWPOINTS
- case 'i':
- for (int i=0;i<numViews;i++) views[i].keyReleased('o');
- for (int i=0;i<numViews;i++) views[i].keyReleased('s');
- break;
- case 'k':
- for (int i=0;i<numViews;i++) views[i].keyReleased('l');
- for (int i=0;i<numViews;i++) views[i].keyReleased('w');
- break;
- }
}
void testApp::loadSettings(string filename){
diff --git a/src/testApp.h b/src/testApp.h
index 2ed8732..24bcbe9 100644
--- a/src/testApp.h
+++ b/src/testApp.h
@@ -72,4 +72,5 @@ class testApp : public ofBaseApp{
ofxXmlSettings XML;
bool light;
+
};
diff --git a/src/viewpoint.cpp b/src/viewpoint.cpp
index 287cf26..fe8bb28 100644
--- a/src/viewpoint.cpp
+++ b/src/viewpoint.cpp
@@ -11,15 +11,15 @@ void viewpoint::setup(map<string,string>&settings){
window=ofRectangle(ofGetWidth()*x,ofGetHeight()*y,ofGetWidth()*w,ofGetHeight()*h);
distortFactor=ofToFloat(settings["distort"]);
renderFBO.allocate(window.width,window.height,GL_RGB);
-
+
//todo: load/save from xml
fov=17.25;
aspect=1.79;
near=1;
far=20;
-
+
vars=new keyVar[9];
-
+
vars[0].set('w','s',ofToFloat(settings["fov"]),0.2,1.0,3.0);
vars[1].set('g','d',ofToFloat(settings["targX"]),1,1.0,3.0);
vars[2].set('r','v',ofToFloat(settings["targY"]),1,1.0,3.0);
@@ -29,9 +29,11 @@ void viewpoint::setup(map<string,string>&settings){
vars[6].set(',','m',ofToFloat(settings["roll"]),1,1.0,3.0);
vars[7].set('o','l',ofToFloat(settings["dolly"]),1,1.0,3.0);
vars[8].set('q','a',ofToFloat(settings["distort"]),.00001,1.0,3.0);
-
+
light.enable();
light.setDirectional();
+
+ vertigo=false;
}
double viewpoint::getSetting(const string& setting){
if (setting=="x") return x;
@@ -53,15 +55,23 @@ double viewpoint::getSetting(const string& setting){
void viewpoint::setLight(){
target.setPosition(vars[1].getVal(),vars[2].getVal(),vars[3].getVal());
//camera.orbit(vars[5].getVal(), vars[4].getVal(), vars[7].getVal(), target);
+ camera.setFov(vars[0].getVal());
+ if (vertigo) {
+ //distance=width/(2 tan (fov *0.5)
+ //multiply distance by ratio of tans of fov before and after
+ vars[7].setVal((tan((vars[0].readVal()-vars[0].inc)*PI*0.0027777)*vars[7].readVal())/tan(vars[0].readVal()*PI*0.0027777));
+ }
+
ofVec3f p(0, 0, vars[7].getVal());
//p.rotate(ofClamp(vars[2].getVal(), -89, 89), ofVec3f(1, 0, 0));
p.rotate(vars[4].getVal(), ofVec3f(1, 0, 0));
p.rotate(vars[5].getVal(), ofVec3f(0, 1, 0));
p += target.getPosition();
camera.setPosition(p);
-
+
camera.lookAt(target,ofVec3f(0,1,0).rotate(vars[6].getVal(),ofVec3f(0,0,1)).rotate(vars[5].getVal(),ofVec3f(0,1,0)));
light.setPosition(camera.getGlobalPosition());
+
}
void viewpoint::setDefaults(){
vars[0].setVal(17.25);
@@ -78,18 +88,17 @@ void viewpoint::setDefaults(){
void viewpoint::begin(){
renderFBO.begin();
ofClear(0,0,0);
-
+
camera.begin();
- camera.setFov(vars[0].getVal());
}
//--------------------------------------------------------------
void viewpoint::end(bool showStats){
-
+
camera.end();
renderFBO.end();
-
+
ofPushMatrix();
-
+
bindTexture(renderFBO);
ofNoFill();
ofSetLineWidth(1.0);
@@ -99,7 +108,7 @@ void viewpoint::end(bool showStats){
int xStep=window.width/2;
int yStep=window.height/2;
ofTranslate(window.x+xStep,window.y+yStep);
-
+
//todo: distort texcoords instead of vertex coords
for (float i = -1; i < 1.001; i+=(2.0f/gridY)){
glBegin(GL_QUAD_STRIP);
@@ -115,24 +124,54 @@ void viewpoint::end(bool showStats){
}
glEnd();
}
-
+
ofFill();
unbindTexture(renderFBO);
ofPopMatrix();
-
+
if (showStats) {
ofSetHexColor(0xFFFFFF);
- ofDrawBitmapString("camera: "+ofToString(camera.getX(), 2)+","+ofToString(camera.getY(), 2)+","+ofToString(camera.getZ(), 2)+" "+ofToString(vars[5].getVal())+"deg", window.x+10, window.y+window.height-30);
- ofDrawBitmapString("light: "+ofToString(light.getX(), 2)+","+ofToString(light.getY(), 2)+","+ofToString(light.getZ(), 2), window.x+10, window.y+window.height-18);
- }
+ //ofDrawBitmapString("camera: "+ofToString(camera.getX(), 2)+","+ofToString(camera.getY(), 2)+","+ofToString(camera.getZ(), 2)+" "+ofToString(vars[5].getVal())+"deg", window.x+10, window.y+window.height-30);
+ //ofDrawBitmapString("light: "+ofToString(light.getX(), 2)+","+ofToString(light.getY(), 2)+","+ofToString(light.getZ(), 2), window.x+10, window.y+window.height-18);
+ ofDrawBitmapString("fov: "+ofToString(vars[0].readVal(), 2)+" distance: "+ofToString(vars[7].readVal(), 2)+" distortion: "+ofToString(vars[8].readVal()), window.x+10, window.y+window.height-18);
+ }
}
//--------------------------------------------------------------
void viewpoint::keyPressed(int key){
for (int i=0;i<8;i++) vars[i].keyPressed(key);
if (DEBUG) printf("fov: %f distort: %f\n",vars[0].getVal(),vars[7].getVal());
if (key=='!') setDefaults();
- }
+ switch(key) {
+ //'vertigo effect' always affects ALL VIEWPOINTS
+ //distance=width/(2 tan (fov *0.5)
+ // a way to 'back door' the variables?
+ // a new class that represents 2 linked variables?
+ case 'i':
+ vertigo=true;
+ //keyPressed('o');
+ keyPressed('s');
+ break;
+ case 'k':
+ vertigo=true;
+ //keyPressed('l');
+ keyPressed('w');
+ break;
+ }
+}
//--------------------------------------------------------------
void viewpoint::keyReleased(int key){
for (int i=0;i<8;i++) vars[i].keyReleased(key);
+ switch (key) {
+ //'vertigo effect' always affects ALL VIEWPOINTS
+ case 'i':
+ vertigo=false;
+ //keyReleased('o');
+ keyReleased('s');
+ break;
+ case 'k':
+ vertigo=false;
+ //keyReleased('l');
+ keyReleased('w');
+ break;
+ }
}
diff --git a/src/viewpoint.h b/src/viewpoint.h
index 5ee9b63..399f84c 100644
--- a/src/viewpoint.h
+++ b/src/viewpoint.h
@@ -30,6 +30,9 @@ class viewpoint {
ofFbo renderFBO;
float distortFactor;
+
+ bool vertigo;
+
private:
@@ -50,5 +53,6 @@ class viewpoint {
ofLight light;
float x,y,w,h;
+
};