#include <gugr_basics.h>
Public Methods | |
line () | |
line (const line &other) | |
~line () | |
line (const point2< rational > &av, const rational &adx, const rational &ady) | |
GULAPI | line (const point2< rational > &a, const point2< rational > &b) |
line & | operator= (const line &other) |
point2< rational > & | v () const |
rational & | dx () const |
rational & | dy () const |
bool | IsNULL (void) const |
bool | IsHorizontal (void) const |
bool | IsVertical (void) const |
Public Attributes | |
line_rep * | m_rep |
|
Definition at line 226 of file gugr_basics.h. Referenced by line(), and operator=().
00226 { m_rep = NULL; } |
|
Definition at line 228 of file gugr_basics.h. References line().
00229 { 00230 if( other.m_rep ) other.m_rep->m_refcount++; 00231 m_rep = other.m_rep; 00232 } |
|
Definition at line 234 of file gugr_basics.h.
|
|
Definition at line 237 of file gugr_basics.h. References GULAPI.
00239 { 00240 m_rep = new line_rep( av, adx, ady ); 00241 } |
|
Definition at line 34 of file gugr_basics.cpp. References dx(), dy(), GULAPI, and m_rep.
00035 { 00036 rational dx,dy,adx,ady; // the constructor initializes these variables to 0 00037 // (so adx becomes 0, when dx=0 and dy!=0 below) 00038 dx = b.x - a.x; 00039 dy = b.y - a.y; 00040 if( !dx.is_zero() ) ady = dy/dx; else ady = rational(ULong(1)); 00041 if( !dy.is_zero() ) { 00042 if( !dx.is_zero() ) 00043 adx = rational(ULong(1))/ady; 00044 } 00045 else 00046 adx = rational(ULong(1)); 00047 m_rep = new line_rep( a, adx, ady ); 00048 } |
|
Definition at line 253 of file gugr_basics.h. Referenced by line().
00253 { return(m_rep->dx); } |
|
Definition at line 254 of file gugr_basics.h. Referenced by line().
00254 { return(m_rep->dy); } |
|
Definition at line 256 of file gugr_basics.h.
00256 { return m_rep->dy.is_zero(); } |
|
Definition at line 255 of file gugr_basics.h.
00255 { return(m_rep == NULL); } |
|
Definition at line 257 of file gugr_basics.h.
00257 { return m_rep->dx.is_zero(); } |
|
Definition at line 244 of file gugr_basics.h. References line(), and gust::PoolFree().
|
|
Definition at line 252 of file gugr_basics.h.
00252 { return(m_rep->v); } |
|
Definition at line 224 of file gugr_basics.h. Referenced by line(). |