KJB
|
A vanishing point for a set of parallel lines in an image. More...
#include <vanishing_point.h>
Public Types | |
enum | Vanishing_point_type { REGULAR = 0, INFINITY_UP, INFINITY_DOWN, INFINITY_LEFT, INFINITY_RIGHT } |
the possible types of vanishing point. We need this to differentiate between vanishing points with finite coordinates and vanishing points at infinity More... | |
Public Member Functions | |
Vanishing_point (Vanishing_point_type itype=REGULAR) | |
Default constructor, it initialize the vanishing point in (0,0) More... | |
Vanishing_point (double x, double y) | |
Vanishing_point (const kjb::Vector &position) | |
Vanishing_point (const char *filename) | |
Vanishing_point (std::istream &in) | |
Vanishing_point (const Vanishing_point &src) | |
Vanishing_point & | operator= (const Vanishing_point &src) |
bool | operator== (const Vanishing_point &vp) |
~Vanishing_point () | |
bool | is_at_infinity () const |
returns true is the vanishing point is at infinity More... | |
const Vanishing_point_type & | get_type () const |
returns the vanishing point type More... | |
double | get_x () const |
returns the x coordinate of this vanishing point More... | |
double | get_y () const |
returns the y coordinate of this vanishing point More... | |
void | set_x (double ix) |
void | set_y (double iy) |
void | set_type (const Vanishing_point_type &itype) |
Sets the type of this Vanishing point. More... | |
void | set_point (double x, double y) |
Sets the position of this Vanishing point. More... | |
void | set_position (const kjb::Vector &position) |
Sets the position of this Vanishing point. More... | |
void | read (std::istream &in) |
Reads this Vanishing point from an input stream. More... | |
void | write (std::ostream &out) const |
Writes this Vanishing point to an output stream. More... | |
Public Member Functions inherited from kjb::Readable | |
virtual | ~Readable () |
Deletes this Readable. More... | |
virtual void | read (const char *fname) |
Reads this Readable from a file. More... | |
Public Member Functions inherited from kjb::Writeable | |
virtual | ~Writeable () |
Deletes this Writeable. More... | |
virtual void | write (const char *fname) const |
Writes this Writeable to a file. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from kjb::Readable | |
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... | |
A vanishing point for a set of parallel lines in an image.
|
inline |
Default constructor, it initialize the vanishing point in (0,0)
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
returns the vanishing point type
|
inline |
returns the x coordinate of this vanishing point
|
inline |
returns the y coordinate of this vanishing point
|
inline |
returns true is the vanishing point is at infinity
|
inline |
bool Vanishing_point::operator== | ( | const Vanishing_point & | vp | ) |
|
virtual |
Reads this Vanishing point from an input stream.
Reads this Vanishing point from an input stream.
in | the input stream to read this vanishing point from |
Implements kjb::Readable.
|
inline |
Sets the position of this Vanishing point.
|
inline |
Sets the position of this Vanishing point.
|
inline |
Sets the type of this Vanishing point.
|
inline |
|
inline |
|
virtual |
Writes this Vanishing point to an output stream.
Writes this Vanishing point to an input stream.
out | the output stream to write this vanishing point to |
Implements kjb::Writeable.