diff options
| author | Tim Redfern <tim@eclectronics.org> | 2012-01-05 00:02:13 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2012-01-05 00:02:13 +0000 |
| commit | 7641fad8ebc4ba0e6412fcb7a556a705c0a6ea2c (patch) | |
| tree | 5eb40687deac0089d9c054cf62a0fcb3bc2ba50f | |
| parent | 16cc03c435982383627dd01341656d0371ca1f2b (diff) | |
viewport objectified
| -rw-r--r-- | map4.xcodeproj/tim.mode1v3 | 130 | ||||
| -rw-r--r-- | map4.xcodeproj/tim.pbxuser | 226 | ||||
| -rw-r--r-- | src/main.cpp | 2 | ||||
| -rw-r--r-- | src/testApp.cpp | 30 | ||||
| -rw-r--r-- | src/testApp.h | 1 | ||||
| -rw-r--r-- | src/viewpoint.cpp | 10 |
6 files changed, 224 insertions, 175 deletions
diff --git a/map4.xcodeproj/tim.mode1v3 b/map4.xcodeproj/tim.mode1v3 index df4c30e..d42c04d 100644 --- a/map4.xcodeproj/tim.mode1v3 +++ b/map4.xcodeproj/tim.mode1v3 @@ -197,7 +197,48 @@ <key>Notifications</key> <array/> <key>OpenEditors</key> - <array/> + <array> + <dict> + <key>Content</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>226875DB14B51C4B006FAF1F</string> + <key>PBXProjectModuleLabel</key> + <string>ofRectangle.h</string> + <key>PBXSplitModuleInNavigatorKey</key> + <dict> + <key>Split0</key> + <dict> + <key>PBXProjectModuleGUID</key> + <string>226875DC14B51C4B006FAF1F</string> + <key>PBXProjectModuleLabel</key> + <string>ofRectangle.h</string> + <key>_historyCapacity</key> + <integer>0</integer> + <key>bookmark</key> + <string>226875DD14B51C4B006FAF1F</string> + <key>history</key> + <array> + <string>226875D014B51C34006FAF1F</string> + </array> + </dict> + <key>SplitCount</key> + <string>1</string> + </dict> + <key>StatusBarVisibility</key> + <true/> + </dict> + <key>Geometry</key> + <dict> + <key>Frame</key> + <string>{{0, 20}, {976, 477}}</string> + <key>PBXModuleWindowStatusBarHidden2</key> + <false/> + <key>RubberWindowFrame</key> + <string>15 60 976 518 0 0 1024 578 </string> + </dict> + </dict> + </array> <key>PerspectiveWidths</key> <array> <integer>-1</integer> @@ -271,7 +312,7 @@ <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> <array> <array> - <integer>11</integer> + <integer>8</integer> <integer>3</integer> <integer>0</integer> </array> @@ -314,7 +355,7 @@ <key>PBXProjectModuleGUID</key> <string>1CE0B20306471E060097A5F4</string> <key>PBXProjectModuleLabel</key> - <string>testApp.cpp</string> + <string>viewpoint.cpp</string> <key>PBXSplitModuleInNavigatorKey</key> <dict> <key>Split0</key> @@ -322,28 +363,29 @@ <key>PBXProjectModuleGUID</key> <string>1CE0B20406471E060097A5F4</string> <key>PBXProjectModuleLabel</key> - <string>testApp.cpp</string> + <string>viewpoint.cpp</string> <key>_historyCapacity</key> <integer>0</integer> <key>bookmark</key> - <string>226875A614B5000F006FAF1F</string> + <string>226875DA14B51C4B006FAF1F</string> <key>history</key> <array> <string>220EA1EF14925D45004424ED</string> <string>22AFFECF149798EE0079DDC5</string> <string>22AFFED1149798EE0079DDC5</string> <string>22570F8114B111F1009BC2A4</string> - <string>22570F8214B111F1009BC2A4</string> <string>2257104214B1404F009BC2A4</string> <string>2257104414B1404F009BC2A4</string> - <string>22578A0914B34BAC0036E99C</string> - <string>2226A43014B3B80600A9FC9F</string> <string>2226A46F14B3BF5C00A9FC9F</string> - <string>2226A47914B3C58400A9FC9F</string> <string>2226A47A14B3C58400A9FC9F</string> <string>2226A47C14B3C58400A9FC9F</string> - <string>2226A4A514B3CAB700A9FC9F</string> - <string>22D4C35D14B4FAF600BC7337</string> + <string>226875D314B51C4B006FAF1F</string> + <string>226875D414B51C4B006FAF1F</string> + <string>226875D514B51C4B006FAF1F</string> + <string>226875D614B51C4B006FAF1F</string> + <string>226875D714B51C4B006FAF1F</string> + <string>226875D814B51C4B006FAF1F</string> + <string>226875D914B51C4B006FAF1F</string> </array> </dict> <key>SplitCount</key> @@ -541,8 +583,14 @@ <integer>5</integer> <key>WindowOrderList</key> <array> + <string>226875E714B51C4B006FAF1F</string> + <string>226875E814B51C4B006FAF1F</string> + <string>1C78EAAD065D492600B07095</string> + <string>1CD10A99069EF8BA00B06720</string> <string>22C080D114918C2F00E6B4C0</string> <string>/Developer/Library/openFrameworks/custom/dev/map4/map4.xcodeproj</string> + <string>1C530D57069F1CE1000CFCEE</string> + <string>226875DB14B51C4B006FAF1F</string> </array> <key>WindowString</key> <string>0 59 1024 519 0 0 1024 578 </string> @@ -744,13 +792,13 @@ <key>TableOfContents</key> <array> <string>1CD10A99069EF8BA00B06720</string> - <string>22D4C34C14B4F03D00BC7337</string> + <string>226875DE14B51C4B006FAF1F</string> <string>1C162984064C10D400B95A72</string> - <string>22D4C34D14B4F03D00BC7337</string> - <string>22D4C34E14B4F03D00BC7337</string> - <string>22D4C34F14B4F03D00BC7337</string> - <string>22D4C35014B4F03D00BC7337</string> - <string>22D4C35114B4F03D00BC7337</string> + <string>226875DF14B51C4B006FAF1F</string> + <string>226875E014B51C4B006FAF1F</string> + <string>226875E114B51C4B006FAF1F</string> + <string>226875E214B51C4B006FAF1F</string> + <string>226875E314B51C4B006FAF1F</string> </array> <key>ToolbarConfiguration</key> <string>xcode.toolbar.config.debugV3</string> @@ -762,8 +810,12 @@ <false/> </dict> <dict> + <key>FirstTimeWindowDisplayed</key> + <false/> <key>Identifier</key> <string>windowTool.find</string> + <key>IsVertical</key> + <true/> <key>Layout</key> <array> <dict> @@ -778,26 +830,16 @@ <key>PBXProjectModuleGUID</key> <string>1CDD528C0622207200134675</string> <key>PBXProjectModuleLabel</key> - <string><No Editor></string> - <key>PBXSplitModuleInNavigatorKey</key> - <dict> - <key>Split0</key> - <dict> - <key>PBXProjectModuleGUID</key> - <string>1CD0528D0623707200166675</string> - </dict> - <key>SplitCount</key> - <string>1</string> - </dict> + <string>ofRectangle.h</string> <key>StatusBarVisibility</key> - <integer>1</integer> + <true/> </dict> <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{0, 0}, {781, 167}}</string> + <string>{{0, 0}, {781, 212}}</string> <key>RubberWindowFrame</key> - <string>62 385 781 470 0 0 1440 878 </string> + <string>21 85 781 470 0 0 1024 578 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> @@ -806,11 +848,11 @@ </dict> </array> <key>Proportion</key> - <string>50%</string> + <string>212pt</string> </dict> <dict> <key>BecomeActive</key> - <integer>1</integer> + <true/> <key>ContentConfiguration</key> <dict> <key>PBXProjectModuleGUID</key> @@ -821,18 +863,18 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{8, 0}, {773, 254}}</string> + <string>{{0, 217}, {781, 212}}</string> <key>RubberWindowFrame</key> - <string>62 385 781 470 0 0 1440 878 </string> + <string>21 85 781 470 0 0 1024 578 </string> </dict> <key>Module</key> <string>PBXProjectFindModule</string> <key>Proportion</key> - <string>50%</string> + <string>212pt</string> </dict> </array> <key>Proportion</key> - <string>428pt</string> + <string>429pt</string> </dict> </array> <key>Name</key> @@ -842,23 +884,21 @@ <string>PBXProjectFindModule</string> </array> <key>StatusbarIsVisible</key> - <integer>1</integer> + <true/> <key>TableOfContents</key> <array> <string>1C530D57069F1CE1000CFCEE</string> - <string>1C530D58069F1CE1000CFCEE</string> - <string>1C530D59069F1CE1000CFCEE</string> + <string>226875E414B51C4B006FAF1F</string> + <string>226875E514B51C4B006FAF1F</string> <string>1CDD528C0622207200134675</string> - <string>1C530D5A069F1CE1000CFCEE</string> - <string>1CE0B1FE06471DED0097A5F4</string> <string>1CD0528E0623707200166675</string> </array> <key>WindowString</key> - <string>62 385 781 470 0 0 1440 878 </string> + <string>21 85 781 470 0 0 1024 578 </string> <key>WindowToolGUID</key> <string>1C530D57069F1CE1000CFCEE</string> <key>WindowToolIsVisible</key> - <integer>0</integer> + <true/> </dict> <dict> <key>Identifier</key> @@ -912,7 +952,7 @@ <key>TableOfContents</key> <array> <string>1C78EAAD065D492600B07095</string> - <string>22D4C35214B4F03D00BC7337</string> + <string>226875E614B51C4B006FAF1F</string> <string>1C78EAAC065D492600B07095</string> </array> <key>ToolbarConfiguration</key> diff --git a/map4.xcodeproj/tim.pbxuser b/map4.xcodeproj/tim.pbxuser index 82ec3ca..b0d5bf8 100644 --- a/map4.xcodeproj/tim.pbxuser +++ b/map4.xcodeproj/tim.pbxuser @@ -47,16 +47,6 @@ sourceDirectories = ( ); }; - 2226A43014B3B80600A9FC9F /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 22EF433814AF89EF003C3497 /* mapUtils.cpp */; - name = "mapUtils.cpp: 11"; - rLen = 0; - rLoc = 171; - rType = 0; - vrLen = 1475; - vrLoc = 2715; - }; 2226A46F14B3BF5C00A9FC9F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = E4B69E1F0A3A1BDC003C02F2 /* testApp.h */; @@ -67,16 +57,6 @@ vrLen = 629; vrLoc = 649; }; - 2226A47914B3C58400A9FC9F /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 223429A414AF70B100D0B406 /* viewpoint.h */; - name = "viewpoint.h: 43"; - rLen = 0; - rLoc = 681; - rType = 0; - vrLen = 526; - vrLoc = 175; - }; 2226A47A14B3C58400A9FC9F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 2226A47B14B3C58400A9FC9F /* ofLight.h */; @@ -104,26 +84,6 @@ vrLen = 858; vrLoc = 1618; }; - 2226A4A514B3CAB700A9FC9F /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 223429A314AF70B100D0B406 /* viewpoint.cpp */; - name = "viewpoint.cpp: 34"; - rLen = 0; - rLoc = 651; - rType = 0; - vrLen = 835; - vrLoc = 0; - }; - 2226A4AB14B3CAEB00A9FC9F /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; - name = "testApp.cpp: 14"; - rLen = 0; - rLoc = 255; - rType = 0; - vrLen = 741; - vrLoc = 0; - }; 223429A114AF70B100D0B406 /* keyVar.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {755, 715}}"; @@ -140,17 +100,17 @@ }; 223429A314AF70B100D0B406 /* viewpoint.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {1076, 1235}}"; - sepNavSelRange = "{1598, 0}"; - sepNavVisRange = "{0, 821}"; + sepNavIntBoundsRect = "{{0, 0}, {755, 1274}}"; + sepNavSelRange = "{108, 11}"; + sepNavVisRange = "{0, 827}"; sepNavWindowFrame = "{{15, 4}, {976, 574}}"; }; }; 223429A414AF70B100D0B406 /* viewpoint.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {755, 624}}"; - sepNavSelRange = "{681, 0}"; - sepNavVisRange = "{175, 526}"; + sepNavSelRange = "{226, 0}"; + sepNavVisRange = "{0, 492}"; }; }; 22570F8114B111F1009BC2A4 /* PBXTextBookmark */ = { @@ -163,16 +123,6 @@ vrLen = 448; vrLoc = 0; }; - 22570F8214B111F1009BC2A4 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 22EF433914AF89EF003C3497 /* mapUtils.h */; - name = "mapUtils.h: 16"; - rLen = 0; - rLoc = 327; - rType = 0; - vrLen = 329; - vrLoc = 0; - }; 22570FEC14B131A0009BC2A4 /* ofCamera.h */ = { isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; @@ -214,36 +164,113 @@ vrLen = 830; vrLoc = 0; }; - 22578A0914B34BAC0036E99C /* PBXTextBookmark */ = { + 226875CF14B51C34006FAF1F /* ofRectangle.h */ = { + isa = PBXFileReference; + lastKnownFileType = sourcecode.c.h; + name = ofRectangle.h; + path = /Developer/Library/openFrameworks/libs/openFrameworks/types/ofRectangle.h; + sourceTree = "<absolute>"; + uiCtxt = { + sepNavIntBoundsRect = "{{0, 0}, {917, 650}}"; + sepNavSelRange = "{0, 0}"; + sepNavVisRange = "{194, 914}"; + sepNavWindowFrame = "{{15, 4}, {976, 574}}"; + }; + }; + 226875D014B51C34006FAF1F /* PBXBookmark */ = { + isa = PBXBookmark; + fRef = 226875CF14B51C34006FAF1F /* ofRectangle.h */; + }; + 226875D314B51C4B006FAF1F /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = 223429A114AF70B100D0B406 /* keyVar.cpp */; - name = "keyVar.cpp: 54"; + fRef = 22EF433814AF89EF003C3497 /* mapUtils.cpp */; + name = "mapUtils.cpp: 11"; rLen = 0; - rLoc = 1398; + rLoc = 171; rType = 0; - vrLen = 1398; + vrLen = 739; vrLoc = 0; }; - 226875A614B5000F006FAF1F /* PBXTextBookmark */ = { + 226875D414B51C4B006FAF1F /* PBXTextBookmark */ = { isa = PBXTextBookmark; - fRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; - name = "testApp.cpp: 17"; + fRef = 22EF433914AF89EF003C3497 /* mapUtils.h */; + name = "mapUtils.h: 16"; + rLen = 0; + rLoc = 327; + rType = 0; + vrLen = 329; + vrLoc = 0; + }; + 226875D514B51C4B006FAF1F /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 223429A214AF70B100D0B406 /* keyVar.h */; + name = "keyVar.h: 1"; rLen = 0; - rLoc = 313; + rLoc = 0; rType = 0; - vrLen = 717; + vrLen = 519; vrLoc = 0; }; - 22AABA5214B4EBFD00280662 /* PBXTextBookmark */ = { + 226875D614B51C4B006FAF1F /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 223429A114AF70B100D0B406 /* keyVar.cpp */; + name = "keyVar.cpp: 5"; + rLen = 0; + rLoc = 128; + rType = 0; + vrLen = 932; + vrLoc = 533; + }; + 226875D714B51C4B006FAF1F /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 223429A414AF70B100D0B406 /* viewpoint.h */; + name = "viewpoint.h: 18"; + rLen = 0; + rLoc = 226; + rType = 0; + vrLen = 492; + vrLoc = 0; + }; + 226875D814B51C4B006FAF1F /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; - name = "testApp.cpp: 14"; + name = "testApp.cpp: 32"; + rLen = 0; + rLoc = 783; + rType = 0; + vrLen = 768; + vrLoc = 133; + }; + 226875D914B51C4B006FAF1F /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 223429A314AF70B100D0B406 /* viewpoint.cpp */; + name = "viewpoint.cpp: 49"; rLen = 0; - rLoc = 255; + rLoc = 1301; + rType = 0; + vrLen = 953; + vrLoc = 39; + }; + 226875DA14B51C4B006FAF1F /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 223429A314AF70B100D0B406 /* viewpoint.cpp */; + name = "viewpoint.cpp: 5"; + rLen = 11; + rLoc = 108; rType = 0; - vrLen = 740; + vrLen = 827; vrLoc = 0; }; + 226875DD14B51C4B006FAF1F /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 226875CF14B51C34006FAF1F /* ofRectangle.h */; + name = "ofRectangle.h: 1"; + rLen = 0; + rLoc = 0; + rType = 0; + vrLen = 913; + vrLoc = 195; + }; 22AFFECF149798EE0079DDC5 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 22AFFED0149798EE0079DDC5 /* ofGraphics.h */; @@ -292,36 +319,6 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 22D4C34114B4ED2D00BC7337 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; - name = "testApp.cpp: 14"; - rLen = 0; - rLoc = 255; - rType = 0; - vrLen = 740; - vrLoc = 0; - }; - 22D4C34B14B4F03D00BC7337 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; - name = "testApp.cpp: 18"; - rLen = 0; - rLoc = 345; - rType = 0; - vrLen = 721; - vrLoc = 0; - }; - 22D4C35D14B4FAF600BC7337 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */; - name = "testApp.cpp: 17"; - rLen = 0; - rLoc = 313; - rType = 0; - vrLen = 697; - vrLoc = 0; - }; 22EF433814AF89EF003C3497 /* mapUtils.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {761, 1248}}"; @@ -371,30 +368,29 @@ PBXFileDataSource_Target_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 347406347; - PBXWorkspaceStateSaveDate = 347406347; + PBXPerProjectTemplateStateSaveDate = 347413595; + PBXWorkspaceStateSaveDate = 347413595; }; perUserProjectItems = { 220EA1EF14925D45004424ED = 220EA1EF14925D45004424ED /* PBXTextBookmark */; - 2226A43014B3B80600A9FC9F = 2226A43014B3B80600A9FC9F /* PBXTextBookmark */; 2226A46F14B3BF5C00A9FC9F = 2226A46F14B3BF5C00A9FC9F /* PBXTextBookmark */; - 2226A47914B3C58400A9FC9F = 2226A47914B3C58400A9FC9F /* PBXTextBookmark */; 2226A47A14B3C58400A9FC9F = 2226A47A14B3C58400A9FC9F /* PBXTextBookmark */; 2226A47C14B3C58400A9FC9F = 2226A47C14B3C58400A9FC9F /* PBXTextBookmark */; - 2226A4A514B3CAB700A9FC9F = 2226A4A514B3CAB700A9FC9F /* PBXTextBookmark */; - 2226A4AB14B3CAEB00A9FC9F = 2226A4AB14B3CAEB00A9FC9F /* PBXTextBookmark */; 22570F8114B111F1009BC2A4 = 22570F8114B111F1009BC2A4 /* PBXTextBookmark */; - 22570F8214B111F1009BC2A4 = 22570F8214B111F1009BC2A4 /* PBXTextBookmark */; 2257104214B1404F009BC2A4 = 2257104214B1404F009BC2A4 /* PBXTextBookmark */; 2257104414B1404F009BC2A4 = 2257104414B1404F009BC2A4 /* PBXTextBookmark */; - 22578A0914B34BAC0036E99C = 22578A0914B34BAC0036E99C /* PBXTextBookmark */; - 226875A614B5000F006FAF1F /* PBXTextBookmark */ = 226875A614B5000F006FAF1F /* PBXTextBookmark */; - 22AABA5214B4EBFD00280662 = 22AABA5214B4EBFD00280662 /* PBXTextBookmark */; + 226875D014B51C34006FAF1F = 226875D014B51C34006FAF1F /* PBXBookmark */; + 226875D314B51C4B006FAF1F = 226875D314B51C4B006FAF1F /* PBXTextBookmark */; + 226875D414B51C4B006FAF1F = 226875D414B51C4B006FAF1F /* PBXTextBookmark */; + 226875D514B51C4B006FAF1F = 226875D514B51C4B006FAF1F /* PBXTextBookmark */; + 226875D614B51C4B006FAF1F = 226875D614B51C4B006FAF1F /* PBXTextBookmark */; + 226875D714B51C4B006FAF1F = 226875D714B51C4B006FAF1F /* PBXTextBookmark */; + 226875D814B51C4B006FAF1F = 226875D814B51C4B006FAF1F /* PBXTextBookmark */; + 226875D914B51C4B006FAF1F = 226875D914B51C4B006FAF1F /* PBXTextBookmark */; + 226875DA14B51C4B006FAF1F = 226875DA14B51C4B006FAF1F /* PBXTextBookmark */; + 226875DD14B51C4B006FAF1F = 226875DD14B51C4B006FAF1F /* PBXTextBookmark */; 22AFFECF149798EE0079DDC5 = 22AFFECF149798EE0079DDC5 /* PBXTextBookmark */; 22AFFED1149798EE0079DDC5 = 22AFFED1149798EE0079DDC5 /* PBXTextBookmark */; - 22D4C34114B4ED2D00BC7337 = 22D4C34114B4ED2D00BC7337 /* PBXTextBookmark */; - 22D4C34B14B4F03D00BC7337 = 22D4C34B14B4F03D00BC7337 /* PBXTextBookmark */; - 22D4C35D14B4FAF600BC7337 = 22D4C35D14B4FAF600BC7337 /* PBXTextBookmark */; }; sourceControlManager = 22C080CC1491244000E6B4C0 /* Source Control */; userBuildSettings = { @@ -416,9 +412,9 @@ }; E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {755, 1781}}"; - sepNavSelRange = "{371, 0}"; - sepNavVisRange = "{0, 717}"; + sepNavIntBoundsRect = "{{0, 0}, {755, 1664}}"; + sepNavSelRange = "{783, 0}"; + sepNavVisRange = "{133, 768}"; sepNavWindowFrame = "{{15, 4}, {976, 574}}"; }; }; diff --git a/src/main.cpp b/src/main.cpp index 1ed640d..ac9bc8c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -21,7 +21,7 @@ int main( ){ ofAppGlutWindow window; - ofSetupOpenGL(&window, 512,512, OF_WINDOW); // <-------- setup the GL context + ofSetupOpenGL(&window, 800,400, OF_WINDOW); // <-------- setup the GL context 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 42f7055..7e448fd 100644 --- a/src/testApp.cpp +++ b/src/testApp.cpp @@ -25,10 +25,12 @@ void testApp::setup(){ mode=CALIBRATE; - views=new viewpoint[1]; + views=new viewpoint[2]; //todo: read this from xml - views[0].setup(ofGetWidth(),ofGetHeight(),0,0); + numViews=2; + views[0].setup(ofGetWidth()/2,ofGetHeight(),0,0); + views[1].setup(ofGetWidth()/2,ofGetHeight(),ofGetWidth()/2,0); activeView=0; } @@ -39,9 +41,11 @@ void testApp::update(){ //-------------------------------------------------------------- void testApp::draw(){ - - views[0].setLight(); - views[0].begin(); + for (int i=0;i<numViews;i++) { + views[i].setLight(); + } + for (int i=0;i<numViews;i++) { + views[i].begin(); ofSetColor(255, 255, 255, 255); ofFill(); switch(mode) { @@ -62,24 +66,32 @@ void testApp::draw(){ glPopMatrix(); break; } - views[0].end(); + views[i].end(); + } ofSetHexColor(0xFFFFFF); ofDrawBitmapString("fps: "+ofToString(ofGetFrameRate(), 2), 10, 15); } //-------------------------------------------------------------- void testApp::keyPressed(int key){ + //todo: 'both' mode views[activeView].keyPressed(key); switch (key) { - case '1': + case '8': mode=CALIBRATE; break; - case '2': + case '9': mode=DISPLAY; break; - case '3': + case '0': mode=NOTHING; break; + case '1': + activeView=0; + break; + case '2': + activeView=1; + break; } } diff --git a/src/testApp.h b/src/testApp.h index e2138a0..95aabf7 100644 --- a/src/testApp.h +++ b/src/testApp.h @@ -54,6 +54,7 @@ class testApp : public ofBaseApp{ viewpoint* views; int activeView; //receives keypresses + int numViews; int mode; diff --git a/src/viewpoint.cpp b/src/viewpoint.cpp index daca64f..225ad0f 100644 --- a/src/viewpoint.cpp +++ b/src/viewpoint.cpp @@ -2,7 +2,7 @@ #define DEBUG 0 void viewpoint::setup(float w, float h, float x, float y) { - window=ofRectangle(w,h,x,y); + window=ofRectangle(x,y,w,h); distortFactor=0.0; renderFBO.allocate(window.width,window.height,GL_RGB); @@ -21,7 +21,7 @@ void viewpoint::setup(float w, float h, float x, float y) { vars[4].set('u','n',0.0,10,1.0,3.0); vars[5].set('j','h',0.0,10,1.0,3.0); vars[6].set('o','l',1000.0,10,1.0,3.0); - vars[7].set('q','a',0,1,1.0,3.0); + vars[7].set('q','a',0,.000001,1.0,3.0); light.enable(); light.setDirectional(); @@ -55,9 +55,9 @@ void viewpoint::end(){ //ofSetColor(I_fade1,I_fade1,I_fade1); int gridX=50; int gridY=50; - int xStep=ofGetWidth()/2; - int yStep=ofGetHeight()/2; - ofTranslate(ofGetWidth()/2,ofGetHeight()/2); + 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)){ |
