~ubuntu-branches/debian/sid/openscenegraph/sid

« back to all changes in this revision

Viewing changes to OpenSceneGraph/src/osgPlugins/RestHttpDevice/RestHttpDevice.hpp

  • Committer: Package Import Robot
  • Author(s): Alberto Luaces Fernández
  • Date: 2014-09-05 13:54:28 UTC
  • mfrom: (24.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20140905135428-z6ebaahwc61dp39w
Tags: 3.2.1-3
* Refresh libav patches.
* One more fix for building on FreeBSD.

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
    
172
172
    virtual bool checkEvents()
173
173
    {
174
 
        if ((fabs(_currentMouseX - _targetMouseY) > 0.1f) || (fabs(_currentMouseY - _targetMouseY) > 0.1))
 
174
        if (_targetMouseChanged && (fabs(_currentMouseX - _targetMouseY) > 0.1f) || (fabs(_currentMouseY - _targetMouseY) > 0.1))
175
175
        {
176
176
            static const float scalar = 0.2f;
177
177
            _currentMouseX = (1.0f - scalar) * _currentMouseX + scalar * _targetMouseX;
183
183
    
184
184
    void setTargetMousePosition(float x, float y, bool force = false)
185
185
    {
 
186
        _targetMouseChanged = true;
186
187
        _targetMouseX = x; _targetMouseY = y;
187
188
        if (force) {
188
189
            _currentMouseX = x; _currentMouseY = y;
200
201
    double _firstEventRemoteTimeStamp;
201
202
    double _lastEventRemoteTimeStamp;
202
203
    float _currentMouseX, _currentMouseY, _targetMouseX, _targetMouseY;
 
204
    bool _targetMouseChanged;
203
205
    
204
206
};
205
207