File: cube.hpp

package info (click to toggle)
wayfire 0.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,764 kB
  • sloc: cpp: 52,464; xml: 2,987; ansic: 699; makefile: 161
file content (36 lines) | stat: -rw-r--r-- 887 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef WF_CUBE_HPP
#define WF_CUBE_HPP

#include <config.h>
#include <wayfire/option-wrapper.hpp>
#include <wayfire/util/duration.hpp>
#include <wayfire/util/log.hpp>
#include <wayfire/opengl.hpp>

#define TEX_ERROR_FLAG_COLOR  0, 1, 0, 1

using namespace wf::animation;

class cube_animation_t : public duration_t
{
  public:
    using duration_t::duration_t;
    timed_transition_t offset_y{*this};
    timed_transition_t offset_z{*this};
    timed_transition_t rotation{*this};
    timed_transition_t zoom{*this};
    timed_transition_t ease_deformation{*this};
};

struct wf_cube_animation_attribs
{
    wf::option_wrapper_t<wf::animation_description_t> animation_duration{"cube/initial_animation"};
    cube_animation_t cube_animation{animation_duration};

    glm::mat4 projection, view;
    float side_angle;

    bool in_exit;
};

#endif /* end of include guard: WF_CUBE_HPP */