/* TUIO C# Library - part of the reacTIVision project Copyright (c) 2005-2014 Martin Kaltenbrunner This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. */ using System; namespace TUIO { /** * * The TuioCursor class encapsulates /tuio/2Dcur TUIO cursors. * * @author Martin Kaltenbrunner * @version 1.1.5 */ public class TuioCursor : TuioContainer { /** * * The individual cursor ID number that is assigned to each TuioCursor. */ protected int cursor_id; #region Constructors /** * * This constructor takes a TuioTime argument and assigns it along with the provided * Session ID, Cursor ID, X and Y coordinate to the newly created TuioCursor. * * the TuioTime to assign * the Session ID to assign * the Cursor ID to assign * the X coordinate to assign * the Y coordinate to assign */ public TuioCursor(TuioTime ttime, long si, int ci, float xp, float yp) : base(ttime, si, xp, yp) { cursor_id = ci; } /** * * This constructor takes the provided Session ID, Cursor ID, X and Y coordinate * and assigs these values to the newly created TuioCursor. * * the Session ID to assign * the Cursor ID to assign * the X coordinate to assign * the Y coordinate to assign */ public TuioCursor(long si, int ci, float xp, float yp) : base(si, xp, yp) { cursor_id = ci; } /** * * This constructor takes the atttibutes of the provided TuioCursor * and assigs these values to the newly created TuioCursor. * * the TuioCursor to assign */ public TuioCursor(TuioCursor tcur) : base(tcur) { cursor_id = tcur.CursorID; } #endregion #region Properties & Getter/Setter Methods /** * * Returns the Cursor ID of this TuioCursor. * the Cursor ID of this TuioCursor */ public int CursorID { get { return cursor_id; } } [Obsolete("This method has been depracated and is provided only for compatability with legacy code. The CursorID property should be used instead.")] public int getCursorID() { return cursor_id; } #endregion } }