This repository has been archived on 2025-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
neofx-zoomedit/Polygon.h

20 lines
373 B
C
Raw Normal View History

2007-09-16 19:06:02 +00:00
#ifndef POLYGON_H_
#define POLYGON_H_
#include "Vertex.h"
#include "Line.h"
#include <vector>
class Polygon : public std::vector<Vertex> {
private:
int quadrant(const Vertex &v) const;
public:
double area() const;
double perimeter() const;
bool contains(const Vertex &v) const;
2007-09-16 20:59:04 +00:00
bool intersects(const Line &l) const;
2007-09-16 19:06:02 +00:00
};
#endif /*POLYGON_H_*/