Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
# Conflicts:
#	example-planes/example-planes.xcodeproj/project.xcworkspace/xcuserdata/joschow1.xcuserdatad/UserInterfaceState.xcuserstate
  • Loading branch information
Joseph Chow committed Sep 25, 2017
2 parents 4a6ef32 + e986e3b commit bb48aef
Show file tree
Hide file tree
Showing 200 changed files with 8,339 additions and 2,076 deletions.
4 changes: 2 additions & 2 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ LOOKUP_CACHE_SIZE = 0
# normally produced when WARNINGS is set to YES.
# The default value is: NO.

EXTRACT_ALL = NO
EXTRACT_ALL = YES

# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
# be included in the documentation.
Expand All @@ -453,7 +453,7 @@ EXTRACT_PACKAGE = NO
# included in the documentation.
# The default value is: NO.

EXTRACT_STATIC = NO
EXTRACT_STATIC = YES

# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
# locally in source files will be included in the documentation. If set to NO,
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ __First__
__then__
* Download openFrameworks [here](http://openframeworks.cc/versions/v0.9.8/of_v0.9.8_ios_release.zip)
* clone this repo into your addons folder
* start a new project with the project generator.

If you've copied one of the example projects - you should be all set, but if you've created a new project with the project generator you'll also need to

__After you've opened up the project file__
* add the ARKit framework to your project

<img width="872" alt="screen shot 2017-09-02 at 2 25 32 pm" src="https://user-images.githubusercontent.com/308302/29998867-ac9d93a0-8fea-11e7-8059-06beba7a172f.png">
Expand All @@ -24,7 +24,7 @@ If you've copied one of the example projects - you should be all set, but if you
* set the project target for IOS 11
<img width="848" alt="screen shot 2017-09-02 at 2 25 22 pm" src="https://user-images.githubusercontent.com/308302/29998868-ac9e216c-8fea-11e7-95e2-7ff4fb218166.png">

Note that if you use the openFrameworks project generator you may have to repeat these steps if you make any changes to your project via the generator.
Note that you may have to repeat these steps if you make any changes to your project via the generator.

# Initializing ARKit
To initialize the ARKit framework
Expand Down Expand Up @@ -53,11 +53,6 @@ view controller and just initialize in ofApp.h/.mm
Lastly - include `ofxARKit.h`, this will give you access to all of the class files as well as the `ARProcessor` api class.
### Potential Hurdles in setup of ARKit
A strange occurance I've run into fairly often, and it's unclear as to why this happens; but it seems that, depending on where you initialize ARKit, that could potentially affect performance. It makes no sense I realize, but I have seen differences in where things get initialized. I have no idea why it happens or what the difference is but when it happens you may see a message like `...tracking performance reduced due to resource constraints...` or something to that effect.
In all likelhood it's due to hardware; I don't have access to the latest iPhones and iPads, but still just something to watch out for.
Fps seems to be minimally affected if at all, though of course, as the message suggests, tracking ability might not be as good. Just something to be on the lookout for.
# Current functionality
ARKit, while it does do a ton behind the scenes; it pretty much leaves it up to you to figure out how you want to render things. The current Apple documentation, while already moderately detailed, unfortunately leaves some stuff out.
Expand All @@ -77,6 +72,19 @@ There are the following classes/files that are part of the addon
Note that if you've used the addon pior to 8/29/2017, though I did my best to not make any api changes, there is a very tiny chance your code may break.
### Potential Hurdles in setup of ARKit
A strange occurance I've run into fairly often, and it's unclear as to why this happens; but it seems that, depending on where you initialize ARKit, that could potentially affect performance. It makes no sense I realize, but I have seen differences in where things get initialized. I have no idea why it happens or what the difference is but when it happens you may see a message like `...tracking performance reduced due to resource constraints...` or something to that effect.
In all likelhood it's due to hardware; I don't have access to the latest iPhones and iPads, but still just something to watch out for.
Fps seems to be minimally affected if at all, though of course, as the message suggests, tracking ability might not be as good. Just something to be on the lookout for.
If you see the message pop up, the ARKit api offers a limited function set to see what the reason might be in the degredation of tracking quality. You can log the current tracking status by
* calling `logTrackingState` in `ARProcessor` or `ARCam`. Will log to the console a basic string describing the status.
* you can also call `getTrackingState` in either class to get the raw tracking state from ARKit.
Note that in order for those functions to work, you'll need to call the `setup` function of either of those classes and pass in the boolean `true`
# Permissions
For ARKit - You'll have to enable the `Privacy - Camera Usage Description` in your `ofxiOS-Info.plist` file. The value for this field is just the string you want to show users when you ask for camera permissions. If you've never touched a plist file before, no worries! Its very easy to change.
Expand Down
Binary file not shown.
3 changes: 2 additions & 1 deletion example-anchormanager/src/ofApp.mm
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ ofMatrix4x4 matFromSimd(const simd::float4x4 &matrix){

//--------------------------------------------------------------
void ofApp::deviceOrientationChanged(int newOrientation){

processor->updateDeviceInterfaceOrientation();
processor->deviceOrientationChanged();
}


Expand Down
Binary file not shown.
6 changes: 4 additions & 2 deletions example-basic/ofxiOS-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>ARStuff</string>
<key>UIApplicationExitsOnSuspend</key>
<true/>
<key>UIStatusBarHidden</key>
Expand All @@ -45,10 +47,10 @@
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>NSCameraUsageDescription</key>
<string>ARStuff</string>
</dict>
</plist>
1 change: 1 addition & 0 deletions example-basic/src/ofApp.mm
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ ofMatrix4x4 matFromSimd(const simd::float4x4 &matrix){

//--------------------------------------------------------------
void ofApp::deviceOrientationChanged(int newOrientation){
processor->updateDeviceInterfaceOrientation();
processor->deviceOrientationChanged();

}
Expand Down
2 changes: 2 additions & 0 deletions example-basic/src/viewcontrollers/MyAppViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ - (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterf
BOOL bRotate = NO;
bRotate = bRotate || (toInterfaceOrientation == UIInterfaceOrientationPortrait);
bRotate = bRotate || (toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown);
bRotate = bRotate || (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft);
bRotate = bRotate || (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight);
return bRotate;
}

Expand Down
15 changes: 0 additions & 15 deletions example-camera-correction/Project.xcconfig

This file was deleted.

5 changes: 0 additions & 5 deletions example-camera-correction/README.md

This file was deleted.

1 change: 0 additions & 1 deletion example-camera-correction/addons.make

This file was deleted.

Binary file not shown.
Binary file removed example-camera-correction/bin/data/Default.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed example-camera-correction/bin/data/Default~ipad.png
Binary file not shown.
Binary file not shown.
Binary file removed example-camera-correction/bin/data/Icon-72.png
Binary file not shown.
Binary file not shown.
Binary file removed example-camera-correction/bin/data/Icon.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
42 changes: 0 additions & 42 deletions example-camera-correction/bin/data/shaders/camera.frag

This file was deleted.

14 changes: 0 additions & 14 deletions example-camera-correction/bin/data/shaders/camera.vert

This file was deleted.

Loading

0 comments on commit bb48aef

Please sign in to comment.