Fawkes API  Fawkes Development Version
firevision::LineShape Class Reference

Line shape. More...

#include <>>

Inheritance diagram for firevision::LineShape:

Public Member Functions

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

Friends

class HtLinesModel
 
class RhtLinesModel
 

Detailed Description

Line shape.

Definition at line 40 of file line.h.

Constructor & Destructor Documentation

◆ LineShape()

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

Constructor.

Parameters
roi_widthROI width
roi_heightROI height

Definition at line 44 of file line.cpp.

◆ ~LineShape()

firevision::LineShape::~LineShape ( )

Destructor.

Definition at line 60 of file line.cpp.

Member Function Documentation

◆ calcPoints()

void firevision::LineShape::calcPoints ( )

Calc points for line.

Definition at line 104 of file line.cpp.

References fawkes::deg2rad().

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

◆ getPoints()

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

Get two points that define the line.

Parameters
x1contains x coordinate of first point upon return
y1contains y coordinate of first point upon return
x2contains x coordinate of second point upon return
y2contains y coordinate of second point upon return

Definition at line 202 of file line.cpp.

◆ isClose()

bool firevision::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_xx coordinate of point in the same ROI as the shape
in_roi_yy coordinate of point in the same ROI as the shape
Returns
true if point is close to shape, false otherwise

Implements firevision::Shape.

Definition at line 83 of file line.cpp.

◆ printToStream()

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

Print line.

Parameters
streamstream to print to

Definition at line 69 of file line.cpp.

◆ setMargin()

void firevision::LineShape::setMargin ( unsigned int  margin)
virtual

Set margin around shape.

Parameters
marginmargin

Implements firevision::Shape.

Definition at line 76 of file line.cpp.


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