Dragonfly  4.3
A text-based game engine
Public Member Functions | Private Attributes | List of all members
df::Line Class Reference
Collaboration diagram for df::Line:
Collaboration graph

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

Private Attributes

Vector m_p1
Vector m_p2

Constructor & Destructor Documentation

df::Line::Line ( Vector  init_p1,
Vector  init_p2 

Create line segment from p1 to p2.

df::Line::Line ( )

Default line segment is at (0,0).

Member Function Documentation

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.

Member Data Documentation

Vector df::Line::m_p1

First endpoint.

Vector df::Line::m_p2

Second endpoint.