mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Add EdgeShape:set/getNext/PreviousVertex. ChainShape:setNext/PreviousVertex can now take no arguments to disable ghost vertices.
Resolves issue #1191.
This commit is contained in:
@@ -54,6 +54,7 @@ public:
|
||||
* @param y The y-coordinate of the vertex.
|
||||
**/
|
||||
void setNextVertex(float x, float y);
|
||||
void setNextVertex();
|
||||
|
||||
/**
|
||||
* Establish connectivity to a vertex that precedes
|
||||
@@ -62,30 +63,17 @@ public:
|
||||
* @param y The y-coordinate of the vertex.
|
||||
**/
|
||||
void setPreviousVertex(float x, float y);
|
||||
void setPreviousVertex();
|
||||
|
||||
/**
|
||||
* Returns whether a vertex that follows the last vertex exists.
|
||||
* @returns True if specified vertex exists, else false.
|
||||
* Gets the vertex that follows the last vertex.
|
||||
**/
|
||||
bool hasNextVertex() const;
|
||||
bool getNextVertex(float &x, float &y) const;
|
||||
|
||||
/**
|
||||
* Returns whether a vertex that precedes the first vertex exists.
|
||||
* @returns True if specified vertex exists, else false.
|
||||
* Gets the vertex that precedes the first vertex.
|
||||
**/
|
||||
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;
|
||||
bool getPreviousVertex(float &x, float &y) const;
|
||||
|
||||
/**
|
||||
* Returns a child EdgeShape.
|
||||
|
||||
Reference in New Issue
Block a user