#include <line.h>
Collaboration diagram for mimas::line:
Public Types | |
typedef boost::numeric::ublas::vector< double > | Vector |
Public Member Functions | |
line (void) | |
line (double sx, double sy, double ex, double ey) | |
line (const Vector &_start, const Vector &_end) | |
Vector | getVector (void) const |
Vector | findMidPoint (void) const |
Vector | getIntersection (const line &l2, bool *on_this_line, bool *on_that_line) const |
Vector | getIntersectionAngle (const line &l2, angle *retval) const |
const Vector & | getStart (void) const |
const Vector & | getEnd (void) const |
Vector & | getStart (void) |
Vector & | getEnd (void) |
double | length (void) const |
angle | getAngle (const line &l) const |
removing the vectors-as-pointers. this cuts down on the number of new's and delete's we need to do and speed things up loads. Ive removed the base class too for now. there doesn't really seem to be much need for it, and again, it slows down construction times.
I'll leave you to work this one out. There should be lots of overloaded operators for lines too, but i havent got around to it yet.
Definition at line 29 of file line.h.
typedef boost::numeric::ublas::vector< double > mimas::line::Vector |
Vector mimas::line::getIntersection | ( | const line & | l2, | |
bool * | on_this_line, | |||
bool * | on_that_line | |||
) | const |
double mimas::line::length | ( | void | ) | const [inline] |