Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

replace with ofxStateMachine

  • Loading branch information...
commit e4380dff93f79991124fe58aa57e16a776f890e3 1 parent 38a8b13
@hideyukisaito hideyukisaito authored
View
224 arsUI.xcodeproj/project.pbxproj
@@ -7,7 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
- 40DDEEFB16D5F5A5000C1E58 /* ofxArsUITappedPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40DDEEF916D5F5A5000C1E58 /* ofxArsUITappedPoint.cpp */; };
+ 40DDEEFB16D5F5A5000C1E58 /* ArsUITappedPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40DDEEF916D5F5A5000C1E58 /* ArsUITappedPoint.cpp */; };
40DDEF0616D604D3000C1E58 /* ofxEasingFunc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40DDEF0416D604D3000C1E58 /* ofxEasingFunc.cpp */; };
40FA61EC16D35BBD00493C03 /* IpEndpointName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FA61C816D35BBD00493C03 /* IpEndpointName.cpp */; };
40FA61ED16D35BBD00493C03 /* NetworkingUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 40FA61CD16D35BBD00493C03 /* NetworkingUtils.cpp */; };
@@ -26,8 +26,27 @@
429D68E916EDE476004B9767 /* json_value.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 429D68D916EDE476004B9767 /* json_value.cpp */; };
429D68EA16EDE476004B9767 /* json_writer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 429D68DB16EDE476004B9767 /* json_writer.cpp */; };
429D68EB16EDE476004B9767 /* ofxJSONElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 429D68E016EDE476004B9767 /* ofxJSONElement.cpp */; };
- AB47ADA016D73C9C00C50356 /* ofxArsUIButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB47AD9E16D73C9C00C50356 /* ofxArsUIButton.cpp */; };
- AB47ADFD16DB355500C50356 /* ofxArsUIRoboCam.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB47ADFB16DB355500C50356 /* ofxArsUIRoboCam.cpp */; };
+ AB2701E016EECBFA000AC44E /* TitleState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB2701DF16EECBFA000AC44E /* TitleState.cpp */; };
+ AB2701EA16EECC26000AC44E /* tinyxml.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB2701E316EECC26000AC44E /* tinyxml.cpp */; };
+ AB2701EB16EECC26000AC44E /* tinyxmlerror.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB2701E516EECC26000AC44E /* tinyxmlerror.cpp */; };
+ AB2701EC16EECC26000AC44E /* tinyxmlparser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB2701E616EECC26000AC44E /* tinyxmlparser.cpp */; };
+ AB2701ED16EECC26000AC44E /* ofxXmlSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB2701E816EECC26000AC44E /* ofxXmlSettings.cpp */; };
+ AB2701F116EECE82000AC44E /* MapControlState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB2701F016EECE82000AC44E /* MapControlState.cpp */; };
+ AB27022B16EECF4C000AC44E /* ofxEasing.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27020D16EECF4C000AC44E /* ofxEasing.cpp */; };
+ AB27022C16EECF4C000AC44E /* ofxEasingBack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27020F16EECF4C000AC44E /* ofxEasingBack.cpp */; };
+ AB27022D16EECF4C000AC44E /* ofxEasingBounce.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27021116EECF4C000AC44E /* ofxEasingBounce.cpp */; };
+ AB27022E16EECF4C000AC44E /* ofxEasingCirc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27021316EECF4C000AC44E /* ofxEasingCirc.cpp */; };
+ AB27022F16EECF4C000AC44E /* ofxEasingCubic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27021516EECF4C000AC44E /* ofxEasingCubic.cpp */; };
+ AB27023016EECF4C000AC44E /* ofxEasingElastic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27021716EECF4C000AC44E /* ofxEasingElastic.cpp */; };
+ AB27023116EECF4C000AC44E /* ofxEasingExpo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27021916EECF4C000AC44E /* ofxEasingExpo.cpp */; };
+ AB27023216EECF4C000AC44E /* ofxEasingLinear.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27021B16EECF4C000AC44E /* ofxEasingLinear.cpp */; };
+ AB27023316EECF4C000AC44E /* ofxEasingQuad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27021D16EECF4C000AC44E /* ofxEasingQuad.cpp */; };
+ AB27023416EECF4C000AC44E /* ofxEasingQuart.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27021F16EECF4C000AC44E /* ofxEasingQuart.cpp */; };
+ AB27023516EECF4C000AC44E /* ofxEasingQuint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27022116EECF4C000AC44E /* ofxEasingQuint.cpp */; };
+ AB27023616EECF4C000AC44E /* ofxEasingSine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27022316EECF4C000AC44E /* ofxEasingSine.cpp */; };
+ AB27023716EECF4C000AC44E /* ofxTween.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB27022516EECF4C000AC44E /* ofxTween.cpp */; };
+ AB47ADA016D73C9C00C50356 /* ArsUIButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB47AD9E16D73C9C00C50356 /* ArsUIButton.cpp */; };
+ AB47ADFD16DB355500C50356 /* ArsUIRoboCam.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AB47ADFB16DB355500C50356 /* ArsUIRoboCam.cpp */; };
BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; };
E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworksDebug.a */; };
E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9710E8CC7DD009D7055 /* AGL.framework */; };
@@ -81,8 +100,8 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
- 40DDEEF916D5F5A5000C1E58 /* ofxArsUITappedPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxArsUITappedPoint.cpp; sourceTree = "<group>"; };
- 40DDEEFA16D5F5A5000C1E58 /* ofxArsUITappedPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxArsUITappedPoint.h; sourceTree = "<group>"; };
+ 40DDEEF916D5F5A5000C1E58 /* ArsUITappedPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArsUITappedPoint.cpp; sourceTree = "<group>"; };
+ 40DDEEFA16D5F5A5000C1E58 /* ArsUITappedPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArsUITappedPoint.h; sourceTree = "<group>"; };
40DDEF0416D604D3000C1E58 /* ofxEasingFunc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasingFunc.cpp; sourceTree = "<group>"; };
40DDEF0516D604D3000C1E58 /* ofxEasingFunc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasingFunc.h; sourceTree = "<group>"; };
40FA61C816D35BBD00493C03 /* IpEndpointName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IpEndpointName.cpp; sourceTree = "<group>"; };
@@ -144,10 +163,50 @@
429D68DD16EDE476004B9767 /* version */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = version; sourceTree = "<group>"; };
429D68E016EDE476004B9767 /* ofxJSONElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxJSONElement.cpp; sourceTree = "<group>"; };
429D68E116EDE476004B9767 /* ofxJSONElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxJSONElement.h; sourceTree = "<group>"; };
- AB47AD9E16D73C9C00C50356 /* ofxArsUIButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxArsUIButton.cpp; sourceTree = "<group>"; };
- AB47AD9F16D73C9C00C50356 /* ofxArsUIButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxArsUIButton.h; sourceTree = "<group>"; };
- AB47ADFB16DB355500C50356 /* ofxArsUIRoboCam.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxArsUIRoboCam.cpp; sourceTree = "<group>"; };
- AB47ADFC16DB355500C50356 /* ofxArsUIRoboCam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxArsUIRoboCam.h; sourceTree = "<group>"; };
+ AB2701D516EECB42000AC44E /* ofxState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxState.h; sourceTree = "<group>"; };
+ AB2701D616EECB42000AC44E /* ofxStateMachine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxStateMachine.h; sourceTree = "<group>"; };
+ AB2701DE16EECBE0000AC44E /* TitleState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TitleState.h; sourceTree = "<group>"; };
+ AB2701DF16EECBFA000AC44E /* TitleState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TitleState.cpp; sourceTree = "<group>"; };
+ AB2701E316EECC26000AC44E /* tinyxml.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tinyxml.cpp; sourceTree = "<group>"; };
+ AB2701E416EECC26000AC44E /* tinyxml.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tinyxml.h; sourceTree = "<group>"; };
+ AB2701E516EECC26000AC44E /* tinyxmlerror.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tinyxmlerror.cpp; sourceTree = "<group>"; };
+ AB2701E616EECC26000AC44E /* tinyxmlparser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tinyxmlparser.cpp; sourceTree = "<group>"; };
+ AB2701E816EECC26000AC44E /* ofxXmlSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxXmlSettings.cpp; sourceTree = "<group>"; };
+ AB2701E916EECC26000AC44E /* ofxXmlSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxXmlSettings.h; sourceTree = "<group>"; };
+ AB2701EE16EECC49000AC44E /* ArsUISharedData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ArsUISharedData.h; sourceTree = "<group>"; };
+ AB2701EF16EECE74000AC44E /* MapControlState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MapControlState.h; sourceTree = "<group>"; };
+ AB2701F016EECE82000AC44E /* MapControlState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MapControlState.cpp; sourceTree = "<group>"; };
+ AB27020C16EECF4C000AC44E /* easing_terms_of_use.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = easing_terms_of_use.html; sourceTree = "<group>"; };
+ AB27020D16EECF4C000AC44E /* ofxEasing.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasing.cpp; sourceTree = "<group>"; };
+ AB27020E16EECF4C000AC44E /* ofxEasing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasing.h; sourceTree = "<group>"; };
+ AB27020F16EECF4C000AC44E /* ofxEasingBack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasingBack.cpp; sourceTree = "<group>"; };
+ AB27021016EECF4C000AC44E /* ofxEasingBack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasingBack.h; sourceTree = "<group>"; };
+ AB27021116EECF4C000AC44E /* ofxEasingBounce.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasingBounce.cpp; sourceTree = "<group>"; };
+ AB27021216EECF4C000AC44E /* ofxEasingBounce.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasingBounce.h; sourceTree = "<group>"; };
+ AB27021316EECF4C000AC44E /* ofxEasingCirc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasingCirc.cpp; sourceTree = "<group>"; };
+ AB27021416EECF4C000AC44E /* ofxEasingCirc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasingCirc.h; sourceTree = "<group>"; };
+ AB27021516EECF4C000AC44E /* ofxEasingCubic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasingCubic.cpp; sourceTree = "<group>"; };
+ AB27021616EECF4C000AC44E /* ofxEasingCubic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasingCubic.h; sourceTree = "<group>"; };
+ AB27021716EECF4C000AC44E /* ofxEasingElastic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasingElastic.cpp; sourceTree = "<group>"; };
+ AB27021816EECF4C000AC44E /* ofxEasingElastic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasingElastic.h; sourceTree = "<group>"; };
+ AB27021916EECF4C000AC44E /* ofxEasingExpo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasingExpo.cpp; sourceTree = "<group>"; };
+ AB27021A16EECF4C000AC44E /* ofxEasingExpo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasingExpo.h; sourceTree = "<group>"; };
+ AB27021B16EECF4C000AC44E /* ofxEasingLinear.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasingLinear.cpp; sourceTree = "<group>"; };
+ AB27021C16EECF4C000AC44E /* ofxEasingLinear.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasingLinear.h; sourceTree = "<group>"; };
+ AB27021D16EECF4C000AC44E /* ofxEasingQuad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasingQuad.cpp; sourceTree = "<group>"; };
+ AB27021E16EECF4C000AC44E /* ofxEasingQuad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasingQuad.h; sourceTree = "<group>"; };
+ AB27021F16EECF4C000AC44E /* ofxEasingQuart.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasingQuart.cpp; sourceTree = "<group>"; };
+ AB27022016EECF4C000AC44E /* ofxEasingQuart.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasingQuart.h; sourceTree = "<group>"; };
+ AB27022116EECF4C000AC44E /* ofxEasingQuint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasingQuint.cpp; sourceTree = "<group>"; };
+ AB27022216EECF4C000AC44E /* ofxEasingQuint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasingQuint.h; sourceTree = "<group>"; };
+ AB27022316EECF4C000AC44E /* ofxEasingSine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxEasingSine.cpp; sourceTree = "<group>"; };
+ AB27022416EECF4C000AC44E /* ofxEasingSine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxEasingSine.h; sourceTree = "<group>"; };
+ AB27022516EECF4C000AC44E /* ofxTween.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ofxTween.cpp; sourceTree = "<group>"; };
+ AB27022616EECF4C000AC44E /* ofxTween.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ofxTween.h; sourceTree = "<group>"; };
+ AB47AD9E16D73C9C00C50356 /* ArsUIButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArsUIButton.cpp; sourceTree = "<group>"; };
+ AB47AD9F16D73C9C00C50356 /* ArsUIButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArsUIButton.h; sourceTree = "<group>"; };
+ AB47ADFB16DB355500C50356 /* ArsUIRoboCam.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArsUIRoboCam.cpp; sourceTree = "<group>"; };
+ AB47ADFC16DB355500C50356 /* ArsUIRoboCam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArsUIRoboCam.h; sourceTree = "<group>"; };
AB47AE0016DCEF2300C50356 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
BBAB23BE13894E4700AA2426 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = "<group>"; };
E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; };
@@ -353,7 +412,8 @@
429D68C716EDE476004B9767 /* libs */,
429D68DF16EDE476004B9767 /* src */,
);
- path = ofxJSON;
+ name = ofxJSON;
+ path = ../../../addons/ofxJSON;
sourceTree = "<group>";
};
429D68C716EDE476004B9767 /* libs */ = {
@@ -422,9 +482,111 @@
path = src;
sourceTree = "<group>";
};
+ AB2701BD16EECB41000AC44E /* ofxStateMachine */ = {
+ isa = PBXGroup;
+ children = (
+ AB2701D416EECB42000AC44E /* src */,
+ );
+ name = ofxStateMachine;
+ path = ../../../addons/ofxStateMachine;
+ sourceTree = "<group>";
+ };
+ AB2701D416EECB42000AC44E /* src */ = {
+ isa = PBXGroup;
+ children = (
+ AB2701D516EECB42000AC44E /* ofxState.h */,
+ AB2701D616EECB42000AC44E /* ofxStateMachine.h */,
+ );
+ path = src;
+ sourceTree = "<group>";
+ };
+ AB2701E116EECC26000AC44E /* ofxXmlSettings */ = {
+ isa = PBXGroup;
+ children = (
+ AB2701E216EECC26000AC44E /* libs */,
+ AB2701E716EECC26000AC44E /* src */,
+ );
+ name = ofxXmlSettings;
+ path = ../../../addons/ofxXmlSettings;
+ sourceTree = "<group>";
+ };
+ AB2701E216EECC26000AC44E /* libs */ = {
+ isa = PBXGroup;
+ children = (
+ AB2701E316EECC26000AC44E /* tinyxml.cpp */,
+ AB2701E416EECC26000AC44E /* tinyxml.h */,
+ AB2701E516EECC26000AC44E /* tinyxmlerror.cpp */,
+ AB2701E616EECC26000AC44E /* tinyxmlparser.cpp */,
+ );
+ path = libs;
+ sourceTree = "<group>";
+ };
+ AB2701E716EECC26000AC44E /* src */ = {
+ isa = PBXGroup;
+ children = (
+ AB2701E816EECC26000AC44E /* ofxXmlSettings.cpp */,
+ AB2701E916EECC26000AC44E /* ofxXmlSettings.h */,
+ );
+ path = src;
+ sourceTree = "<group>";
+ };
+ AB2701F216EECF4B000AC44E /* ofxTween */ = {
+ isa = PBXGroup;
+ children = (
+ AB27020A16EECF4C000AC44E /* src */,
+ );
+ name = ofxTween;
+ path = ../../../addons/ofxTween;
+ sourceTree = "<group>";
+ };
+ AB27020A16EECF4C000AC44E /* src */ = {
+ isa = PBXGroup;
+ children = (
+ AB27020B16EECF4C000AC44E /* Easings */,
+ AB27022516EECF4C000AC44E /* ofxTween.cpp */,
+ AB27022616EECF4C000AC44E /* ofxTween.h */,
+ );
+ path = src;
+ sourceTree = "<group>";
+ };
+ AB27020B16EECF4C000AC44E /* Easings */ = {
+ isa = PBXGroup;
+ children = (
+ AB27020C16EECF4C000AC44E /* easing_terms_of_use.html */,
+ AB27020D16EECF4C000AC44E /* ofxEasing.cpp */,
+ AB27020E16EECF4C000AC44E /* ofxEasing.h */,
+ AB27020F16EECF4C000AC44E /* ofxEasingBack.cpp */,
+ AB27021016EECF4C000AC44E /* ofxEasingBack.h */,
+ AB27021116EECF4C000AC44E /* ofxEasingBounce.cpp */,
+ AB27021216EECF4C000AC44E /* ofxEasingBounce.h */,
+ AB27021316EECF4C000AC44E /* ofxEasingCirc.cpp */,
+ AB27021416EECF4C000AC44E /* ofxEasingCirc.h */,
+ AB27021516EECF4C000AC44E /* ofxEasingCubic.cpp */,
+ AB27021616EECF4C000AC44E /* ofxEasingCubic.h */,
+ AB27021716EECF4C000AC44E /* ofxEasingElastic.cpp */,
+ AB27021816EECF4C000AC44E /* ofxEasingElastic.h */,
+ AB27021916EECF4C000AC44E /* ofxEasingExpo.cpp */,
+ AB27021A16EECF4C000AC44E /* ofxEasingExpo.h */,
+ AB27021B16EECF4C000AC44E /* ofxEasingLinear.cpp */,
+ AB27021C16EECF4C000AC44E /* ofxEasingLinear.h */,
+ AB27021D16EECF4C000AC44E /* ofxEasingQuad.cpp */,
+ AB27021E16EECF4C000AC44E /* ofxEasingQuad.h */,
+ AB27021F16EECF4C000AC44E /* ofxEasingQuart.cpp */,
+ AB27022016EECF4C000AC44E /* ofxEasingQuart.h */,
+ AB27022116EECF4C000AC44E /* ofxEasingQuint.cpp */,
+ AB27022216EECF4C000AC44E /* ofxEasingQuint.h */,
+ AB27022316EECF4C000AC44E /* ofxEasingSine.cpp */,
+ AB27022416EECF4C000AC44E /* ofxEasingSine.h */,
+ );
+ path = Easings;
+ sourceTree = "<group>";
+ };
BB4B014C10F69532006C3DED /* addons */ = {
isa = PBXGroup;
children = (
+ AB2701F216EECF4B000AC44E /* ofxTween */,
+ AB2701E116EECC26000AC44E /* ofxXmlSettings */,
+ AB2701BD16EECB41000AC44E /* ofxStateMachine */,
429D689616EDE475004B9767 /* ofxJSON */,
40DDEF0216D604D3000C1E58 /* ofxEasingFunc */,
40FA61F916D35BF200493C03 /* ofxTuio */,
@@ -501,12 +663,17 @@
E4B69E1D0A3A1BDC003C02F2 /* main.cpp */,
E4B69E1F0A3A1BDC003C02F2 /* testApp.h */,
E4B69E1E0A3A1BDC003C02F2 /* testApp.cpp */,
- 40DDEEFA16D5F5A5000C1E58 /* ofxArsUITappedPoint.h */,
- 40DDEEF916D5F5A5000C1E58 /* ofxArsUITappedPoint.cpp */,
- AB47AD9F16D73C9C00C50356 /* ofxArsUIButton.h */,
- AB47AD9E16D73C9C00C50356 /* ofxArsUIButton.cpp */,
- AB47ADFC16DB355500C50356 /* ofxArsUIRoboCam.h */,
- AB47ADFB16DB355500C50356 /* ofxArsUIRoboCam.cpp */,
+ 40DDEEFA16D5F5A5000C1E58 /* ArsUITappedPoint.h */,
+ 40DDEEF916D5F5A5000C1E58 /* ArsUITappedPoint.cpp */,
+ AB47AD9F16D73C9C00C50356 /* ArsUIButton.h */,
+ AB47AD9E16D73C9C00C50356 /* ArsUIButton.cpp */,
+ AB47ADFC16DB355500C50356 /* ArsUIRoboCam.h */,
+ AB47ADFB16DB355500C50356 /* ArsUIRoboCam.cpp */,
+ AB2701DE16EECBE0000AC44E /* TitleState.h */,
+ AB2701DF16EECBFA000AC44E /* TitleState.cpp */,
+ AB2701EE16EECC49000AC44E /* ArsUISharedData.h */,
+ AB2701EF16EECE74000AC44E /* MapControlState.h */,
+ AB2701F016EECE82000AC44E /* MapControlState.cpp */,
);
path = src;
sourceTree = SOURCE_ROOT;
@@ -619,14 +786,33 @@
40FA61F616D35BBD00493C03 /* ofxOscMessage.cpp in Sources */,
40FA61F716D35BBD00493C03 /* ofxOscReceiver.cpp in Sources */,
40FA61F816D35BBD00493C03 /* ofxOscSender.cpp in Sources */,
- 40DDEEFB16D5F5A5000C1E58 /* ofxArsUITappedPoint.cpp in Sources */,
+ 40DDEEFB16D5F5A5000C1E58 /* ArsUITappedPoint.cpp in Sources */,
40DDEF0616D604D3000C1E58 /* ofxEasingFunc.cpp in Sources */,
- AB47ADA016D73C9C00C50356 /* ofxArsUIButton.cpp in Sources */,
- AB47ADFD16DB355500C50356 /* ofxArsUIRoboCam.cpp in Sources */,
+ AB47ADA016D73C9C00C50356 /* ArsUIButton.cpp in Sources */,
+ AB47ADFD16DB355500C50356 /* ArsUIRoboCam.cpp in Sources */,
429D68E816EDE476004B9767 /* json_reader.cpp in Sources */,
429D68E916EDE476004B9767 /* json_value.cpp in Sources */,
429D68EA16EDE476004B9767 /* json_writer.cpp in Sources */,
429D68EB16EDE476004B9767 /* ofxJSONElement.cpp in Sources */,
+ AB2701E016EECBFA000AC44E /* TitleState.cpp in Sources */,
+ AB2701EA16EECC26000AC44E /* tinyxml.cpp in Sources */,
+ AB2701EB16EECC26000AC44E /* tinyxmlerror.cpp in Sources */,
+ AB2701EC16EECC26000AC44E /* tinyxmlparser.cpp in Sources */,
+ AB2701ED16EECC26000AC44E /* ofxXmlSettings.cpp in Sources */,
+ AB2701F116EECE82000AC44E /* MapControlState.cpp in Sources */,
+ AB27022B16EECF4C000AC44E /* ofxEasing.cpp in Sources */,
+ AB27022C16EECF4C000AC44E /* ofxEasingBack.cpp in Sources */,
+ AB27022D16EECF4C000AC44E /* ofxEasingBounce.cpp in Sources */,
+ AB27022E16EECF4C000AC44E /* ofxEasingCirc.cpp in Sources */,
+ AB27022F16EECF4C000AC44E /* ofxEasingCubic.cpp in Sources */,
+ AB27023016EECF4C000AC44E /* ofxEasingElastic.cpp in Sources */,
+ AB27023116EECF4C000AC44E /* ofxEasingExpo.cpp in Sources */,
+ AB27023216EECF4C000AC44E /* ofxEasingLinear.cpp in Sources */,
+ AB27023316EECF4C000AC44E /* ofxEasingQuad.cpp in Sources */,
+ AB27023416EECF4C000AC44E /* ofxEasingQuart.cpp in Sources */,
+ AB27023516EECF4C000AC44E /* ofxEasingQuint.cpp in Sources */,
+ AB27023616EECF4C000AC44E /* ofxEasingSine.cpp in Sources */,
+ AB27023716EECF4C000AC44E /* ofxTween.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
View
24 src/ofxArsUIButton.cpp → src/ArsUIButton.cpp
@@ -1,7 +1,7 @@
-#include "ofxArsUIButton.h"
+#include "ArsUIButton.h"
#include "ofxEasingFunc.h"
-ofxArsUIButton::ofxArsUIButton(float _x, float _y, int _bid, ofPoint _fuji, float _angle){
+ArsUIButton::ArsUIButton(float _x, float _y, int _bid, ofPoint _fuji, float _angle){
x = _x;
y = _y;
bid = _bid;
@@ -18,7 +18,7 @@ ofxArsUIButton::ofxArsUIButton(float _x, float _y, int _bid, ofPoint _fuji, floa
viewAngle = _angle;
}
-void ofxArsUIButton::update(){
+void ArsUIButton::update(){
float v = sinf((float)bcnt/speed * 2 * PI);
radius = 30 + v*4;
@@ -26,7 +26,7 @@ void ofxArsUIButton::update(){
if(bcnt == speed) bcnt =0;
}
-void ofxArsUIButton::draw(){
+void ArsUIButton::draw(){
//status: 0:default 1:select
ofColor c;
@@ -70,7 +70,7 @@ void ofxArsUIButton::draw(){
ofPopMatrix();
}
-int ofxArsUIButton::tapped(float _x, float _y){
+int ArsUIButton::tapped(float _x, float _y){
double distance = sqrt( (double)((_x - x) * (_x - x) + (_y - y)*(_y - y))) ;
if (distance < radius/2) {
return bid;
@@ -79,7 +79,7 @@ int ofxArsUIButton::tapped(float _x, float _y){
}
//return radian
-double ofxArsUIButton::calcDirection(ofPoint *_p1, ofPoint *_p2){
+double ArsUIButton::calcDirection(ofPoint *_p1, ofPoint *_p2){
double v1[] = {100.0, 0};
double v2[] = { _p2->x - _p1->x, _p2->y - _p1->y };
double cosTheta,theta,innerProduct;
@@ -92,21 +92,21 @@ double ofxArsUIButton::calcDirection(ofPoint *_p1, ofPoint *_p2){
return theta;
}
-void ofxArsUIButton::setAngle(float _angle){
+void ArsUIButton::setAngle(float _angle){
viewAngle = _angle;
}
-void ofxArsUIButton::setStatus(int _status){
+void ArsUIButton::setStatus(int _status){
status = _status;
}
-int ofxArsUIButton::getStatus(){
+int ArsUIButton::getStatus(){
return bid;
}
-int ofxArsUIButton::getId(){
+int ArsUIButton::getId(){
return bid;
}
-void ofxArsUIButton::setCameraStatus(double _lat, double _lon){
+void ArsUIButton::setCameraStatus(double _lat, double _lon){
latitude = _lat;
longtitude = _lon;
ofPoint place = GPStoXY(_lat, _lon);
@@ -115,7 +115,7 @@ void ofxArsUIButton::setCameraStatus(double _lat, double _lon){
}
-ofPoint ofxArsUIButton::GPStoXY(double _lat,double _lon){
+ofPoint ArsUIButton::GPStoXY(double _lat,double _lon){
//calibration set
//fuji benchmark (富士 中心)
double fujiLat = 35.362841;
View
30 src/ArsUIButton.h
@@ -0,0 +1,30 @@
+#include "ofMain.h"
+
+
+class ArsUIButton
+{
+ protected:
+ int status,bcnt,speed,tcnt; //status 0: not selected, 1:selected, 2: broken
+ ofImage mark,markShadow;
+ float x,y,radius;
+ int bid;
+ ofPoint fuji;
+ double directionToFuji; //radian
+ double currentDirection;
+ double calcDirection(ofPoint *_p1, ofPoint *_p2);
+ double viewAngle;
+ double latitude;
+ double longtitude;
+
+ public:
+ ArsUIButton(float _x, float _y, int _bid, ofPoint _fuji, float _angle );
+ virtual void draw();
+ virtual void update();
+ virtual int tapped(float _x, float _y);
+ void setAngle(float _angle);
+ void setStatus(int _status);
+ int getStatus();
+ int getId();
+ void setCameraStatus(double _lat, double _lon);
+ ofPoint GPStoXY(double _lat,double _lon);
+};
View
26 src/ofxArsUIRoboCam.cpp → src/ArsUIRoboCam.cpp
@@ -1,14 +1,14 @@
-#include "ofxArsUIRoboCam.h"
+#include "ArsUIRoboCam.h"
-ofxArsUIRoboCam::ofxArsUIRoboCam(float _x, float _y, int _bid, ofPoint _fuji,float _angle):ofxArsUIButton(_x,_y,_bid,_fuji,_angle){
- ofxArsUIButton::mark.loadImage("markyellow.png");
+ArsUIRoboCam::ArsUIRoboCam(float _x, float _y, int _bid, ofPoint _fuji,float _angle):ArsUIButton(_x,_y,_bid,_fuji,_angle){
+ ArsUIButton::mark.loadImage("markyellow.png");
}
-void ofxArsUIRoboCam::update(){
- ofxArsUIButton::update();
+void ArsUIRoboCam::update(){
+ ArsUIButton::update();
}
-void ofxArsUIRoboCam::draw(){
+void ArsUIRoboCam::draw(){
//status: 0:default 1:select
ofColor c;
@@ -66,21 +66,21 @@ void ofxArsUIRoboCam::draw(){
}
-int ofxArsUIRoboCam::tapped(float _x, float _y){
- int _bid = ofxArsUIButton::tapped(_x,_y);
+int ArsUIRoboCam::tapped(float _x, float _y){
+ int _bid = ArsUIButton::tapped(_x,_y);
if (_bid != -1 && status ==1){
setDefaultAngle();
}
return _bid;
}
-void ofxArsUIRoboCam::dragAngle(float _x, float _y){
+void ArsUIRoboCam::dragAngle(float _x, float _y){
if(status == 1){
float distance = sqrt((x - _x) * (x - _x) + (y - _y) *(y - _y) );
if (distance > radius && distance < radius *1.5) {
ofPoint p1 = ofPoint(x,y);
ofPoint p2 = ofPoint(_x,_y);
- float newAngle = ofxArsUIButton::calcDirection(&p1,&p2);
+ float newAngle = ArsUIButton::calcDirection(&p1,&p2);
// if(newAngle < directionToFuji + 0.8 && newAngle > directionToFuji - 0.8 ){
currentDirection = newAngle;
// }
@@ -88,7 +88,7 @@ void ofxArsUIRoboCam::dragAngle(float _x, float _y){
}
}
-bool ofxArsUIRoboCam::dragAngleEnded (float _x, float _y){
+bool ArsUIRoboCam::dragAngleEnded (float _x, float _y){
if(status == 1){
float distance = sqrt((x - _x) * (x - _x) + (y - _y) *(y - _y) );
if (distance > radius && distance < radius *1.5) {
@@ -99,11 +99,11 @@ bool ofxArsUIRoboCam::dragAngleEnded (float _x, float _y){
return false;
}
-void ofxArsUIRoboCam::setDefaultAngle(){
+void ArsUIRoboCam::setDefaultAngle(){
currentDirection = directionToFuji;
}
-void ofxArsUIRoboCam::setRoboStatus(string _udid, double _lat, double _long, double _robox, double _roboy, double _buttery, bool _living){
+void ArsUIRoboCam::setRoboStatus(string _udid, double _lat, double _long, double _robox, double _roboy, double _buttery, bool _living){
udid = _udid;
latitude = _lat;
longtitude = _long;
View
6 src/ofxArsUIRoboCam.h → src/ArsUIRoboCam.h
@@ -1,6 +1,6 @@
-#include "ofxArsUIButton.h"
+#include "ArsUIButton.h"
-class ofxArsUIRoboCam: public ofxArsUIButton
+class ArsUIRoboCam: public ArsUIButton
{
private:
string udid;
@@ -8,7 +8,7 @@ class ofxArsUIRoboCam: public ofxArsUIButton
bool living;
public:
- ofxArsUIRoboCam(float _x, float _y, int _bid, ofPoint _fuji, float angle);
+ ArsUIRoboCam(float _x, float _y, int _bid, ofPoint _fuji, float angle);
void draw();
void update();
View
41 src/ArsUISharedData.h
@@ -0,0 +1,41 @@
+//
+// ArsUISharedData.h
+// arsUI
+//
+// Created by Circuit Lab. Mac mini on 3/12/13.
+//
+//
+
+#ifndef arsUI_ArsUISharedData_h
+#define arsUI_ArsUISharedData_h
+
+#include "ofxXmlSettings.h"
+#include "ofxTuioClient.h"
+#include "ArsUITappedPoint.h"
+#include "ofxOsc.h"
+
+class ArsUISharedData
+{
+ public:
+ ofxXmlSettings config;
+ ofxTuioClient tuioClient;
+
+ vector<ArsUITappedPoint> tappedPoints;
+
+ string displayHost;
+ int displayPort;
+
+ string serverHost;
+ int serverPort;
+
+ int incomingPort;
+
+ int numRobots;
+ int camId1, camId2;
+
+ ofxOscSender oscSenderToDisplay;
+ ofxOscSender oscSenderToServer;
+ ofxOscReceiver oscReceiverFromServer;
+};
+
+#endif
View
10 src/ofxArsUITappedPoint.cpp → src/ArsUITappedPoint.cpp
@@ -6,10 +6,10 @@
//
//
-#include "ofxArsUITappedPoint.h"
+#include "ArsUITappedPoint.h"
#include "ofxEasingFunc.h"
-ofxArsUITappedPoint::ofxArsUITappedPoint(float _x, float _y, int tid)
+ArsUITappedPoint::ArsUITappedPoint(float _x, float _y, int tid)
{
x = _x;
y = _y;
@@ -20,7 +20,7 @@ ofxArsUITappedPoint::ofxArsUITappedPoint(float _x, float _y, int tid)
tapid = tid;
}
-void ofxArsUITappedPoint::update()
+void ArsUITappedPoint::update()
{
float v = ofxEasingFunc::Circ::easeOut((float)tcnt / cntmax);
//cout << " v " << v;
@@ -29,7 +29,7 @@ void ofxArsUITappedPoint::update()
tcnt++;
}
-void ofxArsUITappedPoint::draw()
+void ArsUITappedPoint::draw()
{
ofSetColor(51, 205, 255, alpha);
//cout<< " alpha " << alpha << " radius " << radius ;
@@ -37,7 +37,7 @@ void ofxArsUITappedPoint::draw()
ofSetColor(255, 255, 255, 255);
}
-bool ofxArsUITappedPoint::alive()
+bool ArsUITappedPoint::alive()
{
return tcnt <= cntmax ;
View
17 src/ArsUITappedPoint.h
@@ -0,0 +1,17 @@
+#include "ofMain.h"
+
+
+class ArsUITappedPoint
+{
+ private:
+ float x, y, radius;
+ float alpha;
+ int tcnt,cntmax;
+ int tapid;
+
+ public:
+ ArsUITappedPoint(float _x, float _y, int tid);
+ void draw();
+ void update();
+ bool alive();
+};
View
290 src/MapControlState.cpp
@@ -0,0 +1,290 @@
+//
+// MapControlState.cpp
+// arsUI
+//
+// Created by Circuit Lab. Mac mini on 3/12/13.
+//
+//
+
+#include "MapControlState.h"
+
+//--------------------------------------------------------------
+MapControlState::MapControlState()
+{
+ init();
+}
+
+//--------------------------------------------------------------
+MapControlState::~MapControlState()
+{
+
+}
+
+//--------------------------------------------------------------
+void MapControlState::init()
+{
+
+}
+
+//--------------------------------------------------------------
+void MapControlState::stateEnter()
+{
+ fujiPoint.set(964, 600);
+
+ for (int i = 0; i < 10; ++i) {
+ buttons.push_back(ArsUIButton(ofRandom(ofGetWidth()), ofRandom(ofGetHeight() - 100), i, fujiPoint, ofRandom(20, 60)));
+ }
+
+ for (int i = 10; i < (10 + getSharedData().numRobots); ++i) {
+ robos.push_back(ArsUIRoboCam(ofRandom(ofGetWidth()), ofRandom(ofGetHeight() - 100), i, fujiPoint, ofRandom(20, 60)));
+ }
+
+ fujiMap.loadImage("map.png");
+
+ eye[0] = -1;
+ eye[1] = -1;
+ selectedMode = 0;
+
+ ofAddListener(getSharedData().tuioClient.cursorAdded, this, &MapControlState::tuioAdded);
+ ofAddListener(getSharedData().tuioClient.cursorRemoved, this, &MapControlState::tuioRemoved);
+ ofAddListener(getSharedData().tuioClient.cursorUpdated, this, &MapControlState::tuioUpdated);
+ ofAddListener(getSharedData().oscReceiverFromServer.onMessageReceived, this, &MapControlState::onOscMessageReceived);
+}
+
+//--------------------------------------------------------------
+void MapControlState::stateExit()
+{
+ buttons.clear();
+ robos.clear();
+ fujiMap.clear();
+
+ ofRemoveListener(getSharedData().tuioClient.cursorAdded, this, &MapControlState::tuioAdded);
+ ofRemoveListener(getSharedData().tuioClient.cursorRemoved, this, &MapControlState::tuioRemoved);
+ ofRemoveListener(getSharedData().tuioClient.cursorUpdated, this, &MapControlState::tuioUpdated);
+ ofRemoveListener(getSharedData().oscReceiverFromServer.onMessageReceived, this, &MapControlState::onOscMessageReceived);
+}
+
+//--------------------------------------------------------------
+void MapControlState::update()
+{
+ getSharedData().tuioClient.getMessage();
+
+ for (int i = 0; i < getSharedData().tappedPoints.size(); ++i) {
+ getSharedData().tappedPoints[i].update();
+
+ if (false == getSharedData().tappedPoints[i].alive()) {
+ vector<ArsUITappedPoint>::iterator it = getSharedData().tappedPoints.begin();
+ getSharedData().tappedPoints.erase(it + i);
+ }
+ }
+
+ for (int i = 0; i < buttons.size(); ++i) {
+ buttons[i].update();
+ }
+
+ for (int i = 0; i < robos.size(); ++i) {
+ robos[i].update();
+ }
+}
+
+//--------------------------------------------------------------
+void MapControlState::draw()
+{
+ // tuioClient.drawCursors();
+ //drawUpdated();
+
+ ofSetColor(255, 255, 255, 180);
+ fujiMap.draw(-350, -10, 1920 * 1.4 , 907 * 1.4);
+
+ // ofCircle(fujiPoint, 1);
+
+ ofSetColor(255, 255, 255, 255);
+
+ for (int i = 0; i < getSharedData().tappedPoints.size(); ++i){
+ getSharedData().tappedPoints[i].draw();
+ }
+
+ for (int i = 0; i<buttons.size(); ++i) {
+ buttons[i].draw();
+ }
+
+ for (int i = 0; i < robos.size(); ++i) {
+ robos[i].draw();
+ }
+}
+
+//--------------------------------------------------------------
+string MapControlState::getName()
+{
+ return "map";
+}
+
+//--------------------------------------------------------------
+void MapControlState::setEye(int bid)
+{
+ int oldMode = eye[selectedMode];
+
+ if (-1 != oldMode) {
+ for (int i = 0; i < buttons.size(); ++i) {
+ if(buttons[i].getId() == oldMode){
+ buttons[i].setStatus(0);
+ }
+ }
+
+ for (int i = 0; i < robos.size(); ++i) {
+ if(robos[i].getId() == oldMode){
+ robos[i].setStatus(0);
+ }
+ }
+ }
+
+ eye[selectedMode] = bid;
+
+ selectedMode = !selectedMode ? 1 : 0;
+}
+
+//--------------------------------------------------------------
+void MapControlState::tuioAdded(ofxTuioCursor &tuioCursor)
+{
+ ofPoint loc = ofPoint(tuioCursor.getX() * ofGetWidth(), tuioCursor.getY() * ofGetHeight());
+
+ ArsUITappedPoint tappedPoint(loc.x, loc.y, tuioCursor.getFingerId());
+ getSharedData().tappedPoints.push_back(tappedPoint);
+
+ for (int i = 0; i < buttons.size(); ++i) {
+ int bid = buttons[i].tapped(loc.x, loc.y);
+
+ if (0 <= bid && bid != eye[0] && bid != eye[1]){
+ setEye(bid);
+ buttons[i].setStatus(1);
+ sendOSCToDisplay(bid);
+ }
+ }
+
+ for (int i = 0; i < robos.size(); ++i) {
+ int bid = robos[i].tapped(loc.x, loc.y);
+
+ if (0 <= bid && bid != eye[0] && bid != eye[1]){
+ setEye(bid);
+ robos[i].setStatus(1);
+ sendOSCToDisplay(bid);
+ }
+ }
+
+ // cout << "Point n" << tuioCursor.getSessionId() << " add at " << loc << endl;
+}
+
+//--------------------------------------------------------------
+void MapControlState::tuioRemoved(ofxTuioCursor &tuioCursor)
+{
+ ofPoint loc = ofPoint(tuioCursor.getX() * ofGetWidth(), tuioCursor.getY() * ofGetHeight());
+ //cout << "Point n" << tuioCursor.getSessionId() << " remove at " << loc << endl;
+}
+
+//--------------------------------------------------------------
+void MapControlState::tuioUpdated(ofxTuioCursor &tuioCursor)
+{
+ ofPoint loc = ofPoint(tuioCursor.getX() * ofGetWidth(), tuioCursor.getY() * ofGetHeight());
+ //cout << "Point n" << tuioCursor.getSessionId() << " updated at " << loc << endl;
+
+ for (int i = 0; i < robos.size(); ++i) {
+ robos[i].dragAngle(loc.x, loc.y);
+ }
+}
+
+//--------------------------------------------------------------
+void MapControlState::drawTuioCursors()
+{
+ list<ofxTuioCursor*> cursorList = getSharedData().tuioClient.getTuioCursors();
+
+ if (0 < cursorList.size()) {
+ list<ofxTuioCursor*>::iterator tcursor;
+
+ for (tcursor = cursorList.begin(); tcursor != cursorList.end(); ++tcursor) {
+ ofxTuioCursor *cursor = (*tcursor);
+ float x = (*cursor).getX() * ofGetWidth();
+ float y = (*cursor).getY() * ofGetHeight();
+ // cout << "x" << (*cursor).getXSpeed() <<" ";
+ // ofSetColor(100,100, (*cursor).getFingerId() ,127);
+
+ ofSetColor(55, 55, 55, 100);
+ ofCircle(x, y, 5 - (*cursor).getXSpeed() * ofGetWidth() * 5 + 5 - (*cursor).getYSpeed() * ofGetWidth() * 5);
+ }
+ }
+}
+
+//--------------------------------------------------------------
+void MapControlState::onOscMessageReceived(ofxOscMessage &msg)
+{
+ string addr = msg.getAddress();
+
+ if ("/gianteyes/camera" == addr) {
+ int udid = msg.getArgAsInt32(0);
+ float lat = msg.getArgAsFloat(1);
+ float lon = msg.getArgAsFloat(2);
+ float compass = msg.getArgAsFloat(3);
+ int angle = msg.getArgAsInt32(4);
+ int battery = msg.getArgAsInt32(5);
+ int operable = msg.getArgAsInt32(6);
+ int living = msg.getArgAsInt32(7);
+ } else if ("/gianteyes/photo" == addr) {
+ int udid = msg.getArgAsInt32(0);
+ string url = msg.getArgAsString(1);
+ float correction = msg.getArgAsFloat(2);
+ float lat = msg.getArgAsFloat(3);
+ float lon = msg.getArgAsFloat(4);
+ float compass = msg.getArgAsFloat(5);
+ int angle = msg.getArgAsInt32(6);
+
+ getPictureFromURL(url);
+ } else if ("/gianteyes/cameras" == addr) {
+ string jsonString = msg.getArgAsString(0);
+
+ if (0 < jsonString.length()) {
+ json.parse(jsonString);
+ }
+ }
+}
+
+//--------------------------------------------------------------
+void MapControlState::getPictureFromURL(string url)
+{
+
+}
+
+//--------------------------------------------------------------
+void MapControlState::sendViewpointToServer(int camId, int compass, int angle)
+{
+ ofxOscMessage msg;
+ msg.setAddress("/gianteyes/viewpoint");
+ msg.addIntArg(camId);
+ msg.addIntArg(compass);
+ msg.addIntArg(angle);
+ getSharedData().oscSenderToServer.sendMessage(msg);
+}
+
+//--------------------------------------------------------------
+void MapControlState::sendTakeTriggerToServer(int camId)
+{
+ ofxOscMessage msg;
+ msg.setAddress("/gianteyes/take");
+ msg.addIntArg(camId);
+ getSharedData().oscSenderToServer.sendMessage(msg);
+}
+
+//--------------------------------------------------------------
+void MapControlState::sendOSCToDisplay(int bid)
+{
+ ofxOscMessage msg;
+
+ if (1 == selectedMode) {
+ msg.setAddress("/right/image");
+ msg.addStringArg("right file address");
+ } else if (0 == selectedMode) {
+ msg.setAddress("/left/image");
+ msg.addStringArg("left file address");
+ }
+
+ msg.addIntArg(bid);
+ getSharedData().oscSenderToDisplay.sendMessage(msg);
+}
View
61 src/MapControlState.h
@@ -0,0 +1,61 @@
+//
+// MapControlState.h
+// arsUI
+//
+// Created by Circuit Lab. Mac mini on 3/12/13.
+//
+//
+
+#ifndef arsUI_MapControlState_h
+#define arsUI_MapControlState_h
+
+#include "ofxState.h"
+#include "ofxXmlSettings.h"
+#include "ArsUISharedData.h"
+#include "ofxTween.h"
+#include "ArsUIRoboCam.h"
+#include "ofxJSONElement.h"
+
+class MapControlState : public Apex::ofxState<ArsUISharedData>
+{
+ public:
+ MapControlState();
+ ~MapControlState();
+
+ void stateEnter();
+ void stateExit();
+ void update();
+ void draw();
+ string getName();
+
+ private:
+ void init();
+
+ vector <ArsUIButton> buttons; // web camera
+ vector <ArsUIRoboCam> robos; // robot
+
+ void tuioAdded(ofxTuioCursor & tuioCursor);
+ void tuioRemoved(ofxTuioCursor & tuioCursor);
+ void tuioUpdated(ofxTuioCursor & tuioCursor);
+ void drawTuioCursors();
+
+ void onOscMessageReceived(ofxOscMessage &msg);
+
+ void sendViewpointToServer(int camId, int compass, int angle);
+ void sendTakeTriggerToServer(int camId);
+ void sendOSCToDisplay(int bid);
+
+ ofImage fujiMap;
+ ofPoint fujiPoint;
+
+ int eye[2]; //0:right 1:left
+ int selectedMode;//0:select right eye, 1:select left eye
+ void setEye(int bid);
+
+ ofxJSONElement json;
+
+ string rightImageFile, leftImageFile;
+ void getPictureFromURL(string url);
+};
+
+#endif
View
61 src/TitleState.cpp
@@ -0,0 +1,61 @@
+//
+// TitleState.cpp
+// arsUI
+//
+// Created by Circuit Lab. Mac mini on 3/12/13.
+//
+//
+
+#include "TitleState.h"
+
+//--------------------------------------------------------------
+TitleState::TitleState()
+{
+ init();
+}
+
+//--------------------------------------------------------------
+TitleState::~TitleState()
+{
+
+}
+
+//--------------------------------------------------------------
+void TitleState::init()
+{
+
+}
+
+//--------------------------------------------------------------
+void TitleState::stateEnter()
+{
+ cout << "incoming port: " << getSharedData().incomingPort << endl;
+ ofxOscMessage msg;
+ msg.setAddress("/gianteyes/hello");
+ msg.addIntArg(getSharedData().incomingPort);
+ getSharedData().oscSenderToServer.sendMessage(msg);
+}
+
+//--------------------------------------------------------------
+void TitleState::stateExit()
+{
+
+}
+
+//--------------------------------------------------------------
+void TitleState::update()
+{
+
+}
+
+//--------------------------------------------------------------
+void TitleState::draw()
+{
+
+}
+
+//--------------------------------------------------------------
+string TitleState::getName()
+{
+ return "title";
+}
View
34 src/TitleState.h
@@ -0,0 +1,34 @@
+//
+// TitleState.h
+// arsUI
+//
+// Created by Circuit Lab. Mac mini on 3/12/13.
+//
+//
+
+#ifndef arsUI_TitleState_h
+#define arsUI_TitleState_h
+
+#include "ofxState.h"
+#include "ofxXmlSettings.h"
+#include "ArsUISharedData.h"
+#include "ofxOsc.h"
+
+class TitleState : public Apex::ofxState<ArsUISharedData>
+{
+public:
+ TitleState();
+ ~TitleState();
+
+ void stateEnter();
+ void stateExit();
+ void update();
+ void draw();
+ string getName();
+
+private:
+ void init();
+
+};
+
+#endif
View
30 src/ofxArsUIButton.h
@@ -1,30 +0,0 @@
-#include "ofMain.h"
-
-
-class ofxArsUIButton
-{
-protected:
- int status,bcnt,speed,tcnt; //status 0: not selected, 1:selected, 2: broken
- ofImage mark,markShadow;
- float x,y,radius;
- int bid;
- ofPoint fuji;
- double directionToFuji; //radian
- double currentDirection;
- double calcDirection(ofPoint *_p1, ofPoint *_p2);
- double viewAngle;
- double latitude;
- double longtitude;
-
-public:
- ofxArsUIButton(float _x, float _y, int _bid, ofPoint _fuji, float _angle );
- virtual void draw();
- virtual void update();
- virtual int tapped(float _x, float _y);
- void setAngle(float _angle);
- void setStatus(int _status);
- int getStatus();
- int getId();
- void setCameraStatus(double _lat, double _lon);
- ofPoint GPStoXY(double _lat,double _lon);
-};
View
17 src/ofxArsUITappedPoint.h
@@ -1,17 +0,0 @@
-#include "ofMain.h"
-
-
-class ofxArsUITappedPoint
-{
-private:
- float x, y, radius;
- float alpha;
- int tcnt,cntmax;
- int tapid;
-
-public:
- ofxArsUITappedPoint(float _x, float _y, int tid);
- void draw();
- void update();
- bool alive();
-};
View
270 src/testApp.cpp
@@ -1,4 +1,22 @@
#include "testApp.h"
+#include "TitleState.h"
+#include "MapControlState.h"
+
+//--------------------------------------------------------------
+void testApp::initOSC()
+{
+ stateMachine.getSharedData().oscSenderToDisplay.setup(DISPLAY_HOST, DISPLAY_PORT);
+ stateMachine.getSharedData().oscReceiverFromServer.setup(INCOMING_PORT);
+ stateMachine.getSharedData().oscSenderToServer.setup(SERVER_HOST, SERVER_PORT);
+}
+
+//--------------------------------------------------------------
+void testApp::initState()
+{
+ stateMachine.addState(new TitleState());
+ stateMachine.addState(new MapControlState());
+ stateMachine.changeState("map");
+}
//--------------------------------------------------------------
void testApp::setup()
@@ -13,263 +31,33 @@ void testApp::setup()
ofHideCursor();
#endif
- ofAddListener(tuioClient.cursorAdded, this, &testApp::tuioAdded);
- ofAddListener(tuioClient.cursorRemoved, this, &testApp::tuioRemoved);
- ofAddListener(tuioClient.cursorUpdated, this, &testApp::tuioUpdated);
-
- tuioClient.start(3333);
- oscSenderToDisplay.setup(DISPLAY_HOST, DISPLAY_PORT);
+ stateMachine.getSharedData().displayHost = DISPLAY_HOST;
+ stateMachine.getSharedData().displayPort = DISPLAY_PORT;
+ stateMachine.getSharedData().serverHost = SERVER_HOST;
+ stateMachine.getSharedData().serverPort = SERVER_PORT;
+ stateMachine.getSharedData().incomingPort = INCOMING_PORT;
+ stateMachine.getSharedData().numRobots = NUM_ROBOTS;
+ stateMachine.getSharedData().camId1 = CAM_ID_1;
+ stateMachine.getSharedData().camId2 = CAM_ID_2;
- oscReceiverFromServer.setup(INCOMING_PORT);
- ofAddListener(oscReceiverFromServer.onMessageReceived, this, &testApp::onOscMessageReceived);
-
- fujiPoint.set(964, 600);
-
- for (int i = 0; i < 10; ++i) {
- buttons.push_back(ofxArsUIButton(ofRandom(ofGetWidth()), ofRandom(ofGetHeight() - 100), i, fujiPoint, ofRandom(20, 60)));
- }
+ stateMachine.getSharedData().tuioClient.start(3333);
- for (int i = 10; i < (10 + NUM_ROBOTS); ++i) {
- robos.push_back(ofxArsUIRoboCam(ofRandom(ofGetWidth()), ofRandom(ofGetHeight() - 100), i, fujiPoint, ofRandom(20, 60)));
- }
-
- fujiMap.loadImage("map.png");
-
- eye[0] = -1;
- eye[1] = -1;
- selectMode = 0;
-
- oscSenderToServer.setup(SERVER_HOST, SERVER_PORT);
- sendInitToServer();
+ initOSC();
+ initState();
}
//--------------------------------------------------------------
void testApp::update()
{
- tuioClient.getMessage();
-
- for (int i = 0; i < taps.size(); ++i) {
- taps[i].update();
-
- if (false == taps[i].alive()) {
- vector<ofxArsUITappedPoint>::iterator it = taps.begin();
- taps.erase(it + i);
- }
- }
-
- for (int i = 0; i < buttons.size(); ++i) {
- buttons[i].update();
- }
-
- for (int i = 0; i < robos.size(); ++i) {
- robos[i].update();
- }
}
//--------------------------------------------------------------
void testApp::draw()
{
- // tuioClient.drawCursors();
- //drawUpdated();
-
- ofSetColor(255, 255, 255, 180);
- fujiMap.draw(-350, -10, 1920 * 1.4 , 907 * 1.4);
-
- // ofCircle(fujiPoint, 1);
-
- ofSetColor(255, 255, 255, 255);
-
- for (int i = 0; i < taps.size(); ++i){
- taps[i].draw();
- }
-
- for (int i = 0; i<buttons.size(); ++i) {
- buttons[i].draw();
- }
-
- for (int i = 0; i < robos.size(); ++i) {
- robos[i].draw();
- }
-}
-
-//multi touch test
-void testApp::drawUpdated()
-{
- list<ofxTuioCursor*> cursorList = tuioClient.getTuioCursors();
- if (0 < cursorList.size()) {
- list<ofxTuioCursor*>::iterator tcursor;
-
- for (tcursor = cursorList.begin(); tcursor != cursorList.end(); ++tcursor) {
- ofxTuioCursor *cursor = (*tcursor);
- float x = (*cursor).getX() * ofGetWidth();
- float y = (*cursor).getY() * ofGetHeight();
- // cout << "x" << (*cursor).getXSpeed() <<" ";
- // ofSetColor(100,100, (*cursor).getFingerId() ,127);
-
- ofSetColor(55, 55, 55, 100);
- ofCircle(x, y, 5 - (*cursor).getXSpeed() * ofGetWidth() * 5 + 5 - (*cursor).getYSpeed() * ofGetWidth() * 5);
- }
- }
}
-void testApp::tuioAdded(ofxTuioCursor &tuioCursor)
-{
- ofPoint loc = ofPoint(tuioCursor.getX() * ofGetWidth(), tuioCursor.getY() * ofGetHeight());
-
- class ofxArsUITappedPoint tap(loc.x, loc.y, tuioCursor.getFingerId());
- taps.push_back(tap);
-
- for (int i = 0; i < buttons.size(); ++i) {
- int bid = buttons[i].tapped(loc.x, loc.y);
-
- if (0 <= bid && bid != eye[0] && bid != eye[1]){
- setEye(bid);
- buttons[i].setStatus(1);
- sendOSCToDisplay(bid);
- }
- }
-
- for (int i = 0; i < robos.size(); ++i) {
- int bid = robos[i].tapped(loc.x, loc.y);
-
- if (0 <= bid && bid != eye[0] && bid != eye[1]){
- setEye(bid);
- robos[i].setStatus(1);
- sendOSCToDisplay(bid);
- }
- }
-
-// cout << "Point n" << tuioCursor.getSessionId() << " add at " << loc << endl;
-}
-
-void testApp::tuioUpdated(ofxTuioCursor &tuioCursor)
-{
- ofPoint loc = ofPoint(tuioCursor.getX() * ofGetWidth(), tuioCursor.getY() * ofGetHeight());
- //cout << "Point n" << tuioCursor.getSessionId() << " updated at " << loc << endl;
-
- for (int i = 0; i < robos.size(); ++i) {
- robos[i].dragAngle(loc.x, loc.y);
- }
-}
-
-void testApp::tuioRemoved(ofxTuioCursor &tuioCursor)
-{
- ofPoint loc = ofPoint(tuioCursor.getX() * ofGetWidth(), tuioCursor.getY() * ofGetHeight());
- //cout << "Point n" << tuioCursor.getSessionId() << " remove at " << loc << endl;
-}
-
-void testApp::setEye(int _bid)
-{
- int oldMode = eye[selectMode];
-
- if (-1 != oldMode) {
- for (int i = 0; i < buttons.size(); ++i) {
- if(buttons[i].getId() == oldMode){
- buttons[i].setStatus(0);
- }
- }
-
- for (int i = 0; i < robos.size(); ++i) {
- if(robos[i].getId() == oldMode){
- robos[i].setStatus(0);
- }
- }
- }
-
- eye[selectMode] = _bid;
-
- selectMode = !selectMode ? 1 : 0;
-}
-
-//--------------------------------------------------------------
-void testApp::getPictureFromURL(string url)
-{
-
-}
-
-//--------------------------------------------------------------
-void testApp::sendInitToServer()
-{
- ofxOscMessage msg;
- msg.setAddress("/gianteyes/hello");
- msg.addIntArg(INCOMING_PORT);
- oscSenderToServer.sendMessage(msg);
-}
-
-//--------------------------------------------------------------
-void testApp::sendViewpointToServer(int camId, int compass, int angle)
-{
- ofxOscMessage msg;
- msg.setAddress("/gianteyes/viewpoint");
- msg.addIntArg(camId);
- msg.addIntArg(compass);
- msg.addIntArg(angle);
- oscSenderToServer.sendMessage(msg);
-}
-
-//--------------------------------------------------------------
-void testApp::sendTakeTriggerToServer(int camId)
-{
- ofxOscMessage msg;
- msg.setAddress("/gianteyes/take");
- msg.addIntArg(camId);
- oscSenderToServer.sendMessage(msg);
-}
-
-//--------------------------------------------------------------
-void testApp::sendOSCToDisplay(int _bid)
-{
- ofxOscMessage msg;
-
- if (1 == selectMode) {
- msg.setAddress("/right/image");
- msg.addStringArg("right file address");
- } else if (0 == selectMode) {
- msg.setAddress("/left/image");
- msg.addStringArg("left file address");
- }
-
- msg.addIntArg(_bid);
- oscSenderToDisplay.sendMessage(msg);
-}
-
-//--------------------------------------------------------------
-void testApp::onOscMessageReceived(ofxOscMessage &msg)
-{
- string addr = msg.getAddress();
-
- if ("/gianteyes/camera" == addr) {
- int udid = msg.getArgAsInt32(0);
- float lat = msg.getArgAsFloat(1);
- float lon = msg.getArgAsFloat(2);
- float compass = msg.getArgAsFloat(3);
- int angle = msg.getArgAsInt32(4);
- int battery = msg.getArgAsInt32(5);
- int operable = msg.getArgAsInt32(6);
- int living = msg.getArgAsInt32(7);
- } else if ("/gianteyes/photo" == addr) {
- int udid = msg.getArgAsInt32(0);
- string url = msg.getArgAsString(1);
- float correction = msg.getArgAsFloat(2);
- float lat = msg.getArgAsFloat(3);
- float lon = msg.getArgAsFloat(4);
- float compass = msg.getArgAsFloat(5);
- int angle = msg.getArgAsInt32(6);
-
- getPictureFromURL(url);
- } else if ("/gianteyes/cameras" == addr) {
- string jsonString = msg.getArgAsString(0);
-
- if (0 < jsonString.length()) {
- json.parse(jsonString);
- }
- }
-}
-
-
-
//--------------------------------------------------------------
void testApp::keyPressed(int key){
View
51 src/testApp.h
@@ -2,22 +2,21 @@
#include "ofMain.h"
#include "ofxTuioClient.h"
-#include "ofxArsUITappedPoint.h"
-//#include "ofxArsUIButton.h"
-#include "ofxArsUIRoboCam.h"
+#include "ofxStateMachine.h"
+#include "ArsUISharedData.h"
#include "ofxJSONElement.h"
#define DISPLAY_HOST "127.0.0.1"
#define DISPLAY_PORT 4444
-#define SERVER_HOST "127.0.0.1"
-#define SERVER_PORT 5555
+#define SERVER_HOST "localhost"
+#define SERVER_PORT 7771
-#define INCOMING_PORT 6666
+#define INCOMING_PORT 5000
#define NUM_ROBOTS 2
-#define COM_ID_1 0
-#define COM_ID_2 1
+#define CAM_ID_1 0
+#define CAM_ID_2 1
// uncomment if you use Full HD display
@@ -39,38 +38,8 @@ class testApp : public ofBaseApp
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
+ void initOSC();
+ void initState();
- void tuioAdded(ofxTuioCursor & tuioCursor);
- void tuioRemoved(ofxTuioCursor & tuioCursor);
- void tuioUpdated(ofxTuioCursor & tuioCursor);
- void drawUpdated();
-
- ofxTuioClient tuioClient;
- vector <ofxArsUITappedPoint> taps; // tap expression
- vector <ofxArsUIButton> buttons; // web camera
- vector <ofxArsUIRoboCam> robos; // robot
-
- ofImage fujiMap;
- ofPoint fujiPoint;
-
- int eye[2]; //0:right 1:left
- int selectMode;//0:select right eye, 1:select left eye
- void setEye(int _bid);
-
- ofxOscSender oscSenderToDisplay;
- ofxOscSender oscSenderToServer;
- ofxOscReceiver oscReceiverFromServer;
-
- void onOscMessageReceived(ofxOscMessage &msg);
-
- void sendInitToServer();
- void sendViewpointToServer(int camId, int compass, int angle);
- void sendTakeTriggerToServer(int camId);
- void sendOSCToDisplay(int _bid);
-
-
- string rightImageFile, leftImageFile;
- void getPictureFromURL(string url);
-
- ofxJSONElement json;
+ Apex::ofxStateMachine<ArsUISharedData> stateMachine;
};
Please sign in to comment.
Something went wrong with that request. Please try again.