#include <OLine.hpp>
Inheritance diagram for OLine::
Public Methods | |
OGraphic * | clone () const |
OGraphic * | create () const |
OLine () | |
OLine (OPoint &, OPoint &) | |
OLine (int, int, int, int) | |
~OLine () | |
int | getDX () |
int | getDY () |
double | getLength () |
double | matchLength (OLine &) |
bool | isOpposite (OLine &) |
void | move (int, int, int=1) |
void | movec () |
void | reverse () |
OLine | getReverse () |
OPoint | getMiddle () |
bool | isConnected (OLine &) |
bool | isNear (OLine &) |
double | getTangent () |
int | getOrigin () |
double | getDirection () |
double | getDAngle (OLine &) |
double | getAngle (OLine &) |
double | getNAzimuth () |
double | getSAzimuth () |
double | getEAzimuth () |
double | getWAzimuth () |
bool | isParallel (OLine &) |
double | matchTeta (OLine &) |
bool | isOrthogonal (OLine &) |
bool | isColinear (OPoint &) |
bool | between (OPoint &) |
bool | belong (OPoint &) |
OPoint | getIntersection (OLine &) |
bool | intersect (OLine &) |
bool | overlap (OLine &) |
double | euclid (OPoint &) |
double | euclid (OLine &) |
bool | operator== (OLine &) |
bool | operator!= (OLine &) |
OLine | operator/ (int) |
OLine | operator * (int) |
void | gomo (ostream &) |
void | gomi (istream &) |
void | svgo (ostream &) |
void | xmlo (ostream &) |
bool | isValid () |
void | clear () |
void | set (OPoint &, OPoint &) |
void | set (int, int, int, int) |
void | setBegin (OPoint &) |
void | setBegin (int, int) |
void | setEnd (OPoint &) |
void | setEnd (int, int) |
OPoint | getBegin () |
OPoint | getEnd () |
Protected Attributes | |
OPoint | b |
OPoint | e |
|
Constructor |
|
Constructor |
|
Constructor |
|
Destructor |
|
Test with OLine::isColinear() and OLine::between() in these case the point belongs to line object ![]() |
|
The point is between line's begin and line's end dx1 dx2 are opposite or dy1 dy2 must be opposite This method isn't bijective ![]() |
|
Clear the begin;end point |
|
Clone the line object Reimplemented from OGraphic. |
|
Create a new line object Reimplemented from OGraphic. |
|
Get Euclidien distance between two line objects, this distance is computed between middle points |
|
Get Euclidien distance between the line object and a given point ![]() |
|
Get angle between the line and a end connected line. This angle is inclued between 0 and 2*pi. example: OLine l1(10,10,20,10); OLine l2(20,10,20,20); OLine l3(20,10,20,0); cout << l1.getAngle(l2); -> pi/2 cout << l1.getAngle(l3); -> 3*pi/2 ![]() |
|
Get the begin point |
|
Get direct angle between the line and a end connected line. This direct angle is always lower than pi. example: OLine l1(10,10,20,10); OLine l2(20,10,20,20); OLine l3(20,10,20,0); cout << l1.getDAngle(l2); -> pi/2 cout << l1.getDAngle(l3); -> pi/2 ![]() |
|
Get line's direction in radian, the arctangent of (y2-y1)/(x2-x1) |
|
Get the end(x)-begin(x) delta x |
|
Get the end(y)-begin(y) delta y |
|
Get East azimuth |
|
Get the end point |
|
Get colinear intersection between two line objects |
|
Get length of line |
|
Return the line's middle |
|
Get North azimuth ![]() |
|
Get origin |
|
Reverse and return a new line (end to begin and begin to end) |
|
Get South azimuth |
|
Get tangent of line (y2-y1)/(x2-x1) |
|
Get Weast azimuth |
|
GOM input Reimplemented from OGraphic. |
|
GOM output Reimplemented from OGraphic. |
|
The lines intersect themself |
|
Is on test if a point corresponds to line equation y=m*x + p ![]() |
|
Test if lines are connected, they are a same point (begin or end) |
|
Test if lines are near, they are a nearest point (begin or end) |
|
The lines are opposite, the line1's begin is near of line2's end and the line1's end is near of line2's begin |
|
The lines are orthogonal |
|
The lines are parallel |
|
Is valid begin and enb no null |
|
Match length (0 to inf): (lmax - lmin)/lmin if equals return '0', else a distance bijective: l1.matchLength(l2) == l2.matchLength(l1) |
|
Match Teta (0 to pi/2), Teta is the parallelism gap between two lines: if parallel return '0', else a distance unil '1': Teta/(pi/2) bijective: l1.matchTeta(l2) == l2.matchTeta(l1) ![]() |
|
Move the line with dx,dy mode 1 move begin and end, 2 begin, 3 end |
|
Move the line to center (begin to 0,0) |
|
* operator |
|
!= operator |
|
/ operator |
|
== operator |
|
The lines overlap ![]() |
|
Reverse the line (end to begin and begin to end) |
|
Set the x1;y1;x2;y2 begin;end point |
|
Set the begin;end point |
|
Set the x;y begin point |
|
Set the begin point |
|
Set the x;y end point |
|
Set the end point |
|
SVG output Reimplemented from OGraphic. |
|
XML output Reimplemented from OGraphic. |
|
|
|
|