diff options
author | neoraider <devnull@localhost> | 2008-02-18 21:22:05 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2008-02-18 21:22:05 +0100 |
commit | 4c9b0f34f8ebd9cc5a00e49f39e7c9fddda08ec1 (patch) | |
tree | 75a46e2976c2d536957d7b50b5042cfcd6f94112 /Portal.h | |
parent | 77b187b8eba7598fb6154da5d3d62ad0920eac15 (diff) | |
download | zoomedit-4c9b0f34f8ebd9cc5a00e49f39e7c9fddda08ec1.tar zoomedit-4c9b0f34f8ebd9cc5a00e49f39e7c9fddda08ec1.zip |
zoomedit: Added some features like hover filters and connectable vertices.
Diffstat (limited to 'Portal.h')
-rw-r--r-- | Portal.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -16,6 +16,7 @@ class Portal : public LevelObject, public VertexProvider { Vertex vertices[4]; float s, c; + bool connected[4]; void updateVertices() { @@ -54,6 +55,10 @@ class Portal : public LevelObject, public VertexProvider { orient = 0; + for(int i = 0; i < 4; i++) { + connected[i] = false; + } + updateOrient(); } @@ -109,13 +114,25 @@ class Portal : public LevelObject, public VertexProvider { return 1; } + virtual bool canMove() const {return true;} + virtual void moveVertex(size_t id, float x, float y) { move(x, y); } + virtual bool canRotate() const {return true;} + virtual void rotateVertex(size_t id, Vertex m, float a) { rotate(m, a); } + + virtual bool canConnectVertex(size_t id) const { + return !connected[id]; + } + + virtual void connectVertex(size_t id) { + connected[id] = true; + } }; #endif /*PORTAL_H_*/ |