KJB
|
Class to manipulate a 2D corner. The corener is defined in terms of a set of line segments all intersecting at a point in the image, which is the corner position. No consistency controls are performed here. More...
#include <corner.h>
Public Member Functions | |
Corner () | |
Constructor without initializations. More... | |
Corner (const kjb::Vector &iposition) | |
Constructor without initializations. More... | |
Corner (const Corner &src) | |
Corner (const char *filename) | |
Corner (std::istream &in) | |
Corner & | operator= (const Corner &src) |
const kjb::Vector & | get_position () const |
const std::vector < kjb::Line_segment > & | get_segments () const |
void | set_position (const kjb::Vector &iposition) |
void | add_segment (const kjb::Line_segment &isegment) |
const kjb::Line_segment & | get_segment (unsigned int i) const |
void | set_segment (unsigned int i, const kjb::Line_segment isegment) |
unsigned int | get_num_segments () const |
void | read (std::istream &in) |
Reads this Line segment from an input stream. More... | |
void | write (std::ostream &out) const |
Writes this Line segment to an output stream. More... | |
virtual void | draw (kjb::Image &img, double ir, double ig, double ib, double width=1.0) const |
Draws this line segment. More... | |
virtual void | randomly_color (kjb::Image &img, double width=1.0) const |
Randomly colors this line segment on an image. More... | |
![]() | |
virtual | ~Readable () |
Deletes this Readable. More... | |
virtual void | read (const char *fname) |
Reads this Readable from a file. More... | |
![]() | |
virtual | ~Writeable () |
Deletes this Writeable. More... | |
virtual void | write (const char *fname) const |
Writes this Writeable to a file. More... | |
Protected Attributes | |
kjb::Vector | position |
position of this 2D corner More... | |
std::vector< kjb::Line_segment > | segments |
Additional Inherited Members | |
![]() | |
static const char * | read_field_value (std::istream &in, const char *field_name, char *field_buf, size_t buf_len, char separator=':') |
Reads a line off in into a buffer and returns a pointer to the field value in the buffer. More... | |
static const char * | read_field_value (std::istream &in, const char *field_name, char separator=':') |
Reads a line off in into an internal buffer and returns a pointer to the field value in the buffer. More... | |
Class to manipulate a 2D corner. The corener is defined in terms of a set of line segments all intersecting at a point in the image, which is the corner position. No consistency controls are performed here.
|
inline |
Constructor without initializations.
|
inline |
Constructor without initializations.
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Draws this line segment.
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Randomly colors this line segment on an image.
|
virtual |
Reads this Line segment from an input stream.
Implements kjb::Readable.
|
inline |
|
inline |
|
virtual |
Writes this Line segment to an output stream.
Implements kjb::Writeable.
|
protected |
position of this 2D corner
|
protected |
The segments forming this corner