Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.sao.ru/precise/Local/SkyCat/astrotcl/astrotcl.16.html
Дата изменения: Fri Sep 11 17:33:25 1998 Дата индексирования: Tue Oct 2 12:45:38 2012 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п |
#include "ImageCoords.h" class ImageCoords { ... public: ImageCoords(); ImageCoords(double x, double y); ImageCoords(const char* x_str, const char* y_str); isNull() const; void setNull(); friend ostream& operator<<(ostream&, const ImageCoords& pos); void print(char* x_buf, char* y_buf); void print(ostream& os); void get(double& x, double& y); int operator==(const ImageCoords& pos) const; int operator!=(const ImageCoords& pos) const; friend ImageCoords operator-(const ImageCoords& a, const ImageCoords& b); double x() const; double y() const; double dist(ImageCoords& pos) const; static double dist(double x0, double y0, double x1, double y1); int box(double radius, ImageCoords& pos1, ImageCoords& pos2) const; static ImageCoords center(const ImageCoords& pos1, const ImageCoords& pos2, double& radius, double& width, double& height); int status() const; };
This class is used to represent image pixel coordinates (x, y). It has an interface similar to the WorldCoords class, and is used by the WorldOrImageCoords class to represent image coordinates.
ImageCoords() Initialize null coordinates. ImageCoords(x, y) Initialize coordinates with (x, y) ImageCoords(x_str, y_str) Parse X and Y in string format.
isNull() Return true if the coordinates are null. setNull() Set to the null value. ostream& operator<<(os, pos) Output operator: format: "x y" print(x_buf, y_buf) Print the coordinates to the given buffers. print(os) Print coordinates to the given stream. get(x, y) Get the values of x and y. operator==(pos) Check for equality. operator!=(pos) Check for inequality. operator-(a, b) { Return the difference between two points. x() return the value of x. y() return the value of y. dist(pos) Get distance between this point and the given one. dist(x0, y0, x1, y1) Static member to get the distance between two points. box(radius, Ipos1, pos2) Given a radius, set pos1 and pos2 to the two endpoints that form a box with center at this position. center(pos1, const pos2, radius, width, height) Given the endpoints of a box (pos1, pos2), set width, height and radius and return the center position of the box. status() Return the status ater the constructor (0 is OK).
Please send questions or comments to abrighto@eso.org.
Copyright © 1998 ESO - European Southern Observatory