CCIMXDesktop
 
Loading...
Searching...
No Matches
FigureFrameFetcher.h
Go to the documentation of this file.
1
6#ifndef FIGUREFRAMEFETCHER_H
7#define FIGUREFRAMEFETCHER_H
8
9#include "core/FrameProvider.h"
10
16 Q_OBJECT
17public:
21 enum class State {
22 NORMAL,
23 LAY
24 };
25
30 void set_frame_state(State s) { this->s = s; }
31
37 explicit DinasourFrameFetcher(const QString& valid_base_path, QObject* parent);
38
43 QRect& src_bounding_rect() override;
44
45private:
49 QRect src_rect;
50
54 State s;
55};
56
62 Q_OBJECT
63public:
69 explicit ObstacleBaseFrameFetch(const QString& valid_base_path, QObject* parent);
70
75 virtual QRect& src_bounding_rect() = 0;
76
77private:
81 QRect src_rect;
82};
83
89 Q_OBJECT
90public:
96 explicit CactusFrameFetch(const QString& valid_base_path, QObject* parent);
97
102 QRect& src_bounding_rect() override { return src_rect; }
103
104private:
108 QRect src_rect;
109};
110
116 Q_OBJECT
117public:
123 explicit BirdFrameFetch(const QString& valid_base_path, QObject* parent);
124
129 QRect& src_bounding_rect() override { return src_rect; }
130
131private:
135 QRect src_rect;
136};
137
138#endif // FIGUREFRAMEFETCHER_H
Frame fetcher for bird-type obstacles.
Definition FigureFrameFetcher.h:115
QRect & src_bounding_rect() override
Returns the source bounding rectangle.
Definition FigureFrameFetcher.h:129
Frame fetcher for cactus-type obstacles.
Definition FigureFrameFetcher.h:88
QRect & src_bounding_rect() override
Returns the source bounding rectangle.
Definition FigureFrameFetcher.h:102
Provides frame data for the dinosaur character based on its state.
Definition FigureFrameFetcher.h:15
void set_frame_state(State s)
Sets the current frame state.
Definition FigureFrameFetcher.h:30
QRect & src_bounding_rect() override
Returns the current source bounding rectangle.
Definition FigureFrameFetcher.cpp:10
State
States the dinosaur character can be in.
Definition FigureFrameFetcher.h:21
@ LAY
Crouching/laying state.
@ NORMAL
Normal standing/running state.
Provides and manages frame sources for image processing.
Definition FrameProvider.h:12
Abstract base class for obstacle frame providers.
Definition FigureFrameFetcher.h:61
virtual QRect & src_bounding_rect()=0
Returns the source bounding rectangle.