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,13 +1,13 @@
/* -*-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.
*/
@@ -34,16 +34,16 @@ namespace osgGA{
class OSGGA_EXPORT AnimationPathManipulator : public CameraManipulator
{
public:
AnimationPathManipulator( osg::AnimationPath* animationPath=0 );
AnimationPathManipulator( const std::string& filename );
virtual const char* className() const { return "AnimationPath"; }
void setTimeScale(double s) { _timeScale = s; }
double getTimeScale() const { return _timeScale; }
void setTimeOffset(double o) { _timeOffset = o; }
double getTimeOffset() const { return _timeOffset; }
@@ -58,7 +58,7 @@ class OSGGA_EXPORT AnimationPathManipulator : public CameraManipulator
void setPrintOutTimingInfo(bool printOutTimingInfo) { _printOutTimingInfo=printOutTimingInfo; }
bool getPrintOutTimingInfo() const { return _printOutTimingInfo; }
/** set the position of the matrix manipulator using a 4x4 Matrix.*/
virtual void setByMatrix(const osg::Matrixd& matrix) { _matrix = matrix; }
@@ -69,13 +69,13 @@ class OSGGA_EXPORT AnimationPathManipulator : public CameraManipulator
virtual osg::Matrixd getMatrix() const { return _matrix; }
/** get the position of the manipulator as a inverse matrix of the manipulator, typically used as a model view matrix.*/
virtual osg::Matrixd getInverseMatrix() const { return osg::Matrixd::inverse(_matrix); }
virtual osg::Matrixd getInverseMatrix() const { return osg::Matrixd::inverse(_matrix); }
void setAnimationPath( osg::AnimationPath* animationPath ) { _animationPath=animationPath; }
osg::AnimationPath* getAnimationPath() { return _animationPath.get(); }
const osg::AnimationPath* getAnimationPath() const { return _animationPath.get(); }
bool valid() const { return _animationPath.valid(); }
@@ -89,17 +89,17 @@ class OSGGA_EXPORT AnimationPathManipulator : public CameraManipulator
/** Get the keyboard and mouse usage of this manipulator.*/
virtual void getUsage(osg::ApplicationUsage& usage) const;
protected:
bool _valid;
bool _printOutTimingInfo;
void handleFrame( double time );
osg::ref_ptr<osg::AnimationPath> _animationPath;
double _timeOffset;
double _timeScale;
@@ -107,11 +107,11 @@ class OSGGA_EXPORT AnimationPathManipulator : public CameraManipulator
double _pauseTime;
bool _isPaused;
double _realStartOfTimedPeriod;
double _animStartOfTimedPeriod;
int _numOfFramesSinceStartOfTimedPeriod;
osg::Matrixd _matrix;
};

View File

@@ -1,13 +1,13 @@
/* -*-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.
*/
@@ -40,7 +40,7 @@ class OSGGA_EXPORT CameraViewSwitchManipulator : public CameraManipulator
virtual osg::Matrixd getInverseMatrix() const;
/** Attach a node to the manipulator.
/** Attach a node to the manipulator.
Automatically detaches previously attached node.
setNode(NULL) detaches previously nodes.
Is ignored by manipulators which do not require a reference model.*/
@@ -51,7 +51,7 @@ class OSGGA_EXPORT CameraViewSwitchManipulator : public CameraManipulator
/** Return node if attached.*/
virtual osg::Node* getNode() { return _node.get();}
/** Start/restart the manipulator.*/
virtual void init(const GUIEventAdapter& /*ea*/,GUIActionAdapter& /*aa*/) { _currentView = 0; }

View File

@@ -1,13 +1,13 @@
/* -*-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.
*/
@@ -25,7 +25,7 @@
namespace osgGA {
/**
* EventQueue implementation for collecting and adapting windowing events
* EventQueue implementation for collecting and adapting windowing events
*/
class OSGGA_EXPORT EventQueue : public osg::Referenced
{
@@ -34,7 +34,7 @@ class OSGGA_EXPORT EventQueue : public osg::Referenced
EventQueue(GUIEventAdapter::MouseYOrientation mouseYOrientation=GUIEventAdapter::Y_INCREASING_DOWNWARDS);
typedef std::list< osg::ref_ptr<GUIEventAdapter> > Events;
/** Set events.*/
void setEvents(Events& events);
@@ -79,21 +79,21 @@ class OSGGA_EXPORT EventQueue : public osg::Referenced
/** Method for adapting mouse scroll wheel events, placing this event on the back of the event queue. */
void mouseScroll(GUIEventAdapter::ScrollingMotion sm) { mouseScroll(sm,getTime()); }
/** Method for adapting mouse scroll wheel events, placing this event on the back of the event queue, with specified time. */
void mouseScroll(GUIEventAdapter::ScrollingMotion sm, double time);
/** Method for adapting mouse scroll wheel events, placing this event on the back of the event queue. */
void mouseScroll2D(float x, float y) { mouseScroll2D(x, y, getTime()); }
/** Method for adapting mouse scroll wheel events, placing this event on the back of the event queue. */
void mouseScroll2D(float x, float y, double time);
/** Method for adapting pen pressure events, placing this event on the back of the event queue.*/
void penPressure(float pressure) { penPressure(pressure, getTime()); }
/** Method for adapting pen pressure events, placing this event on the back of the event queue, with specified time.*/
void penPressure(float pressure, double time);
@@ -102,7 +102,7 @@ class OSGGA_EXPORT EventQueue : public osg::Referenced
/** Method for adapting pen orientation events, placing this event on the back of the event queue, with specified time.*/
void penOrientation(float tiltX, float tiltY, float rotation, double time);
/** Method for adapting pen proximity events, placing this event on the back of the event queue.*/
void penProximity(GUIEventAdapter::TabletPointerType pt, bool isEntering) { penProximity(pt, isEntering, getTime()); }
@@ -133,11 +133,11 @@ class OSGGA_EXPORT EventQueue : public osg::Referenced
/** Method for adapting mouse button pressed events, placing this event on the back of the event queue.
* Button numbering is 1 for left mouse button, 2 for middle, 3 for right. */
void mouseDoubleButtonPress(float x, float y, unsigned int button) { mouseDoubleButtonPress(x, y, button, getTime()); }
/** Method for adapting mouse button pressed events, placing this event on the back of the event queue, with specified time.
* Button numbering is 1 for left mouse button, 2 for middle, 3 for right. */
void mouseDoubleButtonPress(float x, float y, unsigned int button, double time);
/** Method for adapting mouse button release events, placing this event on the back of the event queue.
* Button numbering is 1 for left mouse button, 2 for middle, 3 for right. */
@@ -160,22 +160,22 @@ class OSGGA_EXPORT EventQueue : public osg::Referenced
/** Method for adapting keyboard press events. Note, special keys such as Ctrl/Function keys should be adapted to GUIEventAdapter::KeySymbol mappings, with specified time.*/
void keyRelease(int key, double time, int unmodifiedKey = 0);
GUIEventAdapter* touchBegan(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y, double time);
GUIEventAdapter* touchBegan(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y) {
return touchBegan(id, phase, x, y, getTime());
}
GUIEventAdapter* touchMoved(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y, double time);
GUIEventAdapter* touchMoved(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y) {
return touchMoved(id, phase, x, y, getTime());
}
GUIEventAdapter* touchEnded(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y, unsigned int tap_count, double time);
GUIEventAdapter* touchEnded(unsigned int id, GUIEventAdapter::TouchPhase phase, float x, float y, unsigned int tap_count) {
return touchEnded(id, phase, x, y, tap_count, getTime());
}
/** Method for adapting close window events.*/
@@ -194,7 +194,7 @@ class OSGGA_EXPORT EventQueue : public osg::Referenced
/** Method for adapting frame events.*/
void frame(double time);
void setStartTick(osg::Timer_t tick) { _startTick = tick; clear(); }
osg::Timer_t getStartTick() const { return _startTick; }
@@ -206,8 +206,8 @@ class OSGGA_EXPORT EventQueue : public osg::Referenced
/** convenience method for create an event ready to fill in. Clones the getCurrentEventState() to produce a up to date event state. */
GUIEventAdapter* createEvent();
void setCurrentEventState(GUIEventAdapter* ea) { _accumulateEventState = ea; }
GUIEventAdapter* getCurrentEventState() { return _accumulateEventState.get(); }
const GUIEventAdapter* getCurrentEventState() const { return _accumulateEventState.get(); }
@@ -227,7 +227,7 @@ class OSGGA_EXPORT EventQueue : public osg::Referenced
/** Prevent unwanted copy operator.*/
EventQueue& operator = (const EventQueue&) { return *this; }
osg::ref_ptr<GUIEventAdapter> _accumulateEventState;
bool _useFixedMouseInputRange;
@@ -236,7 +236,7 @@ class OSGGA_EXPORT EventQueue : public osg::Referenced
mutable OpenThreads::Mutex _eventQueueMutex;
Events _eventQueue;
bool _firstTouchEmulatesMouse;
};
}

View File

@@ -1,13 +1,13 @@
/* -*-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.
*/
@@ -34,7 +34,7 @@ namespace osgGA {
/**
* Basic EventVisitor implementation for animating a scene.
* This visitor traverses the scene graph, calling each nodes appCallback if
* it exists.
* it exists.
*/
class OSGGA_EXPORT EventVisitor : public osg::NodeVisitor
{
@@ -42,41 +42,41 @@ class OSGGA_EXPORT EventVisitor : public osg::NodeVisitor
EventVisitor();
virtual ~EventVisitor();
META_NodeVisitor("osgGA","EventVisitor")
void setActionAdapter(osgGA::GUIActionAdapter* actionAdapter) { _actionAdapter=actionAdapter; }
osgGA::GUIActionAdapter* getActionAdapter() { return _actionAdapter; }
const osgGA::GUIActionAdapter* getActionAdapter() const { return _actionAdapter; }
typedef std::list< osg::ref_ptr<GUIEventAdapter> > EventList;
void addEvent(GUIEventAdapter* event);
void removeEvent(GUIEventAdapter* event);
void setEventHandled(bool handled) { _handled = handled; }
bool getEventHandled() const { return _handled; }
void setEvents(const EventQueue::Events& events) { _events = events; }
EventQueue::Events& getEvents() { return _events; }
const EventQueue::Events& getEvents() const { return _events; }
public:
virtual void reset();
/** During traversal each type of node calls its callbacks and its children traversed. */
virtual void apply(osg::Node& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::Geode& node) { handle_geode_callbacks(node); }
virtual void apply(osg::Billboard& node) { handle_geode_callbacks(node); }
virtual void apply(osg::LightSource& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::Group& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::Transform& node) { handle_callbacks_and_traverse(node); }
virtual void apply(osg::Projection& node) { handle_callbacks_and_traverse(node); }
@@ -89,7 +89,7 @@ class OSGGA_EXPORT EventVisitor : public osg::NodeVisitor
/** Prevent unwanted copy operator.*/
EventVisitor& operator = (const EventVisitor&) { return *this; }
inline void handle_callbacks(osg::StateSet* stateset)
{
if (stateset && stateset->requiresEventTraversal())
@@ -113,14 +113,14 @@ class OSGGA_EXPORT EventVisitor : public osg::NodeVisitor
osg::NodeCallback* callback = node.getEventCallback();
if (callback) (*callback)(&node,this);
/*else if (node.getNumChildrenRequiringEventTraversal()>0)*/
/*else if (node.getNumChildrenRequiringEventTraversal()>0)*/
traverseGeode(node);
}
inline void traverseGeode(osg::Geode& geode)
{
traverse((osg::Node&)geode);
// Call the app callbacks on the drawables.
for(unsigned int i=0;i<geode.getNumDrawables();++i)
{
@@ -130,14 +130,14 @@ class OSGGA_EXPORT EventVisitor : public osg::NodeVisitor
handle_callbacks(geode.getDrawable(i)->getStateSet());
}
}
osgGA::GUIActionAdapter* _actionAdapter;
osg::ref_ptr<GUIEventAdapter> _accumulateEventState;
bool _handled;
EventQueue::Events _events;
};
}

View File

@@ -1,13 +1,13 @@
/* -*-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.
*/
@@ -37,8 +37,8 @@
# define OSGGA_EXPORT __declspec(dllimport)
#endif
#else
#define OSGGA_EXPORT
#endif
#define OSGGA_EXPORT
#endif
#endif

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_GUIACTIONADAPTER
#define OSGGA_GUIACTIONADAPTER 1
#define OSGGA_GUIACTIONADAPTER 1
#include <osgGA/Export>
#include <osg/View>
@@ -34,7 +34,7 @@ GUIEventHandler issues it's request via a GUIActionAdapter, and the viewer
in use should honour the request, using the GUI system in play.
There is more than one way of using the GUIActionAdapter. E.g. it may be inherited
into a Viewer class, as is done with osgGLUT::Viewer. Alternatively, a simple
into a Viewer class, as is done with osgGLUT::Viewer. Alternatively, a simple
subclass of GUIActionAdapter (e.g. osgQt::QtActionAdapter) may be passed to
the GUIEventHandler::handle() function; once the function has returned, the viewer
will then unpack the results and work out what to do to respond to the
@@ -56,20 +56,20 @@ class GUIActionAdapter
{
public:
virtual ~GUIActionAdapter() {}
/** Provide a mechanism for getting the osg::View associated with this GUIActionAdapter.
* One would use this to case view to osgViewer::View(er) if supported by the subclass.*/
virtual osg::View* asView() { return 0; }
/**
requestRedraw() requests a single redraw.
*/
virtual void requestRedraw() = 0;
/**
requestContinousUpdate(bool) is for en/disabling a throw or idle
requestContinousUpdate(bool) is for en/disabling a throw or idle
callback to be requested by a GUIEventHandler (typically a MatrixManipulator,
though other GUIEventHandler's may also provide functionality).
though other GUIEventHandler's may also provide functionality).
GUI toolkits can respond to this immediately by registering an idle/timed
callback, or can delay setting the callback and update at their own leisure.
*/

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;
};
}

