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.

36 lines
768 B

#include <string>
#include <iostream>
#include <cmath>
1 year ago
#include <iomanip>
using namespace std;
const double eps = 1e-6;
#define Equal(a, b) ((fabs(a - b) < eps) ? true : false)
struct P
{
double x, y, z; // ����
double dx, dy, dz; // ����
bool isend; // �Ƿ�Ϊ�˵�
int type; // 0���� 1δȷ����֧�� 2��ȷ����֧�� 3������
int ref; // ָ������������Ӧ�������ͱ���
1 year ago
bool operator<(P B) const;
bool operator==(P B) const;
bool operator!=(P B) const;
1 year ago
void set(int i, double v);
const double get(int i);
1 year ago
void reverse();
1 year ago
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);
};