Read@CVL
rdf::LineSegment Class Reference

#include <Shapes.h>

Collaboration diagram for rdf::LineSegment:

Public Member Functions

 LineSegment ()
 
 LineSegment (Line l, Vector2D c, double th, Vector2D lo, double pr, double pt, double len)
 
Line line () const
 
void setLine (double x1, double y1, double x2, double y2, double width)
 
void setLine (Line l)
 
Vector2D center () const
 
void setCenter (double x, double y)
 
double theta () const
 
void setTheta (double t)
 
Vector2D lineOrientation () const
 
void setOrientation (double dx, double dy)
 
double prec () const
 
void setPrec (double p)
 
double p () const
 
void setP (double p)
 
double length () const
 
void setLength (double l)
 
Vector2D rectIterIni ()
 
Vector2D rectIterInc ()
 
bool rectIterEnd ()
 
Vector2D getIterPt ()
 
bool doubleEqual (double a, double b)
 
double interLow (double x, double x1, double y1, double x2, double y2)
 
double interHigh (double x, double x1, double y1, double x2, double y2)
 

Protected Attributes

Line mLine
 
Vector2D mCenter
 
double mTheta = 0
 
Vector2D mLineOrient
 
double mPrec = 0
 
double mP = 0
 
double mLength = 0
 
double vx [4]
 
double vy [4]
 
double mX
 
double mY
 
double mYs
 
double mYe
 

Constructor & Destructor Documentation

rdf::LineSegment::LineSegment ( )
rdf::LineSegment::LineSegment ( Line  l,
Vector2D  c,
double  th,
Vector2D  lo,
double  pr,
double  pt,
double  len 
)

Member Function Documentation

Vector2D rdf::LineSegment::center ( ) const
bool rdf::LineSegment::doubleEqual ( double  a,
double  b 
)
Vector2D rdf::LineSegment::getIterPt ( )
double rdf::LineSegment::interHigh ( double  x,
double  x1,
double  y1,
double  x2,
double  y2 
)

Interpolate y value corresponding to 'x' value given, in the line 'x1,y1' to 'x2,y2'; if 'x1=x2' return the larger of 'y1' and 'y2'.

The following restrictions are required:

  • x1 <= x2
  • x1 <= x
  • x <= x2
double rdf::LineSegment::interLow ( double  x,
double  x1,
double  y1,
double  x2,
double  y2 
)

Interpolate y value corresponding to 'x' value given, in the line 'x1,y1' to 'x2,y2'; if 'x1=x2' return the smaller of 'y1' and 'y2'.

The following restrictions are required:

  • x1 <= x2
  • x1 <= x
  • x <= x2
double rdf::LineSegment::length ( ) const
Line rdf::LineSegment::line ( ) const
Vector2D rdf::LineSegment::lineOrientation ( ) const
double rdf::LineSegment::p ( ) const
double rdf::LineSegment::prec ( ) const
bool rdf::LineSegment::rectIterEnd ( )
Vector2D rdf::LineSegment::rectIterInc ( )
Vector2D rdf::LineSegment::rectIterIni ( )
void rdf::LineSegment::setCenter ( double  x,
double  y 
)
void rdf::LineSegment::setLength ( double  l)
void rdf::LineSegment::setLine ( double  x1,
double  y1,
double  x2,
double  y2,
double  width 
)
void rdf::LineSegment::setLine ( Line  l)
void rdf::LineSegment::setOrientation ( double  dx,
double  dy 
)
void rdf::LineSegment::setP ( double  p)
void rdf::LineSegment::setPrec ( double  p)
void rdf::LineSegment::setTheta ( double  t)
double rdf::LineSegment::theta ( ) const

Member Data Documentation

Vector2D rdf::LineSegment::mCenter
protected
double rdf::LineSegment::mLength = 0
protected
Line rdf::LineSegment::mLine
protected
Vector2D rdf::LineSegment::mLineOrient
protected
double rdf::LineSegment::mP = 0
protected
double rdf::LineSegment::mPrec = 0
protected
double rdf::LineSegment::mTheta = 0
protected
double rdf::LineSegment::mX
protected
double rdf::LineSegment::mY
protected
double rdf::LineSegment::mYe
protected
double rdf::LineSegment::mYs
protected
double rdf::LineSegment::vx[4]
protected
double rdf::LineSegment::vy[4]
protected

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