-
Notifications
You must be signed in to change notification settings - Fork 0
/
IArc.java
223 lines (190 loc) · 11 KB
/
IArc.java
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
/*---
iGeo - http://igeo.jp
Copyright (c) 2002-2013 Satoru Sugihara
This file is part of iGeo.
iGeo is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, version 3.
iGeo 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with iGeo. If not, see <http://www.gnu.org/licenses/>.
---*/
package igeo;
import java.awt.Color;
/**
Arc object.
It contains IArcGeo instance inside.
@author Satoru Sugihara
*/
public class IArc extends ICurve{
public static int arcDeg(){ return IArcGeo.arcDeg(); }
public static IVec4[] arcCP(IVec center, IVec normal, IVec startPt, double angle){
return IArcGeo.arcCP(center,normal,startPt,angle);
}
public static IVec4[] arcCP(IVec center, IVec startPt, IVec endPt, boolean flipArcSide){
return IArcGeo.arcCP(center,startPt,endPt,flipArcSide);
}
public static IVec4[] arcCP(IVec center, IVec startPt, IVec midPt, IVec endPt, IVec normal){
return IArcGeo.arcCP(center,startPt,midPt,endPt,normal);
}
public static double[] arcKnots(double angle){ return IArcGeo.arcKnots(angle); }
//public IArcGeo arc;
public IArc(){}
public IArc(IVecI center, IVecI normal, IVecI startPt, double angle){
this((IServerI)null,center,normal,startPt,angle);
}
public IArc(IVecI center, IVecI normal, IVecI startPt, IDoubleI angle){
this((IServerI)null,center,normal,startPt,angle);
}
public IArc(IVecI center, IVecI startPt, double angle){
this((IServerI)null,center,new IVec(0,0,1),startPt,angle);
}
public IArc(IVecI center, IVecI startPt, IDoubleI angle){
this((IServerI)null,center,new IVec(0,0,1),startPt,angle);
}
public IArc(double x, double y, double z, double startX, double startY, double startZ, double angle){
this((IServerI)null,new IVec(x,y,z),new IVec(0,0,1),new IVec(startX, startY, startZ), angle);
}
public IArc(IVecI center, IVecI startPt, IVecI endPt, IBoolI flipArcSide){
this((IServerI)null,center,startPt,endPt,flipArcSide);
}
public IArc(IVecI center, IVecI startPt, IVecI endPt, boolean flipArcSide){
this((IServerI)null,center,startPt,endPt,flipArcSide);
}
/*
// IArc(IVecI center,IVecI startPt,IVecI endPt) is replaced with IArc(IVecI artStartPt,IVecI arcMidPt, IVecI arcEndPt).
// For the original purpose, please use IArc(IVecI center, IVecI startPt, IVecI endPt, boolean flipArcSide=false)
public IArc(IVecI center, IVecI startPt, IVecI endPt){
this((IServerI)null,center,startPt,endPt);
}
*/
public IArc(IVecI center, IVecI startPt, IVecI midPt, IVecI endPt, IVecI normal){
this((IServerI)null,center,startPt,midPt,endPt,normal);
}
public IArc(IVecI line1Pt1, IVecI line1Pt2, IVecI line2Pt1, IVecI line2Pt2, IDoubleI radius, IBoolI flipArcSide){
this((IServerI)null, line1Pt1,line1Pt2,line2Pt1,line2Pt2,radius,flipArcSide);
}
public IArc(IVecI line1Pt1, IVecI line1Pt2, IVecI line2Pt1, IVecI line2Pt2, double radius, boolean flipArcSide){
this((IServerI)null, line1Pt1,line1Pt2,line2Pt1,line2Pt2,radius,flipArcSide);
}
public IArc(IVecI line1Pt1, IVecI line1Pt2, IVecI line2Pt1, IVecI line2Pt2, IDoubleI radius){
this((IServerI)null, line1Pt1,line1Pt2,line2Pt1,line2Pt2,radius);
}
public IArc(IVecI line1Pt1, IVecI line1Pt2, IVecI line2Pt1, IVecI line2Pt2, double radius){
this((IServerI)null, line1Pt1,line1Pt2,line2Pt1,line2Pt2,radius);
}
public IArc(IVecI sharedLinePt, IVecI line1Pt, IVecI line2Pt, IDoubleI radius, IBoolI flipArcSide){
this((IServerI)null, sharedLinePt,line1Pt,line2Pt,radius,flipArcSide);
}
public IArc(IVecI sharedLinePt, IVecI line1Pt, IVecI line2Pt, double radius, boolean flipArcSide){
this((IServerI)null, sharedLinePt,line1Pt,line2Pt,radius,flipArcSide);
}
public IArc(IVecI arcStartPt, IVecI arcMidPt, IVecI arcEndPt){
this((IServerI)null, arcStartPt, arcMidPt, arcEndPt);
}
public IArc(IServerI s, IVecI center, IVecI normal, IVecI startPt, double angle){
super(s, new IArcGeo(center,normal,startPt,angle));
}
public IArc(IServerI s, IVecI center, IVecI normal, IVecI startPt, IDoubleI angle){
super(s, new IArcGeo(center,normal,startPt,angle));
}
public IArc(IServerI s, IVecI center, IVecI startPt, double angle){
this(s,center,new IVec(0,0,1),startPt,angle);
}
public IArc(IServerI s, IVecI center, IVecI startPt, IDoubleI angle){
this(s,center,new IVec(0,0,1),startPt,angle);
}
public IArc(IServerI s, double x, double y, double z, double startX, double startY, double startZ, double angle){
this(s,new IVec(x,y,z),new IVec(0,0,1),new IVec(startX, startY, startZ), angle);
}
public IArc(IServerI s, IVecI center, IVecI startPt, IVecI endPt, IBoolI flipArcSide){
super(s, new IArcGeo(center,startPt,endPt,flipArcSide));
}
public IArc(IServerI s, IVecI center, IVecI startPt, IVecI endPt, boolean flipArcSide){
super(s, new IArcGeo(center,startPt,endPt,flipArcSide));
}
/*
public IArc(IServerI s, IVecI center, IVecI startPt, IVecI endPt){
super(s, new IArcGeo(center,startPt,endPt,false));
}
*/
public IArc(IServerI s, IVecI center, IVecI startPt, IVecI midPt, IVecI endPt, IVecI normal){
super(s, new IArcGeo(center,startPt,midPt,endPt,normal));
}
public IArc(IServerI s,IVecI line1Pt1, IVecI line1Pt2, IVecI line2Pt1, IVecI line2Pt2, IDoubleI radius, IBoolI flipArcSide){
super(s, new IArcGeo(line1Pt1,line1Pt2,line2Pt1,line2Pt2,radius,flipArcSide));
}
public IArc(IServerI s,IVecI line1Pt1, IVecI line1Pt2, IVecI line2Pt1, IVecI line2Pt2, double radius, boolean flipArcSide){
super(s, new IArcGeo(line1Pt1,line1Pt2,line2Pt1,line2Pt2,radius,flipArcSide));
}
public IArc(IServerI s,IVecI line1Pt1, IVecI line1Pt2, IVecI line2Pt1, IVecI line2Pt2, IDoubleI radius){
super(s, new IArcGeo(line1Pt1,line1Pt2,line2Pt1,line2Pt2,radius,new IBool(false)));
}
public IArc(IServerI s,IVecI line1Pt1, IVecI line1Pt2, IVecI line2Pt1, IVecI line2Pt2, double radius){
super(s, new IArcGeo(line1Pt1,line1Pt2,line2Pt1,line2Pt2,radius,false));
}
public IArc(IServerI s,IVecI sharedLinePt, IVecI line1Pt, IVecI line2Pt, IDoubleI radius, IBoolI flipArcSide){
super(s, new IArcGeo(sharedLinePt,line1Pt,line2Pt,radius,flipArcSide));
}
public IArc(IServerI s,IVecI sharedLinePt, IVecI line1Pt, IVecI line2Pt, double radius, boolean flipArcSide){
super(s, new IArcGeo(sharedLinePt,line1Pt,line2Pt,radius,flipArcSide));
}
public IArc(IServerI s, IVecI arcStartPt, IVecI arcMidPt, IVecI arcEndPt){
super(s, new IArcGeo(arcStartPt, arcMidPt, arcEndPt));
}
/******************************************************************************
* IObject methods
******************************************************************************/
public IArc name(String nm){ super.name(nm); return this; }
public IArc layer(ILayer l){ super.layer(l); return this; }
public IArc layer(String l){ super.layer(l); return this; }
public IArc attr(IAttribute at){ super.attr(at); return this; }
public IArc hide(){ super.hide(); return this; }
public IArc show(){ super.show(); return this; }
public IArc clr(IColor c){ super.clr(c); return this; }
public IArc clr(IColor c, int alpha){ super.clr(c,alpha); return this; }
public IArc clr(IColor c, float alpha){ super.clr(c,alpha); return this; }
public IArc clr(IColor c, double alpha){ super.clr(c,alpha); return this; }
public IArc clr(IObject o){ super.clr(o); return this; }
public IArc clr(Color c){ super.clr(c); return this; }
public IArc clr(Color c, int alpha){ super.clr(c,alpha); return this; }
public IArc clr(int gray){ super.clr(gray); return this; }
public IArc clr(float fgray){ super.clr(fgray); return this; }
public IArc clr(double dgray){ super.clr(dgray); return this; }
public IArc clr(int gray, int alpha){ super.clr(gray,alpha); return this; }
public IArc clr(float fgray, float falpha){ super.clr(fgray,falpha); return this; }
public IArc clr(double dgray, double dalpha){ super.clr(dgray,dalpha); return this; }
public IArc clr(int r, int g, int b){ super.clr(r,g,b); return this; }
public IArc clr(float fr, float fg, float fb){ super.clr(fr,fg,fb); return this; }
public IArc clr(double dr, double dg, double db){ super.clr(dr,dg,db); return this; }
public IArc clr(int r, int g, int b, int a){ super.clr(r,g,b,a); return this; }
public IArc clr(float fr, float fg, float fb, float fa){ super.clr(fr,fg,fb,fa); return this; }
public IArc clr(double dr, double dg, double db, double da){ super.clr(dr,dg,db,da); return this; }
public IArc hsb(float h, float s, float b, float a){ super.hsb(h,s,b,a); return this; }
public IArc hsb(double h, double s, double b, double a){ super.hsb(h,s,b,a); return this; }
public IArc hsb(float h, float s, float b){ super.hsb(h,s,b); return this; }
public IArc hsb(double h, double s, double b){ super.hsb(h,s,b); return this; }
public IArc setColor(Color c){ super.setColor(c); return this; }
public IArc setColor(Color c, int alpha){ super.setColor(c,alpha); return this; }
public IArc setColor(int gray){ super.setColor(gray); return this; }
public IArc setColor(float fgray){ super.setColor(fgray); return this; }
public IArc setColor(double dgray){ super.setColor(dgray); return this; }
public IArc setColor(int gray, int alpha){ super.setColor(gray,alpha); return this; }
public IArc setColor(float fgray, float falpha){ super.setColor(fgray,falpha); return this; }
public IArc setColor(double dgray, double dalpha){ super.setColor(dgray,dalpha); return this; }
public IArc setColor(int r, int g, int b){ super.setColor(r,g,b); return this; }
public IArc setColor(float fr, float fg, float fb){ super.setColor(fr,fg,fb); return this; }
public IArc setColor(double dr, double dg, double db){ super.setColor(dr,dg,db); return this; }
public IArc setColor(int r, int g, int b, int a){ super.setColor(r,g,b,a); return this; }
public IArc setColor(float fr, float fg, float fb, float fa){ super.setColor(fr,fg,fb,fa); return this; }
public IArc setColor(double dr, double dg, double db, double da){ super.setColor(dr,dg,db,da); return this; }
public IArc setHSBColor(float h, float s, float b, float a){ super.setHSBColor(h,s,b,a); return this; }
public IArc setHSBColor(double h, double s, double b, double a){ super.setHSBColor(h,s,b,a); return this; }
public IArc setHSBColor(float h, float s, float b){ super.setHSBColor(h,s,b); return this; }
public IArc setHSBColor(double h, double s, double b){ super.setHSBColor(h,s,b); return this; }
public IArc weight(double w){ super.weight(w); return this; }
public IArc weight(float w){ super.weight(w); return this; }
}