geomerative 1.1.0-java → 2.0.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.mvn/extensions.xml +1 -1
  4. data/.mvn/wrapper/maven-wrapper.properties +1 -1
  5. data/CHANGELOG.md +3 -0
  6. data/COPYING.md +1 -1
  7. data/README.md +0 -1
  8. data/Rakefile +2 -15
  9. data/docs/_includes/header.html +6 -6
  10. data/docs/_includes/icon-github.svg +3 -1
  11. data/docs/_includes/icon-twitter.svg +3 -1
  12. data/docs/_includes/navigation.html +18 -18
  13. data/docs/_sass/_base.scss +79 -79
  14. data/docs/_sass/_layout.scss +137 -137
  15. data/docs/_sass/_syntax-highlighting.scss +64 -64
  16. data/docs/index.html +18 -18
  17. data/examples/data/bot1.svg +1 -1
  18. data/examples/data/lion.svg +156 -156
  19. data/examples/data/ruby.svg +1 -1
  20. data/geomerative.gemspec +1 -2
  21. data/lib/geomerative/version.rb +1 -1
  22. data/mvnw +234 -0
  23. data/mvnw.cmd +145 -0
  24. data/pom.rb +14 -13
  25. data/pom.xml +14 -13
  26. data/src/geomerative/FastRClip.java +2149 -2156
  27. data/src/geomerative/RClip.java +2237 -2539
  28. data/src/geomerative/RClosest.java +33 -31
  29. data/src/geomerative/RCommand.java +1750 -1758
  30. data/src/geomerative/RContour.java +290 -292
  31. data/src/geomerative/RFont.java +277 -246
  32. data/src/geomerative/RG.java +722 -727
  33. data/src/geomerative/RGeomElem.java +967 -960
  34. data/src/geomerative/RGroup.java +508 -467
  35. data/src/geomerative/RMatrix.java +304 -289
  36. data/src/geomerative/RMesh.java +241 -229
  37. data/src/geomerative/RPath.java +924 -925
  38. data/src/geomerative/RPoint.java +391 -391
  39. data/src/geomerative/RPolygon.java +998 -988
  40. data/src/geomerative/RRectangle.java +43 -52
  41. data/src/geomerative/RSVG.java +480 -516
  42. data/src/geomerative/RShape.java +1767 -1777
  43. data/src/geomerative/RStrip.java +173 -176
  44. data/src/geomerative/RStyle.java +197 -194
  45. data/src/org/apache/batik/svggen/font/Font.java +141 -142
  46. data/src/org/apache/batik/svggen/font/Glyph.java +102 -71
  47. data/src/org/apache/batik/svggen/font/Point.java +12 -12
  48. data/src/org/apache/batik/svggen/font/RandomAccessFileEmulator.java +14 -12
  49. data/src/org/apache/batik/svggen/font/table/ClassDef.java +12 -12
  50. data/src/org/apache/batik/svggen/font/table/ClassDefFormat1.java +27 -24
  51. data/src/org/apache/batik/svggen/font/table/ClassDefFormat2.java +20 -17
  52. data/src/org/apache/batik/svggen/font/table/CmapFormat.java +43 -43
  53. data/src/org/apache/batik/svggen/font/table/CmapFormat0.java +33 -26
  54. data/src/org/apache/batik/svggen/font/table/CmapFormat2.java +25 -20
  55. data/src/org/apache/batik/svggen/font/table/CmapFormat4.java +106 -96
  56. data/src/org/apache/batik/svggen/font/table/CmapFormat6.java +36 -32
  57. data/src/org/apache/batik/svggen/font/table/CmapIndexEntry.java +69 -49
  58. data/src/org/apache/batik/svggen/font/table/CmapTable.java +50 -50
  59. data/src/org/apache/batik/svggen/font/table/Coverage.java +19 -19
  60. data/src/org/apache/batik/svggen/font/table/CoverageFormat1.java +30 -27
  61. data/src/org/apache/batik/svggen/font/table/CoverageFormat2.java +26 -24
  62. data/src/org/apache/batik/svggen/font/table/CvtTable.java +16 -16
  63. data/src/org/apache/batik/svggen/font/table/Device.java +32 -32
  64. data/src/org/apache/batik/svggen/font/table/DirectoryEntry.java +39 -39
  65. data/src/org/apache/batik/svggen/font/table/Feature.java +26 -23
  66. data/src/org/apache/batik/svggen/font/table/FeatureList.java +37 -35
  67. data/src/org/apache/batik/svggen/font/table/FeatureRecord.java +22 -22
  68. data/src/org/apache/batik/svggen/font/table/FeatureTags.java +4 -3
  69. data/src/org/apache/batik/svggen/font/table/FpgmTable.java +9 -9
  70. data/src/org/apache/batik/svggen/font/table/GlyfCompositeComp.java +134 -132
  71. data/src/org/apache/batik/svggen/font/table/GlyfCompositeDescript.java +123 -122
  72. data/src/org/apache/batik/svggen/font/table/GlyfDescript.java +44 -44
  73. data/src/org/apache/batik/svggen/font/table/GlyfSimpleDescript.java +110 -109
  74. data/src/org/apache/batik/svggen/font/table/GlyfTable.java +46 -46
  75. data/src/org/apache/batik/svggen/font/table/GlyphDescription.java +25 -13
  76. data/src/org/apache/batik/svggen/font/table/GposTable.java +26 -23
  77. data/src/org/apache/batik/svggen/font/table/GsubTable.java +85 -82
  78. data/src/org/apache/batik/svggen/font/table/HeadTable.java +131 -131
  79. data/src/org/apache/batik/svggen/font/table/HheaTable.java +80 -80
  80. data/src/org/apache/batik/svggen/font/table/HmtxTable.java +50 -49
  81. data/src/org/apache/batik/svggen/font/table/KernSubtable.java +29 -27
  82. data/src/org/apache/batik/svggen/font/table/KernSubtableFormat0.java +35 -32
  83. data/src/org/apache/batik/svggen/font/table/KernSubtableFormat2.java +28 -26
  84. data/src/org/apache/batik/svggen/font/table/KernTable.java +36 -31
  85. data/src/org/apache/batik/svggen/font/table/KerningPair.java +27 -23
  86. data/src/org/apache/batik/svggen/font/table/LangSys.java +28 -26
  87. data/src/org/apache/batik/svggen/font/table/LangSysRecord.java +22 -22
  88. data/src/org/apache/batik/svggen/font/table/Ligature.java +24 -24
  89. data/src/org/apache/batik/svggen/font/table/LigatureSet.java +24 -24
  90. data/src/org/apache/batik/svggen/font/table/LigatureSubst.java +9 -9
  91. data/src/org/apache/batik/svggen/font/table/LigatureSubstFormat1.java +30 -30
  92. data/src/org/apache/batik/svggen/font/table/LocaTable.java +37 -37
  93. data/src/org/apache/batik/svggen/font/table/Lookup.java +41 -40
  94. data/src/org/apache/batik/svggen/font/table/LookupList.java +34 -34
  95. data/src/org/apache/batik/svggen/font/table/LookupSubtableFactory.java +7 -5
  96. data/src/org/apache/batik/svggen/font/table/MaxpTable.java +96 -96
  97. data/src/org/apache/batik/svggen/font/table/NameRecord.java +64 -65
  98. data/src/org/apache/batik/svggen/font/table/NameTable.java +33 -33
  99. data/src/org/apache/batik/svggen/font/table/Os2Table.java +196 -196
  100. data/src/org/apache/batik/svggen/font/table/Panose.java +14 -12
  101. data/src/org/apache/batik/svggen/font/table/PostTable.java +338 -338
  102. data/src/org/apache/batik/svggen/font/table/PrepTable.java +9 -9
  103. data/src/org/apache/batik/svggen/font/table/Program.java +15 -15
  104. data/src/org/apache/batik/svggen/font/table/RangeRecord.java +26 -25
  105. data/src/org/apache/batik/svggen/font/table/Script.java +38 -38
  106. data/src/org/apache/batik/svggen/font/table/ScriptList.java +42 -42
  107. data/src/org/apache/batik/svggen/font/table/ScriptRecord.java +22 -22
  108. data/src/org/apache/batik/svggen/font/table/ScriptTags.java +2 -1
  109. data/src/org/apache/batik/svggen/font/table/SingleSubst.java +15 -16
  110. data/src/org/apache/batik/svggen/font/table/SingleSubstFormat1.java +33 -33
  111. data/src/org/apache/batik/svggen/font/table/SingleSubstFormat2.java +32 -32
  112. data/src/org/apache/batik/svggen/font/table/Table.java +171 -170
  113. data/src/org/apache/batik/svggen/font/table/TableDirectory.java +55 -55
  114. data/src/org/apache/batik/svggen/font/table/TableFactory.java +92 -93
  115. metadata +10 -11
  116. data/.travis.yml +0 -9