View File

@@ -1,13 +1,13 @@
/* -*-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.
*/
@@ -89,7 +89,7 @@ public:
/** Deprecated, Handle events, return true if handled, false otherwise. */
virtual bool handle(const GUIEventAdapter&,GUIActionAdapter&) { return false; }
/** Convenience method that only passes on to the handle(,) method events that either haven't been
* handled yet, or have been handled but haven't be set to be ignored by the IgnoreHandledEventsMask.
* Note, this method is an inline method, and not appropriate for users to override, override the handle(,)
@@ -108,7 +108,7 @@ public:
return false;
}
}
/** Get the keyboard and mouse usage of this manipulator.*/
virtual void getUsage(osg::ApplicationUsage&) const {}

View File

@@ -31,13 +31,13 @@ class OSGGA_EXPORT MultiTouchTrackballManipulator : public TrackballManipulator
const osg::CopyOp& copyOp = osg::CopyOp::SHALLOW_COPY );
META_Object( osgGA, MultiTouchTrackballManipulator );
bool handle( const GUIEventAdapter& ea, GUIActionAdapter& us );
protected:
void handleMultiTouchDrag(GUIEventAdapter::TouchData* now, GUIEventAdapter::TouchData* last, const double eventTimeDelta);
osg::ref_ptr<GUIEventAdapter::TouchData> _lastTouchData;
};

