2014-09-15 2 views
1

Metaio 웹 사이트 - 새 AR 응용 프로그램 만들기에 대한 자습서를 수행 중이며 작동하는 것처럼 보입니다 (Metaio 시작 화면이 표시되고 카메라보기에 워터 마크가 표시됨Metaio SDK - 새 AR 응용 프로그램 만들기

Metaio SDK에서 직접 복사 한 코드를 사용하여 Hello World 튜토리얼을 얻으려고하지만 모델을 래킹 이미지 위에 표시 할 수 없습니다. .?

구현 파일의 코드는 다음과 같습니다 - 내가이 아이 패드에서 실행하면 오류를 받고 없습니다, 등 카메라 뷰를 얻을 수 있지만 3D 모델입니다 - 어떤 제안을 들으 :

#import "ViewController.h" 
@interface ViewController() 
@end 

@implementation ViewController 
- (void) viewDidLoad 
{ 
    [super viewDidLoad]; 
    // load our tracking configuration 
    NSString* trackingDataFile = [[NSBundle mainBundle] pathForResource:@"TrackingData_MarkerlessFast" 
                   ofType:@"xml" 
                  inDirectory:@"Assets"]; 

    if(trackingDataFile) 
    { 
     bool success = m_metaioSDK->setTrackingConfiguration([trackingDataFile UTF8String]); 
     if(!success) 
      NSLog(@"No success loading the tracking configuration"); 
      } 

    // load content 
    NSString* metaioManModel = [[NSBundle mainBundle] pathForResource:@"metaioman" 
                   ofType:@"md2" 
                  inDirectory:@"Assets"]; 

    if(metaioManModel) 
    { 
     metaio::IGeometry* theLoadedModel = m_metaioSDK->createGeometry([metaioManModel UTF8String]); 
     if(theLoadedModel) 
     { 
      // scale it a bit up 
      theLoadedModel->setScale(metaio::Vector3d(1.0,1.0,1.0)); 
     } 
     else 
     { 
      NSLog(@"error, could not load %@", metaioManModel); 
     } 
    } 
} 
@end 

답변

0

assets 폴더에있는 xml 추적 파일을 사용 했습니까? 내가보기로 , 그것은 몇 가지 오류에서 올 수 : 이
- 추적 이미지가 xml 파일과 폴더에 같은 이름이없는 것은
- 추적 파일이 비어 있거나 오류


을 포함 어쩌면 당신은 xml 추적 파일을 공유 할 수 있으므로 우리가 더 많이 당신을 도울 수 있습니다.

행운을 빌어 요.