~ubuntu-branches/ubuntu/vivid/mygui/vivid

« back to all changes in this revision

Viewing changes to UnitTests/UnitTest_TextureAnimations/WobbleNodeAnimator.h

  • Committer: Package Import Robot
  • Author(s): Scott Howard, Bret Curtis, Scott Howard
  • Date: 2014-09-18 17:57:48 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140918175748-dd8va78mvpw1jbes
Tags: 3.2.1-1
[ Bret Curtis ]
* Updated license for majority of files from LGPL to Expat (MIT)

[ Scott Howard ]
* New upstream release
* Updated patch to add build option for system GLEW libraries
* All patches accepted upstream except shared_libraries.patch
* Bumped SONAME due to dropped symbols, updated *.symbols and package
  names
* Updated license of debian/* to Expat with permission of all authors
* Don't install Doxygen autogenerated md5 and map files (thanks
  lintian)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*!
2
 
        @file
3
 
        @author     Albert Semenov
4
 
        @date       08/2008
5
 
*/
6
 
#ifndef __WOBBLE_NODE_ANIMATOR_H__
7
 
#define __WOBBLE_NODE_ANIMATOR_H__
8
 
 
9
 
#include <MyGUI.h>
10
 
#include "MyGUI_LayerNodeAnimation.h"
11
 
#include "MyGUI_VertexData.h"
12
 
#include "MyGUI_RTTLayerNode.h"
13
 
#include "Tesselator.h"
14
 
 
15
 
namespace demo
16
 
{
17
 
 
18
 
        class WobbleNodeAnimator :
19
 
                public MyGUI::LayerNodeAnimation,
20
 
                public Tesselator
21
 
        {
22
 
                MYGUI_RTTI_DERIVED( WobbleNodeAnimator )
23
 
 
24
 
        public:
25
 
                WobbleNodeAnimator();
26
 
 
27
 
                virtual void attach(MyGUI::ILayerNode* _node);
28
 
 
29
 
                virtual void create();
30
 
                virtual void destroy();
31
 
 
32
 
                virtual size_t animate(
33
 
                        bool _update,
34
 
                        size_t _quad_count,
35
 
                        MyGUI::VectorQuadData& _data,
36
 
                        float _time,
37
 
                        MyGUI::IVertexBuffer* _buffer,
38
 
                        MyGUI::ITexture* _texture,
39
 
                        const MyGUI::RenderTargetInfo& _info,
40
 
                        const MyGUI::IntCoord& _coord,
41
 
                        bool& _isAnimate
42
 
                );
43
 
 
44
 
        private:
45
 
                void addInertia(const MyGUI::FloatPoint& _value);
46
 
                void addTime(float _time);
47
 
                void buildQuadVertex(MyGUI::VectorQuadData& _data);
48
 
 
49
 
                virtual void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version);
50
 
 
51
 
        private:
52
 
                MyGUI::IntCoord mOldCoord;
53
 
 
54
 
                MyGUI::FloatPoint mInertia;
55
 
                MyGUI::FloatPoint mInertiaPoint;
56
 
                MyGUI::FloatPoint mDragOffset;
57
 
 
58
 
                bool mInertiaMode;
59
 
                float mDragStrength;
60
 
                float mResizeStrength;
61
 
                bool mDestroy;
62
 
        };
63
 
 
64
 
}
65
 
 
66
 
#endif // __WOBBLE_NODE_ANIMATOR_H__
 
1
/*!
 
2
        @file
 
3
        @author     Albert Semenov
 
4
        @date       08/2008
 
5
*/
 
6
#ifndef __WOBBLE_NODE_ANIMATOR_H__
 
7
#define __WOBBLE_NODE_ANIMATOR_H__
 
8
 
 
9
#include <MyGUI.h>
 
10
#include "MyGUI_LayerNodeAnimation.h"
 
11
#include "MyGUI_VertexData.h"
 
12
#include "MyGUI_RTTLayerNode.h"
 
13
#include "Tesselator.h"
 
14
 
 
15
namespace demo
 
16
{
 
17
 
 
18
        class WobbleNodeAnimator :
 
19
                public MyGUI::LayerNodeAnimation,
 
20
                public Tesselator
 
21
        {
 
22
                MYGUI_RTTI_DERIVED( WobbleNodeAnimator )
 
23
 
 
24
        public:
 
25
                WobbleNodeAnimator();
 
26
 
 
27
                virtual void attach(MyGUI::ILayerNode* _node);
 
28
 
 
29
                virtual void create();
 
30
                virtual void destroy();
 
31
 
 
32
                virtual size_t animate(
 
33
                        bool _update,
 
34
                        size_t _quad_count,
 
35
                        MyGUI::VectorQuadData& _data,
 
36
                        float _time,
 
37
                        MyGUI::IVertexBuffer* _buffer,
 
38
                        MyGUI::ITexture* _texture,
 
39
                        const MyGUI::RenderTargetInfo& _info,
 
40
                        const MyGUI::IntCoord& _coord,
 
41
                        bool& _isAnimate
 
42
                );
 
43
 
 
44
        private:
 
45
                void addInertia(const MyGUI::FloatPoint& _value);
 
46
                void addTime(float _time);
 
47
                void buildQuadVertex(MyGUI::VectorQuadData& _data);
 
48
 
 
49
                virtual void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version);
 
50
 
 
51
        private:
 
52
                MyGUI::IntCoord mOldCoord;
 
53
 
 
54
                MyGUI::FloatPoint mInertia;
 
55
                MyGUI::FloatPoint mInertiaPoint;
 
56
                MyGUI::FloatPoint mDragOffset;
 
57
 
 
58
                bool mInertiaMode;
 
59
                float mDragStrength;
 
60
                float mResizeStrength;
 
61
                bool mDestroy;
 
62
        };
 
63
 
 
64
}
 
65
 
 
66
#endif // __WOBBLE_NODE_ANIMATOR_H__