front_idill/extern/fajran-npTuioClient/TuioClient/TuioCursor.h
author bastiena
Thu, 12 Apr 2012 15:33:25 +0200
changeset 28 9ccef81f02ab
parent 24 2bdf5d51d434
permissions -rw-r--r--
Charset set to UTF-8 without bom tab replaced by 4 spaces \r\n replaced by \n in non cs files
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     1
/*
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     2
	TUIO C++ Library - part of the reacTIVision project
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     3
	http://reactivision.sourceforge.net/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     4
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     5
	Copyright (c) 2005-2008 Martin Kaltenbrunner <mkalten@iua.upf.edu>
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     6
	
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     7
    This program is free software; you can redistribute it and/or modify
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     8
    it under the terms of the GNU General Public License as published by
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
     9
    the Free Software Foundation; either version 2 of the License, or
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    10
    (at your option) any later version.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    11
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    12
    This program is distributed in the hope that it will be useful,
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    15
    GNU General Public License for more details.
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    16
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    17
    You should have received a copy of the GNU General Public License
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    18
    along with this program; if not, write to the Free Software
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    19
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    20
*/
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    21
28
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 24
diff changeset
    22
/*
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 24
diff changeset
    23
    Modified by alexandre.bastien@iri.centrepompidou.fr to manage TUIO strings.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 24
diff changeset
    24
*/
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 24
diff changeset
    25
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    26
#ifndef INCLUDED_TUIOCURSOR_H
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    27
#define INCLUDED_TUIOCURSOR_H
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    28
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    29
#include <list>
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    30
#include <math.h>
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    31
#include "TuioContainer.h"
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    32
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    33
class TuioCursor: public TuioContainer {
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    34
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    35
	protected:
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    36
		int finger_id;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    37
		std::list<TuioPoint> path;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    38
	
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    39
	public:
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    40
	TuioCursor (long s_id, int f_id, float xpos, float ypos):TuioContainer(s_id,xpos,ypos) {
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    41
		this->finger_id = f_id;
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    42
	};
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    43
24
2bdf5d51d434 Front IDILL :
bastiena
parents: 21
diff changeset
    44
	/*
28
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 24
diff changeset
    45
	* Surchargé par alexandre.bastien@iri.centrepompidou.fr
24
2bdf5d51d434 Front IDILL :
bastiena
parents: 21
diff changeset
    46
	*/
2bdf5d51d434 Front IDILL :
bastiena
parents: 21
diff changeset
    47
	TuioCursor (long s_id, int f_id, float xpos, float ypos, float zpos):TuioContainer(s_id,xpos,ypos,zpos) {
2bdf5d51d434 Front IDILL :
bastiena
parents: 21
diff changeset
    48
		this->finger_id = f_id;
2bdf5d51d434 Front IDILL :
bastiena
parents: 21
diff changeset
    49
	};
2bdf5d51d434 Front IDILL :
bastiena
parents: 21
diff changeset
    50
21
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    51
	TuioCursor (TuioCursor *tuioCursor):TuioContainer(tuioCursor) {
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    52
		this->finger_id = tuioCursor->getFingerID();
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    53
	};
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    54
	
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    55
	~TuioCursor(){};
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    56
	
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    57
	int getFingerID() { return finger_id; };
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    58
};
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    59
e4e5f02787a1 Front IDILL :
bastiena
parents:
diff changeset
    60
#endif