Ran script to remove trailing spaces and tabs

This commit is contained in:
Robert Osfield
2012-03-21 17:36:20 +00:00
parent 1e35f8975d
commit 14a563dc9f
1495 changed files with 21873 additions and 21873 deletions

View File

@@ -1,18 +1,18 @@
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
* (at your option) any later version. The full license is in LICENSE file
* included with this distribution, and on the openscenegraph.org website.
*
*
* 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
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGGA_EVENT
#define OSGGA_EVENT 1
#define OSGGA_EVENT 1
#include <osg/Object>
#include <osg/Matrix>
@@ -28,7 +28,7 @@ class OSGGA_EXPORT GUIEventAdapter : public osg::Object
{
public:
enum MouseButtonMask {
enum MouseButtonMask {
LEFT_MOUSE_BUTTON = 1<<0,
MIDDLE_MOUSE_BUTTON = 1<<1,
RIGHT_MOUSE_BUTTON = 1<<2
@@ -36,7 +36,7 @@ public:
enum EventType {
NONE = 0,
PUSH = 1<<0,
PUSH = 1<<0,
RELEASE = 1<<1,
DOUBLECLICK = 1<<2,
DRAG = 1<<3,
@@ -208,7 +208,7 @@ public:
KEY_KP_7 = 0xFFB7,
KEY_KP_8 = 0xFFB8,
KEY_KP_9 = 0xFFB9,
/*
* Auxiliary Functions; note the duplicate definitions for left and right
* function keys; Sun keyboards and a few other manufactures have such
@@ -302,7 +302,7 @@ public:
Y_INCREASING_DOWNWARDS
};
enum ScrollingMotion
enum ScrollingMotion
{
SCROLL_NONE,
SCROLL_LEFT,
@@ -312,15 +312,15 @@ public:
SCROLL_2D
};
enum TabletPointerType
enum TabletPointerType
{
UNKNOWN = 0,
PEN,
PUCK,
ERASER
};
enum TouchPhase
enum TouchPhase
{
TOUCH_UNKNOWN,
TOUCH_BEGAN,
@@ -328,54 +328,54 @@ public:
TOUCH_STATIONERY,
TOUCH_ENDED
};
class TouchData : public osg::Referenced {
public:
struct TouchPoint {
unsigned int id;
TouchPhase phase;
float x, y;
unsigned int tapCount;
TouchPoint() : id(0), phase(TOUCH_UNKNOWN), x(0.0f), y(0.0f), tapCount(0) {}
TouchPoint(unsigned int in_id, TouchPhase in_phase, float in_x, float in_y, unsigned int in_tap_count)
: id(in_id),
TouchPoint(unsigned int in_id, TouchPhase in_phase, float in_x, float in_y, unsigned int in_tap_count)
: id(in_id),
phase(in_phase),
x(in_x),
y(in_y),
tapCount(in_tap_count)
x(in_x),
y(in_y),
tapCount(in_tap_count)
{
}
};
typedef std::vector<TouchPoint> TouchSet;
typedef TouchSet::iterator iterator;
typedef TouchSet::const_iterator const_iterator;
TouchData() : osg::Referenced() {}
unsigned int getNumTouchPoints() const { return _touches.size(); }
iterator begin() { return _touches.begin(); }
const_iterator begin() const { return _touches.begin(); }
iterator end() { return _touches.end(); }
const_iterator end() const { return _touches.end(); }
const TouchPoint get(unsigned int i) const { return _touches[i]; }
protected:
void addTouchPoint(unsigned int id, TouchPhase phase, float x, float y, unsigned int tap_count) {
_touches.push_back(TouchPoint(id, phase, x, y, tap_count));
}
TouchSet _touches;
friend class GUIEventAdapter;
friend class GUIEventAdapter;
};
public:
GUIEventAdapter();
@@ -383,7 +383,7 @@ public:
GUIEventAdapter(const GUIEventAdapter& rhs, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
META_Object(osgGA, GUIEventAdapter);
/** Get the accumulated event state singleton.
* Typically all EventQueue will share this single GUIEventAdapter object for tracking
@@ -415,7 +415,7 @@ public:
void setGraphicsContext(osg::GraphicsContext* context) { _context = context; }
const osg::GraphicsContext* getGraphicsContext() const { return _context.get(); }
/** set window rectangle. */
void setWindowRectangle(int x, int y, int width, int height, bool updateMouseRange = true);
@@ -441,10 +441,10 @@ public:
/** set virtual key pressed. */
void setUnmodifiedKey(int key) { _unmodifiedKey = key; }
/** get virtual key pressed. */
int getUnmodifiedKey() const { return _unmodifiedKey; }
/** set button pressed/released.*/
void setButton(int button) { _button = button; }
@@ -482,7 +482,7 @@ public:
/**
* return the current mouse x value normalized to the range of -1 to 1.
* -1 would be the left hand side of the window.
* 0.0 would be the middle of the window.
* 0.0 would be the middle of the window.
* +1 would be the right hand side of the window.
*/
inline float getXnormalized() const { return 2.0f*(getX()-getXmin())/(getXmax()-getXmin())-1.0f; }
@@ -490,7 +490,7 @@ public:
/**
* return the current mouse y value normalized to the range of -1 to 1.
* -1 would be the bottom of the window.
* 0.0 would be the middle of the window.
* 0.0 would be the middle of the window.
* +1 would be the top of the window.
*/
inline float getYnormalized() const
@@ -571,16 +571,16 @@ public:
const osg::Matrix getPenOrientation() const;
void addTouchPoint(unsigned int id, TouchPhase phase, float x, float y, unsigned int tapCount = 0);
TouchData* getTouchData() const { return _touchData.get(); }
bool isMultiTouchEvent() const { return (_touchData.valid()); }
protected:
/** Force users to create on heap, so that multiple referencing is safe.*/
virtual ~GUIEventAdapter();
mutable bool _handled;
mutable bool _handled;
EventType _eventType;
double _time;
@@ -621,8 +621,8 @@ public:
TabletPen(const TabletPen& rhs) : pressure(rhs.pressure), tiltX(rhs.tiltX), tiltY(rhs.tiltY), rotation(rhs.rotation), tabletPointerType(rhs.tabletPointerType) {}
};
TabletPen _tabletPen;
osg::ref_ptr<TouchData> _touchData;
osg::ref_ptr<TouchData> _touchData;
};
}