forked from therion/therion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
thdb2dprj.cxx
109 lines (80 loc) · 2.25 KB
/
thdb2dprj.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/**
* @file thdb2dprj.cxx
*/
/* Copyright (C) 2000 Stacho Mudrak
*
* $Date: $
* $RCSfile: $
* $Revision: $
*
* --------------------------------------------------------------------
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* --------------------------------------------------------------------
*/
#include "thdb2dprj.h"
#include "thinfnan.h"
#include <string.h>
thdb2dprj::thdb2dprj() {
this->type = TT_2DPROJ_PLAN;
this->index = "";
this->pp1 = thnan;
this->id = 0;
this->processed = false;
this->first_scrap = NULL;
this->last_scrap = NULL;
this->first_join = NULL;
this->last_join = NULL;
this->first_join_list = NULL;
this->last_join_list = NULL;
this->shift_x = 0.0;
this->shift_y = 0.0;
this->shift_z = 0.0;
this->rshift_x = 0.0;
this->rshift_y = 0.0;
this->rshift_z = 0.0;
this->amaxdist = 0.0;
}
thdb2dprj::thdb2dprj(char t, char * i) {
this->type = t;
this->index = i;
this->pp1 = thnan;
this->id = 0;
this->processed = false;
this->first_scrap = NULL;
this->last_scrap = NULL;
this->first_join = NULL;
this->last_join = NULL;
this->shift_x = 0.0;
this->shift_y = 0.0;
this->shift_z = 0.0;
this->amaxdist = 0.0;
}
thdb2dprjid::thdb2dprjid() {
this->type = TT_2DPROJ_PLAN;
this->index = "";
}
thdb2dprjid::thdb2dprjid(thdb2dprj * proj) {
this->type = proj->type;
this->index = proj->index;
}
bool operator < (const thdb2dprjid & p1, const thdb2dprjid & p2) {
if (p1.type < p2.type)
return true;
if (p1.type == p2.type) {
if (strcmp(p1.index,p2.index) < 0)
return true;
}
return false;
}