front_processing/extern/TUIO_JAVA/src/TUIO/TuioPoint.java
author bastiena
Thu, 12 Apr 2012 15:33:25 +0200
changeset 28 9ccef81f02ab
parent 10 925b7ee746e3
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:
28
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
     1
/*
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
     2
    TUIO Java backend - part of the reacTIVision project
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
     3
    http://reactivision.sourceforge.net/
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
     4
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
     5
    Copyright (c) 2005-2009 Martin Kaltenbrunner <mkalten@iua.upf.edu>
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
     6
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
     7
    This program is free software; you can redistribute it and/or modify
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
     8
    it under the terms of the GNU General Public License as published by
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
     9
    the Free Software Foundation; either version 2 of the License, or
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    10
    (at your option) any later version.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    11
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    12
    This program is distributed in the hope that it will be useful,
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    13
    but WITHOUT ANY WARRANTY; without even the implied warranty of
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    14
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    15
    GNU General Public License for more details.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    16
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    17
    You should have received a copy of the GNU General Public License
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    18
    along with this program; if not, write to the Free Software
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    19
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    20
*/
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    21
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    22
/*
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    23
    Modified by alexandre.bastien@iri.centrepompidou.fr to manage 3D.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    24
*/
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    25
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    26
package TUIO;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    27
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    28
/**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    29
 * The TuioPoint class on the one hand is a simple container and utility class to handle TUIO positions in general, 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    30
 * on the other hand the TuioPoint is the base class for the TuioCursor and TuioObject classes.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    31
 *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    32
 * @author Martin Kaltenbrunner
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    33
 * @version 1.4
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    34
 */ 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    35
