Class for line segment representation. More...
#include <line.hpp>
Public Types | |
Point type of the line | |
| typedef point | point_type |
Public Member Functions | |
Special member functions | |
| ~line () throw () | |
| Destructor. | |
| line () throw () | |
| Default constructor. | |
| line (coordinate_type a, coordinate_type b, coordinate_type c, coordinate_type d) throw () | |
| Create line with given coordinates. | |
| line (const line &l) throw () | |
| Copy constructor. | |
| template<typename L > | |
| line (const L &l) | |
| Copy constructor from any other line segmant. | |
| line & | operator= (const line &l) throw () |
| Template assignment operator. | |
| template<typename L > | |
| line & | operator= (const L &l) |
| Template assignment operator. | |
Source, target coordinates of the line segment | |
|
| |
| typedef point::coordinate_type | coordinate_type |
| void | set_source_x (const coordinate_type &v) throw () |
| Sets the source x coordinate of the line segment. | |
| void | set_source_y (const coordinate_type &v) throw () |
| Sets the source y coordinate of the line segment. | |
| void | set_target_x (const coordinate_type &v) throw () |
| Sets the target x coordinate of the line segment. | |
| void | set_target_y (const coordinate_type &v) throw () |
| Sets the target y coordinate of the line segment. | |
| const coordinate_type & | get_source_x () const throw () |
| Gets the source x coordinate of the line segment. | |
| const coordinate_type & | get_source_y () const throw () |
| Gets the source y coordinate of the line segment. | |
| const coordinate_type & | get_target_x () const throw () |
| Gets the target x coordinate of the line segment. | |
| const coordinate_type & | get_target_y () const throw () |
| Gets the target y coordinate of the line segment. | |
Class for line segment representation.
This class is a model of geometry::concept::line
| instigate::geometry::line::line | ( | coordinate_type | a, | |
| coordinate_type | b, | |||
| coordinate_type | c, | |||
| coordinate_type | d | |||
| ) | throw () |
Create line with given coordinates.
| a | is the source x coordinate | |
| b | is the source y coordinate | |
| c | is the target x coordinate | |
| d | is the target y coordinate |
| instigate::geometry::line::line | ( | const line & | l | ) | throw () |
Copy constructor.
| l | - object to copy from |
| instigate::geometry::line::line | ( | const L & | l | ) | [inline] |
Copy constructor from any other line segmant.
| l | - another line segment object |
References CHECK.
| const coordinate_type& instigate::geometry::line::get_source_x | ( | ) | const throw () |
Gets the source x coordinate of the line segment.
Referenced by operator=().
| const coordinate_type& instigate::geometry::line::get_source_y | ( | ) | const throw () |
Gets the source y coordinate of the line segment.
Referenced by operator=().
| const coordinate_type& instigate::geometry::line::get_target_x | ( | ) | const throw () |
Gets the target x coordinate of the line segment.
Referenced by operator=().
| const coordinate_type& instigate::geometry::line::get_target_y | ( | ) | const throw () |
Gets the target y coordinate of the line segment.
Referenced by operator=().
| line& instigate::geometry::line::operator= | ( | const L & | l | ) | [inline] |
Template assignment operator.
| l | - object to copy from |
References CHECK, get_source_x(), get_source_y(), get_target_x(), and get_target_y().
Template assignment operator.
| l | - object to copy from |
| void instigate::geometry::line::set_source_x | ( | const coordinate_type & | v | ) | throw () |
Sets the source x coordinate of the line segment.
| [in] | v | - the value for the source x coordinate |
| void instigate::geometry::line::set_source_y | ( | const coordinate_type & | v | ) | throw () |
Sets the source y coordinate of the line segment.
| [in] | v | - the value for the source y coordinate |
| void instigate::geometry::line::set_target_x | ( | const coordinate_type & | v | ) | throw () |
Sets the target x coordinate of the line segment.
| [in] | v | - the value for target x coordinate |
| void instigate::geometry::line::set_target_y | ( | const coordinate_type & | v | ) | throw () |
Sets the target y coordinate of the line segment.
| [in] | v | - the value for target y coordinate |