You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
531 B
28 lines
531 B
10 years ago
|
#ifndef WORLD_WORLD_HPP
|
||
|
#define WORLD_WORLD_HPP
|
||
|
|
||
|
#include <string>
|
||
|
#include <vector>
|
||
|
|
||
|
class float2;
|
||
|
|
||
|
class MarchingSquares {
|
||
|
enum CellType { FREE, SOLID, DESTROYABLE };
|
||
|
|
||
|
public:
|
||
|
MarchingSquares();
|
||
|
|
||
|
void ReadImage(const std::string& filename);
|
||
|
std::vector< std::pair<float2, float2> > RunMarchingSquares();
|
||
|
|
||
|
private:
|
||
|
|
||
|
std::size_t width_;
|
||
|
std::size_t height_;
|
||
|
std::vector<CellType> cells_;
|
||
|
};
|
||
|
|
||
|
std::string dumpLinesToHtml(const std::vector< std::pair<float2, float2> >& lines, int w, int h);
|
||
|
|
||
|
#endif // WORLD_WORLD_HPP
|