Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Commit

Permalink
cicm.simpleleap package
Browse files Browse the repository at this point in the history
  • Loading branch information
eliottparis committed Sep 12, 2014
1 parent 8916348 commit d0387eb
Show file tree
Hide file tree
Showing 34 changed files with 4,589 additions and 18 deletions.
27 changes: 27 additions & 0 deletions MaxDoctor
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/Users/elioton/Documents/programmation/CICM/sourceTree/CicmLeap





/Users/elioton/Documents/programmation/CICM/sourceTree/HoaLibrary/Max/Package/HoaLibrary/docs/refpages/hoa-ref/
/Users/elioton/Documents/programmation/CICM/sourceTree/HoaLibrary/Max/Package/HoaLibrary/docs/refpages/init/
1
1
1
1
1
1
0
1
1
0
hoa
1
1
1
1
1

/Users/elioton/Documents/programmation/CICM/sourceTree/HoaLibrary/Max/Package/HoaLibrary/interfaces
1n
58 changes: 41 additions & 17 deletions SimpleLeap/cicm.simpleleap.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,31 @@
/**
Max Object based on the Leap SDK 2.1.3
/*
// Copyright (c) 2014 Eliott Paris, CICM, University of Paris 8.
// For information on usage and redistribution, and for a DISCLAIMER OF ALL
// WARRANTIES, see the file, "LICENSE.txt," in this distribution.
*/

/**
@file cicm.simpleleap.cpp
@name cicm.simpleleap
@realname cicm.simpleleap
@type object
@module cicm
@author CICM, Eliott Paris
@digest
A simple and light leapmotion object
@description
<o>cicm.simpleleap</o> Reports the stabilized center position of the left and right palms in millimeters from the Leap Motion Controller origin.
@discussion
<o>cicm.simpleleap</o> Reports the stabilized center position of the left and right palms in millimeters from the Leap Motion Controller origin.
@category device, controller
@seealso cicm.leap
*/

#include "ext.h"
#include "ext_obex.h"
#include "ext_path.h"
Expand Down Expand Up @@ -45,6 +69,9 @@ void *cicmleap_class;
int C74_EXPORT main(void)
{
t_class *c = class_new("cicm.simpleleap", (method)cicmleap_new, (method)cicmleap_free, (long)sizeof(t_cicmleap), 0L, A_GIMME, 0);

// @method bang @digest Reports frame datas
// @description Reports frame datas
class_addmethod(c, (method)cicmleap_bang, "bang", 0);
class_addmethod(c, (method)cicmleap_assist, "assist", A_CANT, 0);

Expand All @@ -58,21 +85,20 @@ int C74_EXPORT main(void)

void cicmleap_assist(t_cicmleap *x, void *b, long m, long a, char *s)
{
if (m == ASSIST_INLET) { //inlet
sprintf(s, "messages");
}
else { // outlet
switch (a) {
case 0:
sprintf(s, "list (left hand position)"); break;
case 1:
sprintf(s, "list (right hand position)"); break;
case 2:
sprintf(s, "list (infos)"); break;
default:
break;
if (m == ASSIST_OUTLET)
{
switch (a)
{
case 0: sprintf(s, "list (left hand position)"); break;
case 1: sprintf(s, "list (right hand position)"); break;
case 2: sprintf(s, "list (infos)"); break;
default: break;
}
}
else
{
sprintf(s, "bang outputs frame infos");
}
}

void cicmleap_free(t_cicmleap *x)
Expand Down Expand Up @@ -128,8 +154,6 @@ void *cicmleap_new(t_symbol *s, long argc, t_atom *argv)
x->out_simple_1 = outlet_new(x, NULL);

x->leap = new Leap::Controller;

attr_args_process(x, argc, argv);
}
return (x);
}
Binary file not shown.
Binary file modified SimpleLeap/dev/cicm.simpleleap.mxo/Contents/MacOS/cicm.simpleleap
Binary file not shown.
2 changes: 1 addition & 1 deletion SimpleLeap/max-sdk-6.1.4.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ARCHS = i386 x86_64
C74SUPPORT = $(SRCROOT)/../../../SDKs/MaxSDK-6.1.4/c74support
HEADER_SEARCH_PATHS = "$(C74SUPPORT)/max-includes" "$(C74SUPPORT)/msp-includes" "$(C74SUPPORT)/jit-includes"
FRAMEWORK_SEARCH_PATHS = "$(C74SUPPORT)/max-includes" "$(C74SUPPORT)/msp-includes" "$(C74SUPPORT)/jit-includes"
DSTROOT = $(SRCROOT)/dev
DSTROOT = $(SRCROOT)/../cicm.leap/externals
// (This next path is relative to DSTROOT)
INSTALL_PATH = /

Expand Down
Loading

0 comments on commit d0387eb

Please sign in to comment.