quickhull/Display.h

37 lines
643 B
C
Raw Normal View History

2020-11-18 18:01:57 +01:00
#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>
2020-11-18 18:01:57 +01:00
2020-11-19 09:46:02 +01:00
class Point;
#define OFFSET 10
2020-11-18 18:01:57 +01:00
#define WIDTH 800
#define HEIGHT 600
class Display
{
2020-11-19 09:46:02 +01:00
private:
sf::Font m_font;
sf::Text m_textStatus;
2020-11-19 09:46:02 +01:00
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();
2020-11-19 09:46:02 +01:00
2020-11-18 18:01:57 +01:00
public:
Display();
2020-11-18 18:01:57 +01:00
void show();
2020-11-19 09:46:02 +01:00
void setData (std::vector<Point>);
};
#endif // DISPLAY_H