Skip to content

Detect tangible objects on iOS. Tangible objects are physical objects detected on screen.

Notifications You must be signed in to change notification settings

VivienCormier/IOSTangibleDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

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

}

About

Detect tangible objects on iOS. Tangible objects are physical objects detected on screen.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published