@@ -1,132 +1,138 @@
1
1
  /**
2
- Copyright 2004-2008 Ricard Marxer <email@ricardmarxer.com>
3
-
4
- This file is part of Geomerative.
5
-
6
- Geomerative is free software: you can redistribute it and/or modify
7
- it under the terms of the GNU General Public License as published by
8
- the Free Software Foundation, either version 3 of the License, or
9
- (at your option) any later version.
10
-
11
- Geomerative is distributed in the hope that it will be useful,
12
- but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- GNU General Public License for more details.
15
-
16
- You should have received a copy of the GNU General Public License
17
- along with Geomerative. If not, see <http://www.gnu.org/licenses/>.
18
- */
19
-
20
- package geomerative ;
21
-
2
+ * Copyright 2004-2008 Ricard Marxer <email@ricardmarxer.com>
3
+ *
4
+ * This file is part of Geomerative.
5
+ *
6
+ * Geomerative is free software: you can redistribute it and/or modify it under
7
+ * the terms of the GNU General Public License as published by the Free Software
8
+ * Foundation, either version 3 of the License, or (at your option) any later
9
+ * version.
10
+ *
11
+ * Geomerative is distributed in the hope that it will be useful, but WITHOUT
12
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14
+ * details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License along with
17
+ * Geomerative. If not, see <http://www.gnu.org/licenses/>.
18
+ */
19
+ package geomerative;
22
20
 
