Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# xcode noise
build/*
*.pbxuser
*.perspectivev3
*.mode1v3
*.mode2v3

Expand Down
22 changes: 22 additions & 0 deletions 3DAR/3dar.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?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>3darAutofocusPoi</key>
<true/>
<key>3darDrawGroundplaneGrid</key>
<true/>
<key>3darMapMode</key>
<string>auto</string>
<key>3darDisableLocationServices</key>
<false/>
<key>3darDisableGyro</key>
<false/>
<key>3darLookMode</key>
<string>free</string>
<key>3darEnableMap</key>
<false/>
<key>3darOverridePoiAltitude</key>
<false/>
</dict>
</plist>
Binary file added 3DAR/3dar_logo copy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 3DAR/3dar_logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 3DAR/3dar_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 3DAR/3dar_logo@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 3DAR/3dar_marker_icon1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 3DAR/3dar_marker_icon2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 3DAR/3dar_marker_icon3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 3DAR/3dar_marker_icon4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 3DAR/3dar_marker_icon5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 3DAR/3dar_marker_icon6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 3DAR/Icon_3dar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions 3DAR/MapAttackPlace3D.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//
// MapattackPlace3D.h
// GeoEvents
//
// Created by P. Mark Anderson on 4/22/11.
// Copyright 2011 Redwater software. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>
#import "SM3DAR.h"

@interface MapAttackPlace3D : SM3DAR_PointOfInterest
{
NSString *identifier;
NSString *team;
NSInteger points;
BOOL active;
// CLLocationCoordinate2D coordinate;
}

@property (nonatomic, retain) NSString *placeID;
@property (nonatomic, retain) NSString *team;
@property (nonatomic, assign) NSInteger points;
@property (nonatomic, assign) BOOL active;
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;

- (id) initWithProperties:(NSDictionary *)properties;

@end
137 changes: 137 additions & 0 deletions 3DAR/MapAttackPlace3D.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
//
// MapattackPlace3D.m
// GeoEvents
//
// Created by P. Mark Anderson on 4/22/11.
// Copyright 2011 Redwater software. All rights reserved.
//

#import "MapAttackPlace3D.h"
//#import "OBJView.h"

@implementation MapAttackPlace3D

@synthesize placeID;
@synthesize points;
@synthesize active;
@synthesize team;
@synthesize coordinate;

- (void) dealloc
{
[placeID release];
[team release];

[super dealloc];
}

- (id) initWithProperties:(NSDictionary *)props
{
CLLocationCoordinate2D c;
c.longitude = [[props objectForKey:@"longitude"] doubleValue];
c.latitude = [[props objectForKey:@"latitude"] doubleValue];

CLLocation *location = [[[CLLocation alloc] initWithLatitude:c.latitude
longitude:c.longitude] autorelease];

if (self = [super initWithLocation:location properties:props])
{
self.placeID = [props objectForKey:@"place_id"];
self.points = [[props objectForKey:@"points"] integerValue];

id value = [props objectForKey:@"team"];

if (value && value != [NSNull null])
self.team = value;
else
self.team = nil;

self.active = [[props objectForKey:@"active"] boolValue];
self.coordinate = c;

NSString *objName = @"flag_ufo.obj";
UIColor *objColor = nil;
CGFloat sizeScalar = 1.0;

if ([team length] > 0)
{
// red or blue

if ([team isEqualToString:@"blue"])
{
objColor = [UIColor blueColor];
}
else
{
objColor = [UIColor redColor];
}
}
else
{
objColor = [UIColor yellowColor];
}

switch (self.points)
{
case 10:
objName = @"cube.obj";
sizeScalar = 30.0;
break;
case 20:
objName = @"flag_ufo.obj";
sizeScalar = 8.0;
break;
case 30:
objName = @"star.obj";
sizeScalar = 3.5;
break;
case 50:
objName = @"moebius.obj";
sizeScalar = 1.1;
break;
default:
break;
}

// OBJView *objView = [[OBJView alloc] initWithOBJ:objName
// textureNamed:nil];
TexturedGeometryView *objView = [[TexturedGeometryView alloc] initWithOBJ:objName
textureNamed:nil];

objView.sizeScalar = sizeScalar;
objView.color = objColor;

self.view = objView;
[objView release];


UIImage *img = [UIImage imageNamed:@"3dar_marker_icon1.png"];

UIImageView *iv = [[UIImageView alloc] initWithImage:img];
objView.frame = CGRectMake(0, 0, img.size.width, img.size.height);
[objView addSubview:iv];
[iv release];

}

return self;
}

- (NSString *)title
{
NSString *t = self.team;

if (!t || [t length] == 0)
{
t = @"Open";
}

return t;
}

- (NSString *)subtitle
{
return [NSString stringWithFormat:@"%i", self.points];
}

@end
Loading