Diplo
 All Classes Namespaces Functions Variables Properties
Public Member Functions | Public Attributes | List of all members
Diplo.Drawing.Libs.Geometry.Smart.SmartLineSegment Class Reference

Reprezentacia usecky pomocou pokrocileho objektu (usecka ma pridane dalsie uzitocne metody). More...

Public Member Functions

 SmartLineSegment (Point P1, Point P2)
  More...
 
Point getPointOutOfLine (Graphics g, int pointIndex, int distance)
  More...
 
Boolean isPointOnLine (Graphics g, Point P)
  More...
 
void _drawLine (Graphics g)
 para>Vykresli kusok usecky More...
 

Public Attributes

Point p1
 
Point p2
 
double a
 
double b
 

Detailed Description

Reprezentacia usecky pomocou pokrocileho objektu (usecka ma pridane dalsie uzitocne metody).

Constructor & Destructor Documentation

Diplo.Drawing.Libs.Geometry.Smart.SmartLineSegment.SmartLineSegment ( Point  P1,
Point  P2 
)

Vytvori objekt LINE SEGMENT V konstrukture sa vytvori aj rovnica usecky - resp. priamky

Parameters
P1
P2

Member Function Documentation

void Diplo.Drawing.Libs.Geometry.Smart.SmartLineSegment._drawLine ( Graphics  g)

para>Vykresli kusok usecky

Parameters
gGrafický komponent
Point Diplo.Drawing.Libs.Geometry.Smart.SmartLineSegment.getPointOutOfLine ( Graphics  g,
int  pointIndex,
int  distance 
)

Na vstupe je index jedneho z bodu usecky a vzdialenost. Vrati bod, ktori

  • je od bodu (urceneho indexom) vzdialeny o urcenu vzdialenost
  • lezi na priamke, na ktorej aj usecka
  • vrateni bod na usecke nelezi
Parameters
gGrafický komponent
pointIndexIndex jedneho z krajných bodov (možnosti sú 1 a 2)
distanceVzdialenosť nového bodu od krajného bodu.
Returns
Výsledný bod
Boolean Diplo.Drawing.Libs.Geometry.Smart.SmartLineSegment.isPointOnLine ( Graphics  g,
Point  P 
)

Rozhodne ci bod lezi na usecke TODO : treba overit ci sedi aj rovnici priamke

Parameters
gGrafický komponent
PBod, ktorý sa bdue určovať
Returns

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