]> git.mxchange.org Git - simgear.git/blob - simgear/scene/model/SGPickAnimation.hxx
Support preview mode in the model loader.
[simgear.git] / simgear / scene / model / SGPickAnimation.hxx
1 /* -*-c++-*-
2  *
3  * Copyright (C) 2013 James Turner
4  *
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.
9  *
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.
14  *
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,
18  * MA 02110-1301, USA.
19  *
20  */
21      
22 #ifndef SG_SCENE_PICK_ANIMATION_HXX
23 #define SG_SCENE_PICK_ANIMATION_HXX
24
25 #include <simgear/scene/model/animation.hxx>
26
27 // forward decls
28 class SGPickCallback;
29
30 //////////////////////////////////////////////////////////////////////
31 // Pick animation
32 //////////////////////////////////////////////////////////////////////
33
34 class SGPickAnimation : public SGAnimation {
35 public:
36   SGPickAnimation(const SGPropertyNode* configNode,
37                   SGPropertyNode* modelRoot);
38   virtual osg::Group* createAnimationGroup(osg::Group& parent);
39     
40     
41 protected:
42     void innerSetupPickGroup(osg::Group* commonGroup, osg::Group& parent);
43     
44 private:
45   class PickCallback;
46   class VncCallback;
47 };
48
49
50 class SGKnobAnimation : public SGPickAnimation
51 {
52 public:
53     SGKnobAnimation(const SGPropertyNode* configNode,
54                     SGPropertyNode* modelRoot);
55     virtual osg::Group* createAnimationGroup(osg::Group& parent);
56
57 private:
58     class KnobPickCallback;
59     class UpdateCallback;
60     
61     SGVec3d _axis;
62     SGVec3d _center;
63     SGSharedPtr<SGExpressiond const> _animationValue;
64 };
65
66 #endif // of SG_SCENE_PICK_ANIMATION_HXX
67