Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Teddy::Models::Line Class Reference

Line Element. More...

#include <Line.h>

Inheritance diagram for Teddy::Models::Line:

Inheritance graph
[legend]
Collaboration diagram for Teddy::Models::Line:

Collaboration graph
[legend]
List of all members.

Public Methods

 Line (Vertex *v1, Vertex *v2)
 Constructor, set start and end vertex pointers. More...

 Line (const Line &l)
 Copy-Constructor, clears state. More...

virtual void draw (Projection *p)
virtual void swap ()
 Swap start and end point vertices. More...

bool operator== (const Line &l) const
bool operator!= (const Line &l) const
 Compare inequality. Like operator==(), must use shared vertices... More...


Public Attributes

Vertexstart_point
Vertexend_point

Detailed Description

Line Element.

Line is simple thin line defined by two points.

Definition at line 44 of file Line.h.


Constructor & Destructor Documentation

Teddy::Models::Line::Line Vertex   v1,
Vertex   v2
 

Constructor, set start and end vertex pointers.

Definition at line 34 of file Line.cpp.

References end_point, and start_point.

Teddy::Models::Line::Line const Line &    l
 

Copy-Constructor, clears state.

Definition at line 41 of file Line.cpp.

References end_point, and start_point.


Member Function Documentation

void Teddy::Models::Line::draw Projection *    p [virtual]
 

Draw routine.

Implements Teddy::Models::Element.

Definition at line 51 of file Line.cpp.

References end_point, and start_point.

bool Teddy::Models::Line::operator!= const Line &    l const
 

Compare inequality. Like operator==(), must use shared vertices...

Definition at line 91 of file Line.cpp.

References end_point, and start_point.

bool Teddy::Models::Line::operator== const Line &    l const
 

Compare equality based on pointer equality. Must use shared vertices with this one...

Definition at line 77 of file Line.cpp.

References end_point, and start_point.

void Teddy::Models::Line::swap   [virtual]
 

Swap start and end point vertices.

Definition at line 66 of file Line.cpp.

References end_point, and start_point.


Member Data Documentation

Vertex* Teddy::Models::Line::end_point
 

Definition at line 47 of file Line.h.

Referenced by draw, Line, operator!=, operator==, and swap.

Vertex* Teddy::Models::Line::start_point
 

Definition at line 46 of file Line.h.

Referenced by draw, Line, operator!=, operator==, and swap.


The documentation for this class was generated from the following files: