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
#	example-planes/src/ofApp.mm
#	src/ARAnchorManager.mm
  • Loading branch information
Joseph Chow committed Sep 17, 2017
2 parents fd2df53 + 3c4ad4e commit 4a6ef32
Show file tree
Hide file tree
Showing 177 changed files with 11,939 additions and 102 deletions.
2,473 changes: 2,473 additions & 0 deletions Doxyfile

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>example-basic.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
5 changes: 3 additions & 2 deletions example-anchormanager/src/ofApp.mm
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ ofMatrix4x4 matFromSimd(const simd::float4x4 &matrix){

ofSetColor(255);
ofRotate(90,0,0,1);
ofScale(0.0001, 0.0001);
img.draw(0,0);

float aspect = ARCommon::getNativeAspectRatio();
img.draw(-aspect/8,-0.125,aspect/4,0.25);

ofPopMatrix();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ - (void)loadView {
//self.session.delegate = self;

// TODO should be ARWorldTrackingConfiguration now but not in current API(might need to re-download sdk)
ARWorldTrackingSessionConfiguration *configuration = [ARWorldTrackingSessionConfiguration new];
ARWorldTrackingConfiguration *configuration = [ARWorldTrackingConfiguration new];

// setup horizontal plane detection
configuration.planeDetection = ARPlaneDetectionHorizontal;
Expand Down
4 changes: 3 additions & 1 deletion example-basic/example-basic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
B02A0FBF1F49D2D1002A69F3 /* ARDebugUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ARDebugUtils.h; path = ../src/ARDebugUtils.h; sourceTree = "<group>"; };
B07F9A3A1F561C650031FC25 /* ARCam.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ARCam.h; path = ../src/ARCam.h; sourceTree = "<group>"; };
B07F9A3B1F561C650031FC25 /* ARCam.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = ARCam.mm; path = ../src/ARCam.mm; sourceTree = "<group>"; };
B0B6C0251F6B744E00850C0E /* ARSessionSetup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ARSessionSetup.h; path = ../src/ARSessionSetup.h; sourceTree = "<group>"; };
BB16EBD10F2B2A9500518274 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
BB16EBD80F2B2AB500518274 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
BB24DDC910DA781C00E9C588 /* ofxiOS-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "ofxiOS-Info.plist"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -188,10 +189,11 @@
isa = PBXGroup;
children = (
B02A0FBA1F49D298002A69F3 /* ARAnchorManager.h */,
B02A0FB91F49D298002A69F3 /* ARAnchorManager.mm */,
B07F9A3A1F561C650031FC25 /* ARCam.h */,
B07F9A3B1F561C650031FC25 /* ARCam.mm */,
B0B6C0251F6B744E00850C0E /* ARSessionSetup.h */,
B02A0FBF1F49D2D1002A69F3 /* ARDebugUtils.h */,
B02A0FB91F49D298002A69F3 /* ARAnchorManager.mm */,
B02A0FBB1F49D298002A69F3 /* ARProcessor.h */,
B02A0FBC1F49D298002A69F3 /* ARProcessor.mm */,
B02A0FB71F49D298002A69F3 /* ARShaders.h */,
Expand Down
Binary file not shown.
7 changes: 5 additions & 2 deletions example-basic/src/ofApp.mm
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ ofMatrix4x4 matFromSimd(const simd::float4x4 &matrix){

ofSetColor(255);
ofRotate(90,0,0,1);
ofScale(0.0001, 0.0001);
img.draw(0,0);

float aspect = ARCommon::getNativeAspectRatio();
img.draw(-aspect/8,-0.125,aspect/4,0.25);


ofPopMatrix();
}
Expand Down Expand Up @@ -195,6 +197,7 @@ ofMatrix4x4 matFromSimd(const simd::float4x4 &matrix){

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

}

Expand Down
2 changes: 1 addition & 1 deletion example-basic/src/viewcontrollers/MyAppViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ - (void)loadView {
//self.session.delegate = self;

// TODO should be ARWorldTrackingConfiguration now but not in current API(might need to re-download sdk)
ARWorldTrackingSessionConfiguration *configuration = [ARWorldTrackingSessionConfiguration new];
ARWorldTrackingConfiguration *configuration = [ARWorldTrackingConfiguration new];

// setup horizontal plane detection
configuration.planeDetection = ARPlaneDetectionHorizontal;
Expand Down
2 changes: 2 additions & 0 deletions example-camera-correction/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# example-camera-correction

If you happen to own a larger device, such as an iPad, you may discover the camera image to be somewhat distorted. The ARCam class should automatically correct the distortion but this example demonstrates the function to call in the event that the correction attempt failed.

This project is really more a testing ground for exploring how best to correct the camera.
Binary file not shown.
7 changes: 5 additions & 2 deletions example-camera-correction/src/ofApp.mm
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ ofMatrix4x4 matFromSimd(const simd::float4x4 &matrix){

ofSetColor(255);
ofRotate(90,0,0,1);
ofScale(0.0001, 0.0001);
img.draw(0,0);

float aspect = ARCommon::getNativeAspectRatio();
img.draw(-aspect/8,-0.125,aspect/4,0.25);



ofPopMatrix();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ - (void)loadView {
//self.session.delegate = self;

// TODO should be ARWorldTrackingConfiguration now but not in current API(might need to re-download sdk)
ARWorldTrackingSessionConfiguration *configuration = [ARWorldTrackingSessionConfiguration new];
ARWorldTrackingConfiguration *configuration = [ARWorldTrackingConfiguration new];

// setup horizontal plane detection
configuration.planeDetection = ARPlaneDetectionHorizontal;
Expand Down
Binary file not shown.
2 changes: 2 additions & 0 deletions example-planes/src/ofApp.mm
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ ofMatrix4x4 matFromSimd(const simd::float4x4 &matrix){

processor->update();

processor->updatePlanes();

mats.clear();

}
Expand Down
2 changes: 1 addition & 1 deletion example-planes/src/viewcontrollers/MyAppViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ - (void)loadView {
//self.session.delegate = self;

// TODO should be ARWorldTrackingConfiguration now but not in current API(might need to re-download sdk)
ARWorldTrackingSessionConfiguration *configuration = [ARWorldTrackingSessionConfiguration new];
ARWorldTrackingConfiguration *configuration = [ARWorldTrackingConfiguration new];

// setup horizontal plane detection
configuration.planeDetection = ARPlaneDetectionHorizontal;
Expand Down
86 changes: 86 additions & 0 deletions html/_a_r_anchor_manager_8h_source.html

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions html/_a_r_cam_8h_source.html

Large diffs are not rendered by default.

84 changes: 84 additions & 0 deletions html/_a_r_debug_utils_8h_source.html

Large diffs are not rendered by default.

80 changes: 80 additions & 0 deletions html/_a_r_objects_8h_source.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ofxARKit: src/ARObjects.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">ofxARKit
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">ARObjects.h</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">// ARObjects.hpp</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">// Created by Joseph Chow on 8/25/17.</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#ifndef ARObjects_hpp</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#define ARObjects_hpp</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="preprocessor">#include &quot;ofMain.h&quot;</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="preprocessor">#include &lt;ARKit/ARKit.h&gt;</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_a_r_objects.html">ARObjects</a> {</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160; </div><div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="struct_a_r_objects_1_1_plane_anchor_object.html"> 17</a></span>&#160; <span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; ofVec3f position;</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; <span class="keywordtype">float</span> width;</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160; <span class="keywordtype">float</span> height;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160; ofMatrix4x4 transform;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; NSUUID * uuid;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160; ARPlaneAnchor * rawAnchor; </div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; }<a class="code" href="struct_a_r_objects_1_1_plane_anchor_object.html">PlaneAnchorObject</a>;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; </div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="struct_a_r_objects_1_1_a_r_object.html"> 27</a></span>&#160; <span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; <span class="comment">// a flag indicating whether or not this object was found by ARKit itself, or whether or not it was user added.</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="keywordtype">bool</span> systemAdded=<span class="keyword">false</span>;</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; <span class="comment">// mesh for drawing a 3d object</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; ofMesh mesh;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; </div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; <span class="comment">// model matrix to store anchor tranform info</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; ofMatrix4x4 modelMatrix;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="comment">// a reference to the anchor itself.</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; ARAnchor * rawAnchor;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; </div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; NSUUID * getUUID(){</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keywordflow">return</span> rawAnchor.identifier;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; }</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; }<a class="code" href="struct_a_r_objects_1_1_a_r_object.html">ARObject</a>;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; </div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="struct_a_r_objects_1_1_a_r_object.html">ARObject</a> buildARObject(ARAnchor * rawAnchor,ofMatrix4x4 modelMatrix,<span class="keywordtype">bool</span> systemAdded=<span class="keyword">false</span>){</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <a class="code" href="struct_a_r_objects_1_1_a_r_object.html">ARObject</a> obj;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; obj.rawAnchor = rawAnchor;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; obj.modelMatrix = modelMatrix;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; obj.systemAdded = systemAdded;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keywordflow">return</span> obj;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; }</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;};</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* ARObjects_hpp */</span><span class="preprocessor"></span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div><div class="ttc" id="namespace_a_r_objects_html"><div class="ttname"><a href="namespace_a_r_objects.html">ARObjects</a></div><div class="ttdef"><b>Definition:</b> ARObjects.h:14</div></div>
<div class="ttc" id="struct_a_r_objects_1_1_plane_anchor_object_html"><div class="ttname"><a href="struct_a_r_objects_1_1_plane_anchor_object.html">ARObjects::PlaneAnchorObject</a></div><div class="ttdoc">This defines the basic data structure of a Plane. </div><div class="ttdef"><b>Definition:</b> ARObjects.h:17</div></div>
<div class="ttc" id="struct_a_r_objects_1_1_a_r_object_html"><div class="ttname"><a href="struct_a_r_objects_1_1_a_r_object.html">ARObjects::ARObject</a></div><div class="ttdoc">The base class you can use to build your AR object. Provides a model matrix and a mesh for easy track...</div><div class="ttdef"><b>Definition:</b> ARObjects.h:27</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
104 changes: 104 additions & 0 deletions html/_a_r_processor_8h_source.html

Large diffs are not rendered by default.

Loading

0 comments on commit 4a6ef32

Please sign in to comment.