Created
May 31, 2011 22:40
-
-
Save pmark/1001434 to your computer and use it in GitHub Desktop.
How to create a 3DAR POI with a 3D mesh OBJ view (requires v0.9.6+)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) add3dObjectNortheastOfUserLocation | |
{ | |
SM3DARTexturedGeometryView *modelView = [[[SM3DARTexturedGeometryView alloc] initWithOBJ:@"star.obj" textureNamed:nil] autorelease]; | |
CLLocationDegrees latitude = mapView.sm3dar.userLocation.coordinate.latitude + 0.0001; | |
CLLocationDegrees longitude = mapView.sm3dar.userLocation.coordinate.longitude + 0.0001; | |
// Add a point with a 3D view to the 3DAR scene. | |
SM3DARPoint *poi = [[mapView.sm3dar addPointAtLatitude:latitude | |
longitude:longitude | |
altitude:0 | |
title:nil | |
view:modelView] autorelease]; | |
// (OPTIONAL) Add a map annotation for this point. | |
[mapView addAnnotation:(SM3DARPointOfInterest*)poi]; | |
} |
Hi hitlad. Did you get your question answered? 3DAR v2.1.3 crashes when loading an OBJ file. We've fixed the bug for v2.2 but it's not released yet.
Hi, pmark. No, I didn't get any answers to my question. Any idea when v2.2 may be released? I've started to look at other systems but would like to stick with 3DAR if v2.2 is coming soon. Thanks!
Hi, pmark. Just saw that v2.2 came out. I tried it out and it's working - thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm getting an error (Can't find dlopen function) on the SM3DARTexturedGeometryView initialization line when I added this code to the YOrient project. Is there something I'm missing? Thanks!