front_processing/extern/TUIO_JAVA/src/TUIO/TuioCursor.java
changeset 9 0f44b7360c8d
parent 3 92f19af39024
child 10 925b7ee746e3
equal deleted inserted replaced
8:e4e7db2435f8 9:0f44b7360c8d
     1 /*
     1 /*
     2 	TUIO Java backend - part of the reacTIVision project
     2     TUIO Java backend - part of the reacTIVision project
     3 	http://reactivision.sourceforge.net/
     3     http://reactivision.sourceforge.net/
     4 
     4 
     5 	Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
     5     Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
     6 
     6 
     7     This program is free software; you can redistribute it and/or modify
     7     This program is free software; you can redistribute it and/or modify
     8     it under the terms of the GNU General Public License as published by
     8     it under the terms of the GNU General Public License as published by
     9     the Free Software Foundation; either version 2 of the License, or
     9     the Free Software Foundation; either version 2 of the License, or
    10     (at your option) any later version.
    10     (at your option) any later version.
    26  * @author Martin Kaltenbrunner
    26  * @author Martin Kaltenbrunner
    27  * @version 1.4
    27  * @version 1.4
    28  */ 
    28  */ 
    29 public class TuioCursor extends TuioContainer {
    29 public class TuioCursor extends TuioContainer {
    30 
    30 
    31 	/**
    31     /**
    32 	 * The individual cursor ID number that is assigned to each TuioCursor.
    32      * The individual cursor ID number that is assigned to each TuioCursor.
    33 	 */ 
    33      */ 
    34 	protected int cursor_id;
    34     protected int cursor_id;
    35 	
    35     
    36 	/**
    36     /**
    37 	 * This constructor takes a TuioTime argument and assigns it along  with the provided 
    37      * This constructor takes a TuioTime argument and assigns it along  with the provided 
    38 	 * Session ID, Cursor ID, X and Y coordinate to the newly created TuioCursor.
    38      * Session ID, Cursor ID, X and Y coordinate to the newly created TuioCursor.
    39 	 *
    39      *
    40 	 * @param	ttime	the TuioTime to assign
    40      * @param    ttime    the TuioTime to assign
    41 	 * @param	si	the Session ID  to assign
    41      * @param    si    the Session ID  to assign
    42 	 * @param	ci	the Cursor ID  to assign
    42      * @param    ci    the Cursor ID  to assign
    43 	 * @param	xp	the X coordinate to assign
    43      * @param    xp    the X coordinate to assign
    44 	 * @param	yp	the Y coordinate to assign
    44      * @param    yp    the Y coordinate to assign
    45 	 */
    45      */
    46 	public TuioCursor (TuioTime ttime, long si, int ci, float xp, float yp) {
    46     public TuioCursor (TuioTime ttime, long si, int ci, float xp, float yp) {
    47 		super(ttime, si,xp,yp);
    47         super(ttime, si,xp,yp);
    48 		this.cursor_id = ci;
    48         this.cursor_id = ci;
    49 	}
    49     }
    50 	
    50     
    51 	/**
    51     /**
    52 	 * This constructor takes a TuioTime argument and assigns it along  with the provided 
    52      * This constructor takes a TuioTime argument and assigns it along  with the provided 
    53 	 * Session ID, Cursor ID, X, Y and Z coordinate to the newly created TuioCursor.
    53      * Session ID, Cursor ID, X, Y and Z coordinate to the newly created TuioCursor.
    54 	 *
    54      *
    55 	 * @param	ttime	the TuioTime to assign
    55      * @param    ttime    the TuioTime to assign
    56 	 * @param	si	the Session ID  to assign
    56      * @param    si    the Session ID  to assign
    57 	 * @param	ci	the Cursor ID  to assign
    57      * @param    ci    the Cursor ID  to assign
    58 	 * @param	xp	the X coordinate to assign
    58      * @param    xp    the X coordinate to assign
    59 	 * @param	yp	the Y coordinate to assign
    59      * @param    yp    the Y coordinate to assign
    60 	 * @param	zp	the Z coordinate to assign
    60      * @param    zp    the Z coordinate to assign
    61 	 */
    61      */
    62 	public TuioCursor (TuioTime ttime, long si, int ci, float xp, float yp, float zp) {
    62     public TuioCursor (TuioTime ttime, long si, int ci, float xp, float yp, float zp) {
    63 		super(ttime, si,xp,yp,zp);
    63         super(ttime, si,xp,yp,zp);
    64 		this.cursor_id = ci;
    64         this.cursor_id = ci;
    65 	}
    65     }
    66 	
    66     
    67 	/**
    67     /**
    68 	 * This constructor takes the provided Session ID, Cursor ID, X and Y coordinate 
    68      * This constructor takes the provided Session ID, Cursor ID, X and Y coordinate 
    69 	 * and assigs these values to the newly created TuioCursor.
    69      * and assigs these values to the newly created TuioCursor.
    70 	 *
    70      *
    71 	 * @param	si	the Session ID  to assign
    71      * @param    si    the Session ID  to assign
    72 	 * @param	ci	the Cursor ID  to assign
    72      * @param    ci    the Cursor ID  to assign
    73 	 * @param	xp	the X coordinate to assign
    73      * @param    xp    the X coordinate to assign
    74 	 * @param	yp	the Y coordinate to assign
    74      * @param    yp    the Y coordinate to assign
    75 	 */
    75      */
    76 	public TuioCursor (long si, int ci, float xp, float yp) {
    76     public TuioCursor (long si, int ci, float xp, float yp) {
    77 		super(si,xp,yp);
    77         super(si,xp,yp);
    78 		this.cursor_id = ci;
    78         this.cursor_id = ci;
    79 	}
    79     }
    80 	
    80     
    81 	/**
    81     /**
    82 	 * This constructor takes the provided Session ID, Cursor ID, X, Y and Z coordinate 
    82      * This constructor takes the provided Session ID, Cursor ID, X, Y and Z coordinate 
    83 	 * and assigs these values to the newly created TuioCursor.
    83      * and assigs these values to the newly created TuioCursor.
    84 	 *
    84      *
    85 	 * @param	si	the Session ID  to assign
    85      * @param    si    the Session ID  to assign
    86 	 * @param	ci	the Cursor ID  to assign
    86      * @param    ci    the Cursor ID  to assign
    87 	 * @param	xp	the X coordinate to assign
    87      * @param    xp    the X coordinate to assign
    88 	 * @param	yp	the Y coordinate to assign
    88      * @param    yp    the Y coordinate to assign
    89 	 * @param	zp	the Z coordinate to assign
    89      * @param    zp    the Z coordinate to assign
    90 	 */
    90      */
    91 	public TuioCursor (long si, int ci, float xp, float yp, float zp) {
    91     public TuioCursor (long si, int ci, float xp, float yp, float zp) {
    92 		super(si,xp,yp,zp);
    92         super(si,xp,yp,zp);
    93 		this.cursor_id = ci;
    93         this.cursor_id = ci;
    94 	}
    94     }
    95 
    95 
    96 	/**
    96     /**
    97 	 * This constructor takes the atttibutes of the provided TuioCursor 
    97      * This constructor takes the atttibutes of the provided TuioCursor 
    98 	 * and assigs these values to the newly created TuioCursor.
    98      * and assigs these values to the newly created TuioCursor.
    99 	 *
    99      *
   100 	 * @param	tcur	the TuioCursor to assign
   100      * @param    tcur    the TuioCursor to assign
   101 	 */
   101      */
   102 	public TuioCursor (TuioCursor tcur) {
   102     public TuioCursor (TuioCursor tcur) {
   103 		super(tcur);
   103         super(tcur);
   104 		this.cursor_id = tcur.getCursorID();
   104         this.cursor_id = tcur.getCursorID();
   105 	}
   105     }
   106 	
   106     
   107 	/**
   107     /**
   108 	 * Returns the Cursor ID of this TuioCursor.
   108      * Returns the Cursor ID of this TuioCursor.
   109 	 * @return	the Cursor ID of this TuioCursor
   109      * @return    the Cursor ID of this TuioCursor
   110 	 */
   110      */
   111 	public int getCursorID() {
   111     public int getCursorID() {
   112 		return cursor_id;
   112         return cursor_id;
   113 	}
   113     }
   114 	
   114     
   115 }
   115 }