#pragma once #include #include "math.h" // Needed for sqrtf #include "MouseRotation.h" typedef union Tuple4i_t { struct { GLint X, Y, Z, W; } s; GLint T[4]; } Tuple4iT; //A 4-element tuple represented by single-precision floating point x,y,z,w coordinates. typedef union Matrix4d_t { struct { //column major union { GLdouble M00; GLdouble XX; GLdouble SX; }; //XAxis.X and Scale X union { GLdouble M10; GLdouble XY; }; //XAxis.Y union { GLdouble M20; GLdouble XZ; }; //XAxis.Z union { GLdouble M30; GLdouble XW; }; //XAxis.W union { GLdouble M01; GLdouble YX; }; //YAxis.X union { GLdouble M11; GLdouble YY; GLdouble SY; }; //YAxis.Y and Scale Y union { GLdouble M21; GLdouble YZ; }; //YAxis.Z union { GLdouble M31; GLdouble YW; }; //YAxis.W union { GLdouble M02; GLdouble ZX; }; //ZAxis.X union { GLdouble M12; GLdouble ZY; }; //ZAxis.Y union { GLdouble M22; GLdouble ZZ; GLdouble SZ; }; //ZAxis.Z and Scale Z union { GLdouble M32; GLdouble ZW; }; //ZAxis.W union { GLdouble M03; GLdouble TX; }; //Trans.X union { GLdouble M13; GLdouble TY; }; //Trans.Y union { GLdouble M23; GLdouble TZ; }; //Trans.Z union { GLdouble M33; GLdouble TW; GLdouble SW; }; //Trans.W and Scale W } s; GLdouble M[16]; } Matrix4dT; //A single precision floating point 4 by 4 matrix. class point3D { public: point3D(); virtual ~point3D(); //Point Selection bool select;//есть выделение? Да/Нет //virtual void GetRect(void); Tuple2fT LeftDownCorner; Tuple2fT RightUpCorner; Matrix4dT modelMatrix; Matrix4dT projMatrix; Tuple4iT viewport; GLdouble winx; GLdouble winy; GLdouble winz; GLdouble x; //x-координата точки GLdouble y; //y-координата точки GLdouble z; //z-координата точки // ДОБАВИТЬ ПАРАМЕТРИЧЕСКИЕ КООРДИНАТЫ t и tau void SetRect(int x1, int y1, int x2, int y2); void Draw(); bool PtInRect(GLint x, GLint y); };