00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef QVDEFINES_H
00022 #define QVDEFINES_H
00023
00024 #include <math.h>
00025
00026 #define POW2(X) ((X)*(X))
00027 #define SIGN(X) (((X)>=0)?1:-1)
00028 #define ABS(X) (((X)>0)?(X):(-(X)))
00029 #define MIN(X,Y) (((X)<(Y))?(X):(Y))
00030 #define MAX(X,Y) (((X)>(Y))?(X):(Y))
00031 #define RANDOM(MIN, MAX) (rand()%((MAX)-(MIN)+1) + (MIN))
00032
00033 #define PI (3.14159265358979323846)
00034 #define EPSILON (10E-6)
00035
00036 typedef unsigned char uChar;
00037 typedef unsigned short uShort;
00038 typedef unsigned int uInt;
00039 typedef signed char sChar;
00040 typedef signed short sShort;
00041 typedef signed int sInt;
00042
00043
00044 typedef float sFloat;
00045 typedef double sDouble;
00046
00047
00048
00049 #include <QMetaType>
00050 #include <QList>
00051 #include <QVector>
00052 #include <QPoint>
00053 #include <QPointF>
00054
00055
00056
00057 Q_DECLARE_METATYPE(QVector<sFloat>);
00058 Q_DECLARE_METATYPE(QVector<sDouble>);
00059 Q_DECLARE_METATYPE(QList<sFloat>);
00060 Q_DECLARE_METATYPE(QList<sDouble>);
00061 Q_DECLARE_METATYPE(QList<QPoint>);
00062 Q_DECLARE_METATYPE(QList<QPointF>);
00063 Q_DECLARE_METATYPE(QList< QList< QPoint > >);
00064 Q_DECLARE_METATYPE(QList< QList< QPointF > >);
00065
00066 #endif