Added ChainShape:getNext/PreviousVertex (see issue #1191). Thanks airstruck!

This commit is contained in:
Alex Szpakowski
2016-07-31 14:25:12 -03:00
parent 55cb2fad84
commit 3157e5df7b
3 changed files with 80 additions and 0 deletions
+24
View File
@@ -63,6 +63,30 @@ public:
**/
void setPreviousVertex(float x, float y);
/**
* Returns whether a vertex that follows the last vertex exists.
* @returns True if specified vertex exists, else false.
**/
bool hasNextVertex() const;
/**
* Returns whether a vertex that precedes the first vertex exists.
* @returns True if specified vertex exists, else false.
**/
bool hasPreviousVertex() const;
/**
* Returns the vertex that follows the last vertex.
* @returns The specified vertex.
**/
b2Vec2 getNextVertex() const;
/**
* Returns the vertex that precedes the first vertex.
* @returns The specified vertex.
**/
b2Vec2 getPreviousVertex() const;
/**
* Returns a child EdgeShape.
* @param index The index of the child shape.