View File

@@ -95,7 +95,7 @@ class OSGGA_EXPORT SphericalManipulator : public CameraManipulator
double getMinimumZoomScale() const { return _minimumZoomScale; }
/** set the minimum distance (as ratio) the eye point can be zoomed in towards the
center before the center is pushed forward.*/
center before the center is pushed forward.*/
void setMinimumZoomScale(double minimumZoomScale) {_minimumZoomScale=minimumZoomScale;}
@@ -159,7 +159,7 @@ class OSGGA_EXPORT SphericalManipulator : public CameraManipulator
* This is used to compute the delta in translation/rotation during a thrown display update.
* It allows us to match an delta in position/rotation independent of the rendering frame rate.
*/
double _delta_frame_time;
double _delta_frame_time;
/** The time the last frame started.
* Used when _rate_sensitive is true so that we can match display update rate to rotation/translation rate.

View File

@@ -1,13 +1,13 @@
/* -*-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.
*/
@@ -45,17 +45,17 @@ public:
/** get the attached a StateSet.*/
virtual const osg::StateSet * getStateSet() const;
/** Handle events, return true if handled, false otherwise.*/
virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us);
virtual bool handle(const GUIEventAdapter& ea,GUIActionAdapter& us);
/** Get the keyboard and mouse usage of this manipulator.*/
virtual void getUsage(osg::ApplicationUsage& usage) const;
void setMaximumNumOfTextureUnits(unsigned int i) { _maxNumOfTextureUnits = i; }
unsigned int getMaximumNumOfTextureUnits() const { return _maxNumOfTextureUnits; }
void setBackfaceEnabled(bool newbackface);
bool getBackfaceEnabled() const {return _backface;};
@@ -67,7 +67,7 @@ public:
void setPolygonMode(osg::PolygonMode::Mode newpolygonmode);
osg::PolygonMode::Mode getPolygonMode() const;
void cyclePolygonMode();
@@ -96,7 +96,7 @@ protected:
bool _lighting;
bool _texture;
unsigned int _maxNumOfTextureUnits;
int _keyEventToggleBackfaceCulling;
int _keyEventToggleLighting;
int _keyEventToggleTexturing;

