-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwing.hpp
More file actions
40 lines (27 loc) · 872 Bytes
/
wing.hpp
File metadata and controls
40 lines (27 loc) · 872 Bytes
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
37
38
39
40
#ifndef WING_HPP
#define WING_HPP
#include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Graphics/RenderStates.hpp>
#include <SFML/Graphics/Drawable.hpp>
#include <SFML/System/Vector2.hpp>
#include "line.hpp"
#include <vector>
class Wing : public sf::Drawable{
public:
sf::Vector2f& pos_;
float scale_;
//bool isInCollisionN = false;
//bool isInCollision[50] = {false};
Wing(sf::Vector2f pos, std::vector<sf::Vector2f*> pathPoints, float, sf::Color color);
void setOrigin();
std::vector<Line*>* getPath(){
return &path;
}
~Wing();
private:
std::vector<sf::Vector2f*> pathPoints_;
std::vector<Line*> path; // the path that defines the wing shape
//std::vector<Body> origins;
void draw(sf::RenderTarget& target, sf::RenderStates states) const override;
};
#endif // WING_HPP