public class TuioPoint {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    36
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    37
    public String comm;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    38
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    39
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    40
     * X coordinate, representated as a floating point value in a range of 0..1  
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    41
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    42
    protected float xpos;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    43
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    44
     * Y coordinate, representated as a floating point value in a range of 0..1  
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    45
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    46
    protected float ypos;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    47
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    48
     * Z coordinate, representated as a floating point value in a range of 0..1  
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    49
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    50
    protected float zpos;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    51
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    52
     * The time stamp of the last update represented as TuioTime (time since session start)
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    53
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    54
    protected TuioTime currentTime;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    55
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    56
     * The creation time of this TuioPoint represented as TuioTime (time since session start)
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    57
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    58
    protected TuioTime startTime;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    59
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    60
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    61
     * The default constructor takes no arguments and sets   
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    62
     * its coordinate attributes to zero and its time stamp to the current session time.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    63
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    64
    public TuioPoint() {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    65
        xpos = 0.0f;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    66
        ypos = 0.0f;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    67
        zpos = 0.0f;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    68
        currentTime = TuioTime.getSessionTime();
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    69
        startTime = new TuioTime(currentTime);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    70
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    71
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    72
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    73
     * This constructor takes two floating point coordinate arguments and sets   
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    74
     * its coordinate attributes to these values and its time stamp to the current session time.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    75
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    76
     * @param    xp    the X coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    77
     * @param    yp    the Y coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    78
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    79
    public TuioPoint(float xp, float yp) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    80
        xpos = xp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    81
        ypos = yp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    82
        zpos = 0.0f;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    83
        currentTime = TuioTime.getSessionTime();
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    84
        startTime = new TuioTime(currentTime);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    85
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    86
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    87
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    88
     * This constructor takes three floating point coordinate arguments and sets   
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    89
     * its coordinate attributes to these values and its time stamp to the current session time.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    90
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    91
     * @param    xp    the X coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    92
     * @param    yp    the Y coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    93
     * @param    zp    the Z coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    94
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    95
    public TuioPoint(float xp, float yp, float zp) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    96
        xpos = xp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    97
        ypos = yp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    98
        zpos = zp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
    99
        currentTime = TuioTime.getSessionTime();
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   100
        startTime = new TuioTime(currentTime);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   101
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   102
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   103
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   104
     * This constructor takes a TuioPoint argument and sets its coordinate attributes 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   105
     * to the coordinates of the provided TuioPoint and its time stamp to the current session time.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   106
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   107
     * @param    tpoint    the TuioPoint to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   108
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   109
    public TuioPoint(TuioPoint tpoint) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   110
        xpos = tpoint.getX();
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   111
        ypos = tpoint.getY();
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   112
        zpos = tpoint.getZ();
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   113
        currentTime = TuioTime.getSessionTime();
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   114
        startTime = new TuioTime(currentTime);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   115
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   116
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   117
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   118
     * This constructor takes a TuioTime object and two floating point coordinate arguments and sets   
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   119
     * its coordinate attributes to these values and its time stamp to the provided TUIO time object.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   120
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   121
     * @param    ttime    the TuioTime to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   122
     * @param    xp    the X coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   123
     * @param    yp    the Y coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   124
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   125
    public TuioPoint(TuioTime ttime, float xp, float yp) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   126
        xpos = xp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   127
        ypos = yp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   128
        zpos = 0.0f;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   129
        currentTime = new TuioTime(ttime);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   130
        startTime = new TuioTime(currentTime);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   131
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   132
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   133
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   134
     * This constructor takes a TuioTime object and three floating point coordinate arguments and sets   
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   135
     * its coordinate attributes to these values and its time stamp to the provided TUIO time object.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   136
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   137
     * @param    ttime    the TuioTime to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   138
     * @param    xp    the X coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   139
     * @param    yp    the Y coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   140
     * @param    zp    the Z coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   141
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   142
    public TuioPoint(TuioTime ttime, float xp, float yp, float zp) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   143
        xpos = xp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   144
        ypos = yp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   145
        zpos = zp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   146
        currentTime = new TuioTime(ttime);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   147
        startTime = new TuioTime(currentTime);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   148
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   149
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   150
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   151
     * Takes a TuioPoint argument and updates its coordinate attributes 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   152
     * to the coordinates of the provided TuioPoint and leaves its time stamp unchanged.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   153
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   154
     * @param    tpoint    the TuioPoint to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   155
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   156
    public void update(TuioPoint tpoint) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   157
        xpos = tpoint.getX();
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   158
        ypos = tpoint.getY();
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   159
        zpos = tpoint.getZ();
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   160
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   161
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   162
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   163
     * Takes two floating point coordinate arguments and updates its coordinate attributes 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   164
     * to the coordinates of the provided TuioPoint and leaves its time stamp unchanged.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   165
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   166
     * @param    xp    the X coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   167
     * @param    yp    the Y coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   168
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   169
    public void update(float xp, float yp) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   170
        xpos = xp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   171
        ypos = yp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   172
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   173
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   174
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   175
     * Takes three floating point coordinate arguments and updates its coordinate attributes 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   176
     * to the coordinates of the provided TuioPoint and leaves its time stamp unchanged.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   177
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   178
     * @param    xp    the X coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   179
     * @param    yp    the Y coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   180
     * @param    zp    the Z coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   181
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   182
    public void update(float xp, float yp, float zp) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   183
        xpos = xp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   184
        ypos = yp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   185
        zpos = zp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   186
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   187
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   188
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   189
     * Takes a TuioTime object and two floating point coordinate arguments and updates its coordinate attributes 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   190
     * to the coordinates of the provided TuioPoint and its time stamp to the provided TUIO time object.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   191
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   192
     * @param    ttime    the TuioTime to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   193
     * @param    xp    the X coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   194
     * @param    yp    the Y coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   195
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   196
    public void update(TuioTime ttime, float xp, float yp) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   197
        xpos = xp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   198
        ypos = yp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   199
        currentTime = new TuioTime(ttime);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   200
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   201
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   202
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   203
     * Takes a TuioTime object and three floating point coordinate arguments and updates its coordinate attributes 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   204
     * to the coordinates of the provided TuioPoint and its time stamp to the provided TUIO time object.
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   205
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   206
     * @param    ttime    the TuioTime to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   207
     * @param    xp    the X coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   208
     * @param    yp    the Y coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   209
     * @param    zp    the Z coordinate to assign
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   210
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   211
    public void update(TuioTime ttime, float xp, float yp, float zp) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   212
        xpos = xp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   213
        ypos = yp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   214
        zpos = zp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   215
        currentTime = new TuioTime(ttime);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   216
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   217
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   218
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   219
     * Returns the X coordinate of this TuioPoint. 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   220
     * @return    the X coordinate of this TuioPoint
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   221
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   222
    public float getX() {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   223
        return xpos;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   224
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   225
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   226
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   227
     * Returns the Y coordinate of this TuioPoint. 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   228
     * @return    the Y coordinate of this TuioPoint
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   229
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   230
    public float getY() {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   231
        return ypos;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   232
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   233
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   234
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   235
     * Returns the Z coordinate of this TuioPoint. 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   236
     * @return    the Z coordinate of this TuioPoint
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   237
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   238
    public float getZ() {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   239
        return zpos;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   240
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   241
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   242
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   243
     * Returns the distance to the provided coordinates 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   244
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   245
     * @param    xp    the X coordinate of the distant point
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   246
     * @param    yp    the Y coordinate of the distant point
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   247
     * @return    the distance to the provided coordinates
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   248
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   249
    public float getDistance(float xp, float yp) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   250
        float dx = xpos-xp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   251
        float dy = ypos-yp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   252
        return (float)Math.sqrt(dx*dx+dy*dy);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   253
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   254
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   255
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   256
     * Returns the distance to the provided coordinates 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   257
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   258
     * @param    xp    the X coordinate of the distant point
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   259
     * @param    yp    the Y coordinate of the distant point
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   260
     * @param    zp    the Y coordinate of the distant point
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   261
     * @return    the distance to the provided coordinates
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   262
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   263
    public float getDistance(float xp, float yp, float zp) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   264
        float dx = xpos-xp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   265
        float dy = ypos-yp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   266
        float dz = zpos-zp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   267
        return (float)Math.sqrt(dx*dx+dy*dy+dz*dz);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   268
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   269
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   270
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   271
     * Returns the distance to the provided TuioPoint 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   272
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   273
     * @param    tpoint    the distant TuioPoint
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   274
     * @return    the distance to the provided TuioPoint
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   275
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   276
    public float getDistance(TuioPoint tpoint) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   277
        return getDistance(tpoint.getX(),tpoint.getY(), tpoint.getZ());
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   278
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   279
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   280
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   281
     * Returns the angle to the provided coordinates 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   282
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   283
     * @param    xp    the X coordinate of the distant point
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   284
     * @param    yp    the Y coordinate of the distant point
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   285
     * @return    the angle to the provided coordinates
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   286
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   287
    public float getAngle(float xp, float yp) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   288
        
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   289
        float side = xpos-xp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   290
        float height = ypos-yp;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   291
        float distance = getDistance(xp,yp);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   292
        
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   293
        float angle = (float)(Math.asin(side/distance)+Math.PI/2);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   294
        if (height<0) angle = 2.0f*(float)Math.PI-angle;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   295
        
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   296
        return angle;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   297
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   298
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   299
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   300
     * Returns the angle to the provided TuioPoint 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   301
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   302
     * @param    tpoint    the distant TuioPoint
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   303
     * @return    the angle to the provided TuioPoint
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   304
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   305
    public float getAngle(TuioPoint tpoint) {                        
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   306
        return getAngle(tpoint.getX(),tpoint.getY());
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   307
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   308
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   309
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   310
     * Returns the angle in degrees to the provided coordinates 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   311
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   312
     * @param    xp    the X coordinate of the distant point
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   313
     * @param    yp    the Y coordinate of the distant point
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   314
     * @return    the angle in degrees to the provided TuioPoint
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   315
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   316
    public float getAngleDegrees(float xp, float yp) {        
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   317
        return (getAngle(xp,yp)/(float)Math.PI)*180.0f;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   318
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   319
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   320
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   321
     * Returns the angle in degrees to the provided TuioPoint 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   322
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   323
     * @param    tpoint    the distant TuioPoint
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   324
     * @return    the angle in degrees to the provided TuioPoint
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   325
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   326
    public float getAngleDegrees(TuioPoint tpoint) {        
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   327
        return (getAngle(tpoint)/(float)Math.PI)*180.0f;
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   328
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   329
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   330
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   331
     * Returns the X coordinate in pixels relative to the provided screen width. 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   332
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   333
     * @param    width    the screen width
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   334
     * @return    the X coordinate of this TuioPoint in pixels relative to the provided screen width
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   335
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   336
    public int getScreenX(int width) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   337
        return (int)Math.round(xpos*width);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   338
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   339
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   340
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   341
     * Returns the Y coordinate in pixels relative to the provided screen height. 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   342
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   343
     * @param    height    the screen height
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   344
     * @return    the Y coordinate of this TuioPoint in pixels relative to the provided screen height
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   345
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   346
    public int getScreenY(int height) {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   347
        return (int)Math.round(ypos*height);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   348
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   349
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   350
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   351
     * Returns the time stamp of this TuioPoint as TuioTime. 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   352
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   353
     * @return    the time stamp of this TuioPoint as TuioTime
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   354
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   355
    public TuioTime getTuioTime() {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   356
        return new TuioTime(currentTime);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   357
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   358
    
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   359
    /**
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   360
     * Returns the start time of this TuioPoint as TuioTime. 
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   361
     *
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   362
     * @return    the start time of this TuioPoint as TuioTime
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   363
     */
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   364
    public TuioTime getStartTime() {
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   365
        return new TuioTime(startTime);
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   366
    }
9ccef81f02ab Charset set to UTF-8 without bom
bastiena
parents: 10
diff changeset
   367
}