|
|
|||
File indexing completed on 2026-09-24 09:15:01
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 NCollection_Vec2<double> From; //!< original touch position 0024 NCollection_Vec2<double> To; //!< current touch position 0025 // clang-format off 0026 bool IsPreciseDevice; //!< precise device input (e.g. mouse cursor, NOT emulated from touch screen) 0027 // clang-format on 0028 0029 //! Return values delta. 0030 NCollection_Vec2<double> Delta() const { return To - From; } 0031 0032 //! Empty constructor 0033 Aspect_Touch() 0034 : From(0.0, 0.0), 0035 To(0.0, 0.0), 0036 IsPreciseDevice(false) 0037 { 0038 } 0039 0040 //! Constructor with initialization. 0041 Aspect_Touch(const NCollection_Vec2<double>& thePnt, bool theIsPreciseDevice) 0042 : From(thePnt), 0043 To(thePnt), 0044 IsPreciseDevice(theIsPreciseDevice) 0045 { 0046 } 0047 0048 //! Constructor with initialization. 0049 Aspect_Touch(double theX, double theY, bool theIsPreciseDevice) 0050 : From(theX, theY), 0051 To(theX, theY), 0052 IsPreciseDevice(theIsPreciseDevice) 0053 { 0054 } 0055 }; 0056 0057 #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 |
|