You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifdef MY_LIB_SHARED_BUILD
|
|
|
|
#ifdef _WIN32
|
|
|
|
#ifdef MY_LIB_EXPORTS
|
|
|
|
#define POINT_LIB_API __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define POINT_LIB_API __declspec(dllimport)
|
|
|
|
#endif // MY_LIB_EXPORTS
|
|
|
|
#else
|
|
|
|
#define POINT_LIB_API
|
|
|
|
#endif // _WIN32
|
|
|
|
#else
|
|
|
|
#define POINT_LIB_API
|
|
|
|
#endif // MY_LIB_SHARED_BUILD
|
|
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <iostream>
|
|
|
|
#include <cmath>
|
|
|
|
#include <iomanip>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
extern "C" POINT_LIB_API const double eps = 1e-6;
|
|
|
|
|
|
|
|
extern "C" POINT_LIB_API bool Equal(double a, double b);
|
|
|
|
|
|
|
|
extern "C" struct POINT_LIB_API P
|
|
|
|
{
|
|
|
|
double x, y, z; // ����
|
|
|
|
double dx, dy, dz; // ����
|
|
|
|
bool isend; // �Ƿ�Ϊ�˵�
|
|
|
|
int type; // 0���� 1δȷ����֧�� 2��ȷ����֧�� 3������
|
|
|
|
int ref; // ָ������������Ӧ�������ͱ���
|
|
|
|
|
|
|
|
bool operator<(P B) const;
|
|
|
|
bool operator==(P B) const;
|
|
|
|
bool operator!=(P B) const;
|
|
|
|
|
|
|
|
void set(int i, double v);
|
|
|
|
const double get(int i);
|
|
|
|
|
|
|
|
void reverse();
|
|
|
|
|
|
|
|
P(double x1, double y1, double z1);
|
|
|
|
P();
|
|
|
|
P operator-(P B) const;
|
|
|
|
P operator+(P B) const;
|
|
|
|
P operator*(double p) const;
|
|
|
|
P operator/(double p) const;
|
|
|
|
void print(string s);
|
|
|
|
|
|
|
|
// ���÷���
|
|
|
|
void setDir(const P &dir);
|
|
|
|
};
|