Detect tangible objects on iOS. Tangible objects are physical objects detected on screen.
Objective-C
Switch branches/tags
Nothing to show
Clone or download
Latest commit 9082455 May 21, 2013
Permalink
Failed to load latest commit information.
Example/IOSTangibleDetector New gestion Rotation May 20, 2013
IOSTangibleDetector New gestion Rotation May 20, 2013
README.md Update README.md May 20, 2013

README.md

IOSTangibleDetector

Detect tangible objects on iOS. Tangible objects are physical objects detected on screen.
Currently, TangibleDetector detect only one object with 3 contact points.
Beta version : V 0.9.1

Screenshot & Demo Video

To see a demo video, click here

ScreenShot Demo Video

How To Get Started

Distance to point :

ScreenShot Demo Video

Add "TangilbleDetector.h" and "TangilbleDetector.m" in your xcodeprojet. Import the .h file :

``` objective-c #import "TangilbleDetector.h" ```

Add Delegate TangibleDetector :

``` objective-c @interface M_01 : CCLayer ```

Init the TangilbleDetector and multitouch :

``` objective-c TangilbleDetector *tangibleDetector = [[TangilbleDetector alloc]init]; self.tangibleDetector.delegate = self; self.view.multipleTouchEnabled = YES; ```

Add touch functions

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{[self.tangibleDetector touchesBegan:touches];}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{[self.tangibleDetector touchesMoved:touches];}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{[self.tangibleDetector touchesEnded:touches];}

Edit TangilbleDetector.m

Change value to distance to touch :

``` objective-c int DistanceObjectMin = 96; int DistanceObjectLong1 = 111; int DistanceObjectLong2 = 111; ```

Get the position and angle of the object

Use delegate function in your view :

``` objective-c - (void)objectDetectedWithPosition:(CGPoint)position andAngle:(float)angle{
// (CGPoint)position
// position of object

// (float)angle
// angle of object

}

  • (void)objectisNotDetected{

    // if object is not Detected

}