#ifndef PIX_H #define PIX_H /******************************************************************************* * E.S.O. - VLT project * * "@(#) $Id: AP_pixel.h,v 2.43 2004/06/17 23:04:26 vltsccm Exp $" * * who when what * -------- -------- ---------------------------------------------- * hummel 13/03/98 created */ /************************************************************************ * *---------------------------------------------------------------------- */ #ifndef __cplusplus #error This is a C++ include file and cannot be used from plain C #endif //---------------- class AP_pixel { //---------------- public: static float ra2deg; static float deg2ra; float py_on_line(float px,float py,float g1x,float g1y,float g2x,float g2y); // returns the y-distance between p and the line given by g1 g2 float px_on_line(float px,float py,float g1x,float g1y,float g2x,float g2y); // returns the x-distance between p and the line given by g1 g2 float pr_on_line(float px,float py,float g1x,float g1y,float g2x,float g2y); // returns the distance between p and the line given by g1 g2 int p_in_area(int max, float px, float py, float *x, float *y); // tests if point inside a geometric figure like a // rectangle, max is the last accessible index of arrays x and y // x,y[0] is test target; x[1..4],y[1..4] are ractangle points // in drawing order !!! void rot(float *px, float *py, float cx, float cy, float rot_ang); // rotates (p)oint around (c)enter by an amount of rot degrees // and overwrites (p)oint y^ / // mathematical orientation (anti-clock) |/ rot // +--->x void test(); // test the methods given above }; #endif /*!_H*/