3 * Copyright (C) 2013 James Turner
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22 #ifndef SG_SCENE_PICK_ANIMATION_HXX
23 #define SG_SCENE_PICK_ANIMATION_HXX
25 #include <simgear/scene/model/animation.hxx>
30 //////////////////////////////////////////////////////////////////////
32 //////////////////////////////////////////////////////////////////////
34 class SGPickAnimation : public SGAnimation {
36 SGPickAnimation(const SGPropertyNode* configNode,
37 SGPropertyNode* modelRoot);
38 virtual osg::Group* createAnimationGroup(osg::Group& parent);
42 void innerSetupPickGroup(osg::Group* commonGroup, osg::Group& parent);
50 class SGKnobAnimation : public SGPickAnimation
53 SGKnobAnimation(const SGPropertyNode* configNode,
54 SGPropertyNode* modelRoot);
55 virtual osg::Group* createAnimationGroup(osg::Group& parent);
58 * by default mouse wheel up corresponds to increment (CW)
59 * and mouse-wheel down corresponds to decrement (CCW).
60 * Since no one can agree on that, make it a global toggle.
62 static void setAlternateMouseWheelDirection(bool aToggle);
65 * by default mouse is dragged left-right to change knobs.
66 * set this to true to default to up-down. Individual knobs
69 static void setAlternateDragAxis(bool aToggle);
73 * Scale the drag sensitivity. This provides a global hook for
74 * the user to scale the senstivity of dragging according to
75 * personal preference.
77 static void setDragSensitivity(double aFactor);
83 SGSharedPtr<SGExpressiond const> _animationValue;
86 class SGSliderAnimation : public SGPickAnimation
89 SGSliderAnimation(const SGPropertyNode* configNode,
90 SGPropertyNode* modelRoot);
91 virtual osg::Group* createAnimationGroup(osg::Group& parent);
97 SGSharedPtr<SGExpressiond const> _animationValue;
100 #endif // of SG_SCENE_PICK_ANIMATION_HXX