This Class stores the methods to draw a Arrow with a start and end coordinate.
More...
#include <ArrowShape.h>
|
| ArrowShape () |
|
| ArrowShape (sf::Vector2f s, sf::Vector2f e, int sizeConstant, sf::Color col) |
|
void | setCoords (sf::Vector2f start, sf::Vector2f end) |
|
void | setProps (int sizeConstant, sf::Color col) |
|
void | Draw (sf::RenderWindow &window) |
|
sf::CircleShape | getShape () |
|
|
sf::RectangleShape | line |
| the line of the arrow
|
|
sf::CircleShape | tri |
| the front of the arrow (triangle)
|
|
This Class stores the methods to draw a Arrow with a start and end coordinate.
ArrowShape::ArrowShape |
( |
| ) |
|
The standard constructor. This does nothing.
ArrowShape::ArrowShape |
( |
sf::Vector2f |
s, |
|
|
sf::Vector2f |
e, |
|
|
int |
sizeConstant, |
|
|
sf::Color |
col |
|
) |
| |
The complete constructor, which initialize a arrow by start and end coords, with a specified color and in terms of the sizeConstant we know out of GraphRenderer.h
- Parameters
-
s | the start coords point of the arrow |
e | the end coords point of the arrow |
sizeConstant | an integer which scales the arrow |
col | the color of the arrow |
sf::CircleShape ArrowShape::getShape |
( |
| ) |
|
A method to return the front of the arrow
- Returns
- a CircleShape which is the triangle of the arrow
void ArrowShape::setCoords |
( |
sf::Vector2f |
start, |
|
|
sf::Vector2f |
end |
|
) |
| |
The function which initialize both shapes.
- Parameters
-
start | the start coords point of the arrow |
end | the end coords point of the arrow |
sizeConstant | an integer which scales the arrow |
col | the color of the arrow |
void ArrowShape::setProps |
( |
int |
sizeConstant, |
|
|
sf::Color |
col |
|
) |
| |
A Method to draw the initialized arrow in a specified window
- Parameters
-
window | a renderWindow that get the drawed arrowshape |
The documentation for this class was generated from the following files:
- src/visualization/ArrowShape.h
- src/visualization/ArrowShape.cc