summaryrefslogtreecommitdiffstats
path: root/VertexProvider.h
blob: a1ec4eb0ebf998967a1e88707b31f625f0464e05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef VERTEXPROVIDER_H_
#define VERTEXPROVIDER_H_

#include "Vertex.h"


class LevelVertex;

class VertexProvider {
  public:
    virtual ~VertexProvider() {}
    
    virtual const Vertex* getVertex(size_t id) const = 0;
    virtual size_t getVertexCount() const = 0;
    
    virtual void moveVertex(size_t id, float x, float y) {}
    virtual void rotateVertex(size_t id, Vertex m, float a) {}
    
    virtual bool canConnectVertex(size_t id) const {return false;}
    virtual size_t connectVertex(size_t id) {return id;}
};

#endif /*VERTEXPROVIDER_H_*/