|
||||
File indexing completed on 2025-01-18 10:02:59
0001 // Copyright (c) 2016-2019 OPEN CASCADE SAS 0002 // 0003 // This file is part of Open CASCADE Technology software library. 0004 // 0005 // This library is free software; you can redistribute it and/or modify it under 0006 // the terms of the GNU Lesser General Public License version 2.1 as published 0007 // by the Free Software Foundation, with special exception defined in the file 0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0009 // distribution for complete text of the license and disclaimer of any warranty. 0010 // 0011 // Alternatively, this file may be used under the terms of Open CASCADE 0012 // commercial license or contractual agreement. 0013 0014 #ifndef _Aspect_Touch_HeaderFile 0015 #define _Aspect_Touch_HeaderFile 0016 0017 #include <NCollection_Vec2.hxx> 0018 0019 //! Structure holding touch position - original and current location. 0020 class Aspect_Touch 0021 { 0022 public: 0023 0024 NCollection_Vec2<Standard_Real> From; //!< original touch position 0025 NCollection_Vec2<Standard_Real> To; //!< current touch position 0026 Standard_Boolean IsPreciseDevice; //!< precise device input (e.g. mouse cursor, NOT emulated from touch screen) 0027 0028 //! Return values delta. 0029 NCollection_Vec2<Standard_Real> Delta() const { return To - From; } 0030 0031 //! Empty constructor 0032 Aspect_Touch() 0033 : From (0.0, 0.0), To (0.0, 0.0), IsPreciseDevice (false) {} 0034 0035 //! Constructor with initialization. 0036 Aspect_Touch (const NCollection_Vec2<Standard_Real>& thePnt, 0037 Standard_Boolean theIsPreciseDevice) 0038 : From (thePnt), To (thePnt), IsPreciseDevice (theIsPreciseDevice) {} 0039 0040 //! Constructor with initialization. 0041 Aspect_Touch (Standard_Real theX, Standard_Real theY, 0042 Standard_Boolean theIsPreciseDevice) 0043 : From (theX, theY), To (theX, theY), IsPreciseDevice (theIsPreciseDevice) {} 0044 0045 }; 0046 0047 #endif // _Aspect_Touch_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |