![]() |
Dragonfly 4.22
A text-based game engine
|
Public Member Functions | |
| Line (Vector init_p1, Vector init_p2) | |
| Line () | |
| void | setP1 (Vector new_p1) |
| Vector | getP1 () const |
| void | setP2 (Vector new_p2) |
| Vector | getP2 () const |
| std::string | toString () const |
| void | draw () const |
Private Attributes | |
| Vector | m_p1 |
| Vector | m_p2 |
| df::Line::Line | ( | ) |
Default line segment is at (0,0).
| void df::Line::draw | ( | ) | const |
Draw pixel line.
| Vector df::Line::getP1 | ( | ) | const |
Get first endpoint.
| Vector df::Line::getP2 | ( | ) | const |
Get second endpoint.
| void df::Line::setP1 | ( | Vector | new_p1 | ) |
Set first endpoint.
| void df::Line::setP2 | ( | Vector | new_p2 | ) |
Set second endpoint.
| std::string df::Line::toString | ( | ) | const |
Return attributes as string.
|
private |
First endpoint.
|
private |
Second endpoint.