00001
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00018
00019
#ifndef UTILITIES_H
00020
#define UTILITIES_H
00021
00022
#include <stdlib.h>
00023
#include <vector>
00024
#include "math.h"
00025
00026
#include <qpainter.h>
00027
00028
#include "../primitives/point.h"
00029
00030
00031
Point3D *
qPointToPoint3D(
const QPoint& point);
00032
00033
00034 QPoint
point3DToQPoint(
Point3D * point);
00035
00036
00037
double calculateDistance(
const QPoint& center,
const QPoint& pTemp);
00038
00039
00040
bool equalQPoint(QPoint pA, QPoint pB);
00041
00042
00043
bool isNear (QPoint p, QPoint pref);
00044
00045
00046
00047
int nearPoint(QPoint point, vector<QPoint> vect);
00048
00049
00050
Point3D changeCoordinateSystem(
const Point3D& point,
const Point3D& origin);
00051
00052
00053
Point3D changeCoordinateSystemReverse(
const Point3D& point,
const Point3D& origin);
00054
00055
00056
void clearVector(vector<Point3D *> vect);
00057
00058
#endif
00059