37 lines
643 B
C++
37 lines
643 B
C++
#pragma once
|
|
#ifndef DISPLAY_H
|
|
|
|
// make sure sfml is installed:
|
|
// linux - sudo apt-get install libsfml-dev
|
|
// windows - manual dl from https://www.sfml-dev.org/download.php
|
|
#include <SFML/Graphics.hpp>
|
|
|
|
class Point;
|
|
|
|
#define OFFSET 10
|
|
#define WIDTH 800
|
|
#define HEIGHT 600
|
|
|
|
class Display
|
|
{
|
|
private:
|
|
sf::Font m_font;
|
|
sf::Text m_textStatus;
|
|
|
|
std::vector<Point> m_points;
|
|
//std::vector<sf::Vertex> m_hull;
|
|
sf::VertexArray m_hull;
|
|
|
|
void drawPoint(sf::RenderWindow &, size_t);
|
|
|
|
int m_curStep = 0;
|
|
void update();
|
|
|
|
public:
|
|
Display();
|
|
|
|
void show();
|
|
|
|
void setData (std::vector<Point>);
|
|
};
|
|
#endif // DISPLAY_H
|