LineShape Class Reference

Line shape. More...

#include <models/shape/line.h>

Inheritance diagram for LineShape:

List of all members.


Public Member Functions

 LineShape (unsigned int roi_width, unsigned int roi_height)
 Constructor.
 ~LineShape ()
 Destructor.
void printToStream (std::ostream &stream)
 Print line.
void setMargin (unsigned int margin)
 Set margin around shape.
bool isClose (unsigned int in_roi_x, unsigned int in_roi_y)
 Check if the given point is close to the shape.
void calcPoints ()
 Calc points for line.
void getPoints (int *x1, int *y1, int *x2, int *y2)
 Get two points that define the line.

Friends

class HtLinesModel
class RhtLinesModel

Detailed Description

Line shape.

Definition at line 35 of file line.h.


Constructor & Destructor Documentation

LineShape::LineShape ( unsigned int  roi_width,
unsigned int  roi_height 
)

Constructor.

Parameters:
roi_width ROI width
roi_height ROI height

Definition at line 42 of file line.cpp.

LineShape::~LineShape (  ) 

Destructor.

Definition at line 58 of file line.cpp.


Member Function Documentation

void LineShape::calcPoints (  ) 

Calc points for line.

Definition at line 102 of file line.cpp.

References fawkes::deg2rad().

Referenced by getPoints(), RhtLinesModel::getShapes(), and HtLinesModel::getShapes().

void LineShape::getPoints ( int *  x1,
int *  y1,
int *  x2,
int *  y2 
)

Get two points that define the line.

Parameters:
x1 contains x coordinate of first point upon return
y1 contains y coordinate of first point upon return
x2 contains x coordinate of second point upon return
y2 contains y coordinate of second point upon return

Definition at line 200 of file line.cpp.

References calcPoints().

bool LineShape::isClose ( unsigned int  in_roi_x,
unsigned int  in_roi_y 
) [virtual]

Check if the given point is close to the shape.

Parameters:
in_roi_x x coordinate of point in the same ROI as the shape
in_roi_y y coordinate of point in the same ROI as the shape

Implements Shape.

Definition at line 81 of file line.cpp.

void LineShape::printToStream ( std::ostream &  stream  ) 

Print line.

Parameters:
stream stream to print to

Definition at line 67 of file line.cpp.

void LineShape::setMargin ( unsigned int  margin  )  [virtual]

Set margin around shape.

Parameters:
margin margin

Implements Shape.

Definition at line 74 of file line.cpp.


The documentation for this class was generated from the following files:
  • src/firevision/models/shape/line.h
  • src/firevision/models/shape/line.cpp