23
21
  import processing.core.PApplet;
24
22
  import processing.core.PConstants;
25
23
  import processing.core.PGraphics;
26
24
 
27
-
28
25
  /**
29
- * RMesh is a reduced interface for creating, holding and drawing meshes. A mesh is a group of triangular strips (RStrip).
30
- * @eexample RMesh
31
- * @usage Geometry
32
- * @related RStrip
33
- * @extended
26
+ * RMesh is a reduced interface for creating, holding and drawing meshes. A mesh
27
+ * is a group of triangular strips (RStrip).
28
+ *
29
+ RMesh
30
+ * Geometry
31
+ * RStrip
32
+
34
33
  */
35
- public class RMesh extends RGeomElem
36
- {
34
+ public class RMesh extends RGeomElem {
35
+
37
36
  /**
38
- * @invisible
37
+ *
39
38
  */
40
39
  public int type = RGeomElem.MESH;
41
-
40
+
42
41
  /**
43
- * Array of RStrip objects holding the contours of the polygon.
44
- * @eexample strips
45
- * @related RStrip
46
- * @related countStrips ( )
47
- * @related addStrip ( )
42
+ * Array of RStrip objects holding the contours of the polygon.
43
+ *
44
+ strips
45
+ * RStrip
46
+ * countStrips ( )
47
+ * addStrip ( )
48
48
  */
49
49
  public RStrip[] strips;
50
- int currentStrip=0;
50
+ int currentStrip = 0;
51
51
  // ----------------------
52
52
  // --- Public Methods ---
53
53
  // ----------------------
54
-
54
+
55
55
  /**
56
- * Create a new empty mesh.
57
- * @eexample createaMesh
56
+ * Create a new empty mesh.
57
+ *
58
+ createaMesh
58
59
  */
59
- public RMesh(){
60
+ public RMesh() {
60
61
  strips = null;
61
62
  type = RGeomElem.MESH;
62
63
  }
63
64
 
64
65
  /**
65
- * Copy a mesh.
66
- * @eexample createaMesh
67
- * @param m the object of which to make a copy
68
- */
69
- public RMesh(RMesh m){
70
- if(m == null){
66
+ * Copy a mesh.
67
+ *
68
+ createaMesh
69
+ * @param m the object of which to make a copy
70
+ */
71
+ public RMesh(RMesh m) {
72
+ if (m == null) {
71
73
  return;
72
74
  }
73
-
74
- for(int i=0;i<m.countStrips();i++){
75
+
76
+ for (int i = 0; i < m.countStrips(); i++) {
75
77
  this.append(new RStrip(m.strips[i]));
76
78
  }
77
79
  type = RGeomElem.MESH;
78
80
 
79
81
  setStyle(m);
80
82
  }
81
-
83
+
82
84
  /**
83
- * Use this method to count the number of strips in the mesh.
84
- * @eexample countStrips
85
+ * Use this method to count the number of strips in the mesh.
86
+ *
87
+ countStrips
85
88
  * @return int, the number strips in the mesh
86
- * @related addStrip ( )
89
+ * addStrip ( )
87
90
  */
88
- public int countStrips(){
89
- if(this.strips==null){
91
+ public int countStrips() {
92
+ if (this.strips == null) {
90
93
  return 0;
91
94
  }
92
-
95
+
93
96
  return this.strips.length;
94
97
  }
95
-
98
+
96
99
  /**
97
- * Add a new strip.
98
- * @eexample addStrip
99
- * @param s the strip to be added
100
- * @related addPoint ( )
101
- */
102
- public void addStrip(RStrip s){
100
+ * Add a new strip.
101
+ *
102
+ addStrip
103
+ * @param s the strip to be added
104
+ * addPoint ( )
105
+ */
106
+ public void addStrip(RStrip s) {
103
107
  this.append(s);
104
108
  }
105
109
 
106
- public void addStrip(){
110
+ public void addStrip() {
107
111
  this.append(new RStrip());
108
112
  }
109
-
113
+
110
114
  /**
111
- * Use this method to set the current strip to which append points.
112
- * @param indStrip
113
- * @eexample addStrip
114
- * @related addPoint ( )
115
- * @invisible
115
+ * Use this method to set the current strip to which append points.
116
+ *
117
+ * @param indStrip
118
+ addStrip
119
+ * addPoint ( )
120
+ *
116
121
  */
117
- public void setCurrent(int indStrip){
122
+ public void setCurrent(int indStrip) {
118
123
  this.currentStrip = indStrip;
119
124
  }
120
-
125
+
121
126
  /**
122
- * Add a new point to the current strip.
123
- * @eexample addPoint
124
- * @param p the point to be added
125
- * @related addStrip ( )
126
- * @related setCurrent ( )
127
- * @invisible
127
+ * Add a new point to the current strip.
128
+ *
129
+ addPoint
130
+ * @param p the point to be added
131
+ * addStrip ( )
132
+ * setCurrent ( )
133
+ *
128
134
  */
129
- public void addPoint(RPoint p){
135
+ public void addPoint(RPoint p) {
130
136
  if (strips == null) {
131
137
  this.append(new RStrip());
132
138
  }
@@ -134,292 +140,298 @@ public class RMesh extends RGeomElem
134
140
  }
135
141
 
136
142
  /**
137
- * Add a new point to the current strip.
138
- * @eexample addPoint
139
- * @param x the x coordinate of the point to be added
140
- * @param y the y coordinate of the point to be added
141
- * @related addStrip ( )
142
- * @related setCurrent ( )
143
- * @invisible
144
- */
145
- public void addPoint(float x, float y){
143
+ * Add a new point to the current strip.
144
+ *
145
+ addPoint
146
+ * @param x the x coordinate of the point to be added
147
+ * @param y the y coordinate of the point to be added
148
+ * addStrip ( )
149
+ * setCurrent ( )
150
+ *
151
+ */
152
+ public void addPoint(float x, float y) {
146
153
  if (strips == null) {
147
154
  this.append(new RStrip());
148
155
  }
149
- this.strips[currentStrip].append(new RPoint(x,y));
156
+ this.strips[currentStrip].append(new RPoint(x, y));
150
157
  }
151
-
158
+
152
159
  /**
153
- * Add a new point to the given strip.
154
- * @eexample addPoint
155
- * @param indStrip the index of the strip to which the point will be added
156
- * @param p the point to be added
157
- * @related addStrip ( )
158
- * @related setCurrent ( )
159
- * @invisible
160
+ * Add a new point to the given strip.
161
+ *
162
+ addPoint
163
+ * @param indStrip the index of the strip to which the point will be added
164
+ * @param p the point to be added
165
+ * addStrip ( )
166
+ * setCurrent ( )
167
+ *
160
168
  */
161
- public void addPoint(int indStrip, RPoint p){
169
+ public void addPoint(int indStrip, RPoint p) {
162
170
  if (strips == null) {
163
171
  this.append(new RStrip());
164
172
  }
165
173
  this.strips[indStrip].append(p);
166
174
  }
167
-
175
+
168
176
  /**
169
- * Add a new point to the given strip.
170
- * @eexample addPoint
171
- * @param indStrip the index of the strip to which the point will be added
172
- * @param x the x coordinate of the point to be added
173
- * @param y the y coordinate of the point to be added
174
- * @related addStrip ( )
175
- * @related setCurrent ( )
176
- * @invisible
177
+ * Add a new point to the given strip.
178
+ *
179
+ addPoint
180
+ * @param indStrip the index of the strip to which the point will be added
181
+ * @param x the x coordinate of the point to be added
182
+ * @param y the y coordinate of the point to be added
183
+ * addStrip ( )
184
+ * setCurrent ( )
185
+ *
177
186
  */
178
- public void addPoint(int indStrip, float x, float y){
187
+ public void addPoint(int indStrip, float x, float y) {
179
188
  if (strips == null) {
180
189
  this.append(new RStrip());
181
190
  }
182
- this.strips[indStrip].append(new RPoint(x,y));
191
+ this.strips[indStrip].append(new RPoint(x, y));
183
192
  }
184
-
193
+
185
194
  /**
186
195
  * Use this method to draw the mesh.
187
- * @eexample drawMesh
196
+ *
197
+ drawMesh
188
198
  * @param g PGraphics, the graphics object on which to draw the mesh
189
199
  */
190
200
  @Override
191
- public void draw(PGraphics g){
192
- for(int i=0;i<this.countStrips();i++){
201
+ public void draw(PGraphics g) {
202
+ for (int i = 0; i < this.countStrips(); i++) {
193
203
  g.beginShape(PConstants.TRIANGLE_STRIP);
194
- if(this.style.texture != null)
195
- {
196
- g.texture(this.style.texture);
197
- for (RPoint vertice : this.strips[i].vertices) {
198
- float x = vertice.x;
199
- float y = vertice.y;
200
- /*
204
+ if (this.style.texture != null) {
205
+ g.texture(this.style.texture);
206
+ for (RPoint vertice : this.strips[i].vertices) {
207
+ float x = vertice.x;
208
+ float y = vertice.y;
209
+ /*
201
210
  float u = (x - minx)/(maxx-minx) * this.style.texture.width;
202
211
  float v = (y - miny)/(maxy-miny) * this.style.texture.height;
203
- */
204
- g.vertex(x, y, x, y);
205
- }
206
- }else{
207
- for (RPoint vertice : this.strips[i].vertices) {
208
- float x = vertice.x;
209
- float y = vertice.y;
210
- g.vertex(x, y);
211
- }
212
+ */
213
+ g.vertex(x, y, x, y);
214
+ }
215
+ } else {
216
+ for (RPoint vertice : this.strips[i].vertices) {
217
+ float x = vertice.x;
218
+ float y = vertice.y;
219
+ g.vertex(x, y);
220
+ }
212
221
  }
213
222
  g.endShape(PConstants.CLOSE);
214
223
  }
215
-
216
-
224
+
217
225
  }
218
-
226
+
219
227
  @Override
220
- public void draw(PApplet g){
221
- for(int i=0;i<this.countStrips();i++){
228
+ public void draw(PApplet g) {
229
+ for (int i = 0; i < this.countStrips(); i++) {
222
230
  g.beginShape(PConstants.TRIANGLE_STRIP);
223
- if(this.style.texture != null)
224
- {
225
- g.texture(this.style.texture);
226
- }
227
- for (RPoint vertice : this.strips[i].vertices) {
228
- g.vertex(vertice.x, vertice.y);
229
- }
231
+ if (this.style.texture != null) {
232
+ g.texture(this.style.texture);
233
+ }
234
+ for (RPoint vertice : this.strips[i].vertices) {
235
+ g.vertex(vertice.x, vertice.y);
236
+ }
230
237
  g.endShape(PConstants.CLOSE);
231
238
  }
232
- }
233
-
239
+ }
240
+
234
241
  /**
235
- * Use this to get the vertices of the mesh. It returns the points as an array of RPoint.
236
- * @eexample RMesh_getHandles
242
+ * Use this to get the vertices of the mesh. It returns the points as an array
243
+ * of RPoint.
244
+ *
245
+ RMesh_getHandles
237
246
  * @return RPoint[], the vertices returned in an array.
238
- * */
247
+ *
248
+ */
239
249
  @Override
240
- public RPoint[] getHandles(){
250
+ public RPoint[] getHandles() {
241
251
  int numStrips = countStrips();
242
- if(numStrips == 0){
252
+ if (numStrips == 0) {
243
253
  return null;
244
254
  }
245
-
246
- RPoint[] result=null;
255
+
256
+ RPoint[] result = null;
247
257
  RPoint[] newresult;
248
- for(int i=0;i<numStrips;i++){
258
+ for (int i = 0; i < numStrips; i++) {
249
259
  RPoint[] newPoints = strips[i].getHandles();
250
- if(newPoints!=null){
251
- if(result==null){
260
+ if (newPoints != null) {
261
+ if (result == null) {
252
262
  result = new RPoint[newPoints.length];
253
- System.arraycopy(newPoints,0,result,0,newPoints.length);
254
- }else{
263
+ System.arraycopy(newPoints, 0, result, 0, newPoints.length);
264
+ } else {
255
265
  newresult = new RPoint[result.length + newPoints.length];
256
- System.arraycopy(result,0,newresult,0,result.length);
257
- System.arraycopy(newPoints,0,newresult,result.length,newPoints.length);
266
+ System.arraycopy(result, 0, newresult, 0, result.length);
267
+ System.arraycopy(newPoints, 0, newresult, result.length, newPoints.length);
258
268
  result = newresult;
259
269
  }
260
270
  }
261
271
  }
262
272
  return result;
263
273
  }
264
-
274
+
265
275
  /**
266
- * Use this to get the vertices of the mesh. It returns the points as an array of RPoint.
267
- * @eexample RMesh_getPoints
276
+ * Use this to get the vertices of the mesh. It returns the points as an array
277
+ * of RPoint.
278
+ *
279
+ RMesh_getPoints
268
280
  * @return RPoint[], the vertices returned in an array.
269
- * */
281
+ *
282
+ */
270
283
  @Override
271
- public RPoint[] getPoints(){
284
+ public RPoint[] getPoints() {
272
285
  int numStrips = countStrips();
273
- if(numStrips == 0){
286
+ if (numStrips == 0) {
274
287
  return null;
275
288
  }
276
-
277
- RPoint[] result=null;
289
+
290
+ RPoint[] result = null;
278
291
  RPoint[] newresult;
279
- for(int i=0;i<numStrips;i++){
292
+ for (int i = 0; i < numStrips; i++) {
280
293
  RPoint[] newPoints = strips[i].getPoints();
281
- if(newPoints!=null){
282
- if(result==null){
294
+ if (newPoints != null) {
295
+ if (result == null) {
283
296
  result = new RPoint[newPoints.length];
284
- System.arraycopy(newPoints,0,result,0,newPoints.length);
285
- }else{
297
+ System.arraycopy(newPoints, 0, result, 0, newPoints.length);
298
+ } else {
286
299
  newresult = new RPoint[result.length + newPoints.length];
287
- System.arraycopy(result,0,newresult,0,result.length);
288
- System.arraycopy(newPoints,0,newresult,result.length,newPoints.length);
300
+ System.arraycopy(result, 0, newresult, 0, result.length);
301
+ System.arraycopy(newPoints, 0, newresult, result.length, newPoints.length);
289
302
  result = newresult;
290
303
  }
291
304
  }
292
305
  }
293
306
  return result;
294
307
  }
295
-
308
+
296
309
  @Override
297
- public RPoint getPoint(float t){
310
+ public RPoint getPoint(float t) {
298
311
  PApplet.println("Feature not yet implemented for this class.");
299
312
  return null;
300
313
  }
301
314
 
302
315
  @Override
303
- public RPoint getTangent(float t){
316
+ public RPoint getTangent(float t) {
304
317
  PApplet.println("Feature not yet implemented for this class.");
305
318
  return null;
306
319
  }
307
-
320
+
308
321
  @Override
309
- public RPoint[] getTangents(){
322
+ public RPoint[] getTangents() {
310
323
  PApplet.println("Feature not yet implemented for this class.");
311
324
  return null;
312
325
  }
313
326
 
314
327
  @Override
315
- public RPoint[][] getPointsInPaths(){
328
+ public RPoint[][] getPointsInPaths() {
316
329
  PApplet.println("Feature not yet implemented for this class.");
317
330
  return null;
318
331
  }
319
332
 
320
- /**
321
- *
322
- * @return
323
- */
324
- @Override
325
- public RPoint[][] getHandlesInPaths(){
333
+ /**
334
+ *
335
+ * @return
336
+ */
337
+ @Override
338
+ public RPoint[][] getHandlesInPaths() {
326
339
  PApplet.println("Feature not yet implemented for this class.");
327
340
  return null;
328
341
  }
329
342
 
330
- /**
331
- *
332
- * @return
333
- */
334
- @Override
335
- public RPoint[][] getTangentsInPaths(){
343
+ /**
344
+ *
345
+ * @return
346
+ */
347
+ @Override
348
+ public RPoint[][] getTangentsInPaths() {
336
349
  PApplet.println("Feature not yet implemented for this class.");
337
350
  return null;
338
351
  }
339
352
 
340
- /**
341
- *
342
- * @param p
343
- * @return
344
- */
345
- @Override
346
- public boolean contains(RPoint p){
353
+ /**
354
+ *
355
+ * @param p
356
+ * @return
357
+ */
358
+ @Override
359
+ public boolean contains(RPoint p) {
347
360
  PApplet.println("Feature not yet implemented for this class.");
348
361
  return false;
349
362
  }
350
-
363
+
351
364
  /**
352
365
  * Use this method to get the type of element this is.
353
- * @eexample RMesh_getType
366
+ *
367
+ RMesh_getType
354
368
  * @return int, will allways return RGeomElem.MESH
355
369
  */
356
370
  @Override
357
- public int getType(){
371
+ public int getType() {
358
372
  return type;
359
373
  }
360
-
374
+
361
375
  /**
362
376
  * Use this method to transform the mesh.
363
- * @eexample transformMesh
364
- * @param m RMatrix, the matrix of the affine transformation to apply to the mesh
377
+ *
378
+ transformMesh
379
+ * @param m RMatrix, the matrix of the affine transformation to apply to the
380
+ * mesh
365
381
  */
366
382
  @Override
367
- public void transform(RMatrix m){
383
+ public void transform(RMatrix m) {
368
384
  int numStrips = countStrips();
369
- if(numStrips!=0){
370
- for(int i=0;i<numStrips;i++){
385
+ if (numStrips != 0) {
386
+ for (int i = 0; i < numStrips; i++) {
371
387
  strips[i].transform(m);
372
388
  }
373
389
  }
374
390
  }
375
-
391
+
376
392
  /**
377
- * @return
378
- * @invisible
393
+ * @return
379
394
  */
380
395
  @Override
381
- public RMesh toMesh(){
396
+ public RMesh toMesh() {
382
397
  return this;
383
398
  }
384
-
399
+
385
400
  /**
386
- * @return
387
- * @invisible
401
+ * @return
388
402
  */
389
403
  @Override
390
- public RPolygon toPolygon() throws RuntimeException{
404
+ public RPolygon toPolygon() throws RuntimeException {
391
405
  throw new RuntimeException("Transforming a Mesh to a Polygon is not yet implemented.");
392
406
  }
393
-
407
+
394
408
  /**
395
- * @return
396
- * @invisible
409
+ * @return
397
410
  */
398
411
  @Override
399
- public RShape toShape() throws RuntimeException{
412
+ public RShape toShape() throws RuntimeException {
400
413
  throw new RuntimeException("Transforming a Mesh to a Shape is not yet implemented.");
401
414
  }
402
-
415
+
403
416
  /**
404
- * Remove all of the points. Creates an empty polygon.
417
+ * Remove all of the points. Creates an empty polygon.
405
418
  */
406
- void clear(){
419
+ void clear() {
407
420
  this.strips = null;
408
421
  }
409
-
410
- final void append(RStrip nextstrip)
411
- {
422
+
423
+ final void append(RStrip nextstrip) {
412
424
  RStrip[] newstrips;
413
- if(strips==null){
425
+ if (strips == null) {
414
426
  newstrips = new RStrip[1];
415
427
  newstrips[0] = nextstrip;
416
428
  currentStrip = 0;
417
- }else{
418
- newstrips = new RStrip[this.strips.length+1];
419
- System.arraycopy(this.strips,0,newstrips,0,this.strips.length);
420
- newstrips[this.strips.length]=nextstrip;
429
+ } else {
430
+ newstrips = new RStrip[this.strips.length + 1];
431
+ System.arraycopy(this.strips, 0, newstrips, 0, this.strips.length);
432
+ newstrips[this.strips.length] = nextstrip;
421
433
  currentStrip++;
422
434
  }
423
- this.strips=newstrips;
435
+ this.strips = newstrips;
424
436
  }
425
437
  }