27 lines
458 B
C++
27 lines
458 B
C++
|
|
#ifndef POLYGON_H
|
|
#define POLYGON_H
|
|
|
|
#include <vector>
|
|
|
|
#include "refptr.h"
|
|
#include "Vector.h"
|
|
|
|
class Polygon : public std::vector< refptr<Vector> >
|
|
{
|
|
public:
|
|
Polygon & add(const Vector & v)
|
|
{
|
|
push_back(new Vector(v));
|
|
return *this;
|
|
}
|
|
Polygon & add(refptr<Vector> v)
|
|
{
|
|
push_back(v);
|
|
return *this;
|
|
}
|
|
bool containsPoint(const Vector & v);
|
|
};
|
|
|
|
#endif
|