Skip to content

Commit

Permalink
Xcode example: fixed some absolute library linking path + fixed camer…
Browse files Browse the repository at this point in the history
…a parameters and marker file path.
  • Loading branch information
Mathieu Hingant committed Feb 11, 2016
1 parent ebc49e9 commit fa52be7
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 11 deletions.
4 changes: 2 additions & 2 deletions artool5example/artool5example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(SYSTEM_APPS_DIR)/OF/of_v0.9.0_osx_release/addons/ofxArtool5/libs/lib",
../../../addons/ofxArtool5/libs/lib,
);
OTHER_LDFLAGS = (
"$(OF_CORE_FRAMEWORKS)",
Expand Down Expand Up @@ -2246,7 +2246,7 @@
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(SYSTEM_APPS_DIR)/OF/of_v0.9.0_osx_release/addons/ofxArtool5/libs/lib",
../../../addons/ofxArtool5/libs/lib,
);
OTHER_LDFLAGS = (
"$(OF_CORE_FRAMEWORKS)",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "D4C0C828C70B5AEC6E9967448286309A24C47A86",
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {

},
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
"2DE9C8846D9375EAACFABA8963120E8E7719BAF5" : 0,
"D4C0C828C70B5AEC6E9967448286309A24C47A86" : 0
},
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "F8253D28-4E08-488E-90B6-30A250DA3FBD",
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
"2DE9C8846D9375EAACFABA8963120E8E7719BAF5" : "..",
"D4C0C828C70B5AEC6E9967448286309A24C47A86" : "ofxArtool5\/"
},
"DVTSourceControlWorkspaceBlueprintNameKey" : "artool5example",
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "artool5example\/artool5example.xcodeproj",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/openframeworks\/openFrameworks.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "2DE9C8846D9375EAACFABA8963120E8E7719BAF5"
},
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/naus3a\/ofxArtool5.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "D4C0C828C70B5AEC6E9967448286309A24C47A86"
}
]
}
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>SuppressBuildableAutocreation</key>
<dict>
<key>E4B69B5A0A3A1756003C02F2</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
6 changes: 4 additions & 2 deletions artool5example/src/ofApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ void ofApp::setup(){
ofBackground(0, 0, 0);
ofSetFrameRate(60);

cam.initGrabber(1280, 720);
art.setup(ofVec2f(1280,720), ofVec2f(1280,720));
ofVec2f camSize(1280, 720);

cam.initGrabber(camSize.x, camSize.y);
art.setup(camSize, camSize);
}

//--------------------------------------------------------------
Expand Down
10 changes: 3 additions & 7 deletions src/ofxARTPattern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ bool PatternTracker::setupCamera(string pthCamParam, ofVec2f _camSize, ofVec2f _
ARParam cParam;
AR_PIXEL_FORMAT pixFormat = ofxArtool5::toAR(pf);

const char * cPathCamParam = ofToDataPath(pthCamParam).c_str();

camSize=_camSize;
viewportSize=_viewportSize;

if(arParamLoad(cPathCamParam, 1, &cParam)){
ofLogError("ofxArtool5::setupCamera()", "error loading param file");
if(arParamLoad(ofToDataPath(pthCamParam).c_str(), 1, &cParam)){
ofLogError("ofxArtool5::setupCamera(), error loading param file");
return false;
}

Expand Down Expand Up @@ -110,14 +108,12 @@ bool PatternTracker::setupCamera(string pthCamParam, ofVec2f _camSize, ofVec2f _
}

bool PatternTracker::setupMarker(string pthMarker){
const char * cPthMarker = ofToDataPath(pthMarker).c_str();

if((gARPattHandle = arPattCreateHandle())==NULL){
ofLogError("ofxArtool5::setupMarker()","Error arPattCreateHandle");
return false;
}

if((pattId = arPattLoad(gARPattHandle, cPthMarker))<0){
if((pattId = arPattLoad(gARPattHandle, ofToDataPath(pthMarker).c_str()))<0){
ofLogError("ofxArtool5::setupMarker()","Error arPattLoad");
arPattDeleteHandle(gARPattHandle);
return false;
Expand Down

0 comments on commit fa52be7

Please sign in to comment.