View File

@@ -1,13 +1,13 @@
/* -*-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.
*/
@@ -24,9 +24,9 @@
\class osgGA::UFOManipulator
\brief A UFO manipulator driven with keybindings.
The UFOManipulator is better suited for applications that employ
The UFOManipulator is better suited for applications that employ
architectural walk-throughs, or situations where the eyepoint motion
model must move slowly, deliberately and well controlled.
model must move slowly, deliberately and well controlled.
The UFO Manipulator allows the following movements with the listed
Key combinations:
@@ -65,7 +65,7 @@ class OSGGA_EXPORT UFOManipulator : public osgGA::CameraManipulator
*/
virtual const char* className() const;
/** Set the current position with a matrix
/** Set the current position with a matrix
\param matrix A viewpoint matrix.
*/
virtual void setByMatrix( const osg::Matrixd &matrix ) ;
@@ -92,7 +92,7 @@ class OSGGA_EXPORT UFOManipulator : public osgGA::CameraManipulator
/** Get the root node of the subgraph this manipulator is driving the eye through */
virtual osg::Node* getNode();
/** Computes the home position based on the extents and scale of the
/** Computes the home position based on the extents and scale of the
scene graph rooted at node */
virtual void computeHomePosition();

View File

@@ -1,13 +1,13 @@
/* -*-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.
*/