- Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathLineSegment.java
More file actions
Latest commit
95 lines (90 loc) · 2.13 KB
/
Copy pathLineSegment.java
File metadata and controls
95 lines (90 loc) · 2.13 KB
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
importjavax.vecmath.Point3f;
publicclassLineSegment {
privateintlayer;
privateinttoolhead = 0; //DEFAULT TOOLHEAD ASSUMED TO BE 0!
privatefloatspeed;
privatePoint3ffirst, second;
privatebooleanisExtruding;
publicLineSegment (Point3fa,Point3fb, intlayernum, floatspeedz)
{
first = a;
second = b;
layer = layernum;
speed = speedz;
}
publicLineSegment (Point3fa,Point3fb, intlayernum, floatspeedz, booleanextrudz)
{
first = a;
second = b;
layer = layernum;
speed = speedz;
isExtruding = extrudz;
}
publicLineSegment(floatx1, floaty1, floatz1, floatx2, floaty2, floatz2, intlayernum, floatspeedz)
{
first = newPoint3f(x1, y1, z1);
second = newPoint3f(x2, y2, z2);
layernum = layer;
speed = speedz;
}
publicLineSegment (Point3fa,Point3fb, intlayernum, floatspeedz, inttoolheadz)
{
first = a;
second = b;
layer = layernum;
speed = speedz;
toolhead = toolheadz;
}
publicLineSegment(floatx1, floaty1, floatz1, floatx2, floaty2, floatz2, intlayernum, floatspeedz, inttoolheadz)
{
first = newPoint3f(x1, y1, z1);
second = newPoint3f(x2, y2, z2);
layernum = layer;
speed = speedz;
toolhead = toolheadz;
}
publicLineSegment (Point3fa,Point3fb, intlayernum, floatspeedz, inttoolheadz, booleanextrudz)
{
first = a;
second = b;
layer = layernum;
speed = speedz;
toolhead = toolheadz;
isExtruding = extrudz;
}
publicLineSegment(floatx1, floaty1, floatz1, floatx2, floaty2, floatz2, intlayernum, floatspeedz, inttoolheadz, booleanextrudz)
{
first = newPoint3f(x1, y1, z1);
second = newPoint3f(x2, y2, z2);
layernum = layer;
speed = speedz;
toolhead = toolheadz;
isExtruding = extrudz;
}
publicPoint3f[] getPointArray()
{
Point3f[] pointarr = { first, second };
returnpointarr;
}
publicfloat[] getPoints()
{
float[] points = {first.x, first.y, first.z , second.x, second.y, second.z };
returnpoints;
}
publicintgetToolhead()
{
returntoolhead;
}
publicfloatgetSpeed()
{
returnspeed;
}
publicintgetLayer()
{
returnlayer;
}
publicbooleangetExtruding()
{
returnisExtruding;
}
}