diff --git a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java index 43720b44..46ef9918 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/CSG.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/CSG.java @@ -1,4 +1,4 @@ -/** +/* * CSG.java * * Copyright 2014-2014 Michael Hoffer info@michaelhoffer.de. All rights @@ -45,7 +45,6 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; @@ -58,22 +57,19 @@ import javafx.scene.shape.CullFace; import javafx.scene.shape.DrawMode; import javafx.scene.shape.MeshView; -import javafx.scene.shape.TriangleMesh; import javafx.scene.transform.Affine; -// TODO: Auto-generated Javadoc /** * Constructive Solid Geometry (CSG). - * + *

* This implementation is a Java port of - * - * href="https://github.com/evanw/csg.js/" https://github.com/evanw/csg.js/ with - * some additional features like polygon extrude, transformations etc. Thanks to + *

+ * https://github.com/evanw/csg.js/ + * with some additional features like polygon extrude, transformations etc. Thanks to * the author for creating the CSG.js library.
- *
- * - * Implementation Details - * + *

+ * Implementation Details + *

* All CSG operations are implemented in terms of two functions, * {@link Node#clipTo(eu.mihosoft.vrl.v3d.Node)} and {@link Node#invert()}, * which remove parts of a BSP tree inside another BSP tree and swap solid and @@ -81,22 +77,28 @@ * want to remove everything in {@code a} inside {@code b} and everything in * {@code b} inside {@code a}, then combine polygons from {@code a} and * {@code b} into one solid: - * - * - * a.clipTo(b); b.clipTo(a); a.build(b.allPolygons()); - * - * + *

+ *

+ *     a.clipTo(b);
+ *     b.clipTo(a);
+ *     a.build(b.allPolygons());
+ * 
+ *

* The only tricky part is handling overlapping coplanar polygons in both trees. * The code above keeps both copies, but we need to keep them in one tree and * remove them in the other tree. To remove them from {@code b} we can clip the * inverse of {@code b} against {@code a}. The code for union now looks like * this: - * - * - * a.clipTo(b); b.clipTo(a); b.invert(); b.clipTo(a); b.invert(); - * a.build(b.allPolygons()); - * - * + *

+ *

+ *     a.clipTo(b);
+ *     b.clipTo(a);
+ *     b.invert();
+ *     b.clipTo(a);
+ *     b.invert();
+ *     a.build(b.allPolygons());
+ * 
+ *

* Subtraction and intersection naturally follow from set operations. If union * is {@code A | B}, differenceion is {@code A - B = ~(~A | B)} and intersection * is {@code A & B = @@ -214,7 +216,7 @@ public CSG setColor(Color color) { /** * Sets the Temporary color. * - * @param Temporary color the new Temporary color + * @param color the new Temporary color */ public CSG setTemporaryColor(Color color) { if (current != null) { @@ -711,16 +713,21 @@ public CSG optimization(OptType type) { /** * Return a new CSG solid representing the union of this csg and the specified * csg. - * - * Note: Neither this csg nor the specified csg are weighted. - * - * - * A.union(B) - * - * +-------+ +-------+ | | | | | A | | | | +--+----+ = | +----+ +----+--+ | - * +----+ | | B | | | | | | | +-------+ +-------+ - * - * + *

+ * Note: Neither this csg nor the specified csg are weighted. + *

+ *

+	 *    A.union(B)
+	 *
+	 *    +-------+            +-------+
+	 *    |       |            |       |
+	 *    |   A   |            |       |
+	 *    |    +--+----+   =   |       +----+
+	 *    +----+--+    |       +----+       |
+	 *         |   B   |            |       |
+	 *         |       |            |       |
+	 *         +-------+            +-------+
+	 * 
* * @param csg other csg * @@ -742,11 +749,11 @@ public CSG union(CSG csg) { /** * Returns a csg consisting of the polygons of this csg and the specified csg. - * + *

* The purpose of this method is to allow fast union operations for objects that * do not intersect. - * - * WARNING: this method does not apply the csg algorithms. Therefore, please + *

+ * WARNING: this method does not apply the csg algorithms. Therefore, please * ensure that this csg and the specified csg do not intersect. * * @param csg csg @@ -767,16 +774,21 @@ public CSG dumbUnion(CSG csg) { /** * Return a new CSG solid representing the union of this csg and the specified * csgs. - * - * Note: Neither this csg nor the specified csg are weighted. - * - * - * A.union(B) - * - * +-------+ +-------+ | | | | | A | | | | +--+----+ = | +----+ +----+--+ | - * +----+ | | B | | | | | | | +-------+ +-------+ - * - * + *

+ * Note: Neither this csg nor the specified csg are weighted. + *

+ *

+	 *    A.union(B)
+	 *
+	 *    +-------+            +-------+
+	 *    |       |            |       |
+	 *    |   A   |            |       |
+	 *    |    +--+----+   =   |       +----+
+	 *    +----+--+    |       +----+       |
+	 *         |   B   |            |       |
+	 *         |       |            |       |
+	 *         +-------+            +-------+
+	 * 
* * @param csgs other csgs * @@ -822,16 +834,21 @@ public CSG union(List csgs) { /** * Return a new CSG solid representing the union of this csg and the specified * csgs. - * - * Note: Neither this csg nor the specified csg are weighted. - * - * - * A.union(B) - * - * +-------+ +-------+ | | | | | A | | | | +--+----+ = | +----+ +----+--+ | - * +----+ | | B | | | | | | | +-------+ +-------+ - * - * + *

+ * Note: Neither this csg nor the specified csg are weighted. + *

+ *

+	 *    A.union(B)
+	 *
+	 *    +-------+            +-------+
+	 *    |       |            |       |
+	 *    |   A   |            |       |
+	 *    |    +--+----+   =   |       +----+
+	 *    +----+--+    |       +----+       |
+	 *         |   B   |            |       |
+	 *         |       |            |       |
+	 *         +-------+            +-------+
+	 * 
* * @param csgs other csgs * @@ -1022,15 +1039,21 @@ private CSG _unionNoOpt(CSG csg) { /** * Return a new CSG solid representing the difference of this csg and the * specified csgs. - * - * Note: Neither this csg nor the specified csgs are weighted. - * - * + *

+ * Note: Neither this csg nor the specified csgs are weighted. + *

+ *

 	 * A.difference(B)
 	 *
-	 * +-------+ +-------+ | | | | | A | | | | +--+----+ = | +--+ +----+--+ | +----+
-	 * | B | | | +-------+
-	 * 
+	 * +-------+            +-------+
+	 * |       |            |       |
+	 * |   A   |            |       |
+	 * |    +--+----+   =   |    +--+
+	 * +----+--+    |       +----+
+	 *      |   B   |
+	 *      |       |
+	 *      +-------+
+	 * 
* * @param csgs other csgs * @return difference of this csg and the specified csgs @@ -1057,15 +1080,21 @@ public CSG difference(List csgs) { /** * Return a new CSG solid representing the difference of this csg and the * specified csgs. - * - * Note: Neither this csg nor the specified csgs are weighted. - * - * + *

+ * Note: Neither this csg nor the specified csgs are weighted. + *

+ *

 	 * A.difference(B)
 	 *
-	 * +-------+ +-------+ | | | | | A | | | | +--+----+ = | +--+ +----+--+ | +----+
-	 * | B | | | +-------+
-	 * 
+	 * +-------+            +-------+
+	 * |       |            |       |
+	 * |   A   |            |       |
+	 * |    +--+----+   =   |    +--+
+	 * +----+--+    |       +----+
+	 *      |   B   |
+	 *      |       |
+	 *      +-------+
+	 * 
* * @param csgs other csgs * @return difference of this csg and the specified csgs @@ -1078,15 +1107,21 @@ public CSG difference(CSG... csgs) { /** * Return a new CSG solid representing the difference of this csg and the * specified csg. - * - * Note: Neither this csg nor the specified csg are weighted. - * - * + *

+ * Note: Neither this csg nor the specified csg are weighted. + *

+ *

 	 * A.difference(B)
 	 *
-	 * +-------+ +-------+ | | | | | A | | | | +--+----+ = | +--+ +----+--+ | +----+
-	 * | B | | | +-------+
-	 * 
+	 * +-------+            +-------+
+	 * |       |            |       |
+	 * |   A   |            |       |
+	 * |    +--+----+   =   |    +--+
+	 * +----+--+    |       +----+
+	 *      |   B   |
+	 *      |       |
+	 *      +-------+
+	 * 
* * @param csg other csg * @return difference of this csg and the specified csg @@ -1217,14 +1252,22 @@ private CSG _differenceNoOpt(CSG csg) { /** * Return a new CSG solid representing the intersection of this csg and the * specified csg. - * - * Note: Neither this csg nor the specified csg are weighted. - * - * - * A.intersect(B) - * - * +-------+ | | | A | | +--+----+ = +--+ +----+--+ | +--+ | B | | | +-------+ } - * + *

+ * Note: Neither this csg nor the specified csg are weighted. + *

+ *

+	 *     A.intersect(B)
+	 *
+	 *     +-------+
+	 *     |       |
+	 *     |   A   |
+	 *     |    +--+----+   =   +--+
+	 *     +----+--+    |       +--+
+	 *          |   B   |
+	 *          |       |
+	 *          +-------+
+	 * }
+	 * 
* * @param csg other csg * @return intersection of this csg and the specified csg @@ -1252,14 +1295,22 @@ public CSG intersect(CSG csg) { /** * Return a new CSG solid representing the intersection of this csg and the * specified csgs. - * - * Note: Neither this csg nor the specified csgs are weighted. - * - * - * A.intersect(B) - * - * +-------+ | | | A | | +--+----+ = +--+ +----+--+ | +--+ | B | | | +-------+ } - * + *

+ * Note: Neither this csg nor the specified csgs are weighted. + *

+ *

+	 *     A.intersect(B)
+	 *
+	 *     +-------+
+	 *     |       |
+	 *     |   A   |
+	 *     |    +--+----+   =   +--+
+	 *     +----+--+    |       +--+
+	 *          |   B   |
+	 *          |       |
+	 *          +-------+
+	 * }
+	 * 
* * @param csgs other csgs * @return intersection of this csg and the specified csgs @@ -1286,14 +1337,22 @@ public CSG intersect(List csgs) { /** * Return a new CSG solid representing the intersection of this csg and the * specified csgs. - * - * Note: Neither this csg nor the specified csgs are weighted. - * - * - * A.intersect(B) - * - * +-------+ | | | A | | +--+----+ = +--+ +----+--+ | +--+ | B | | | +-------+ } - * + *

+ * Note: Neither this csg nor the specified csgs are weighted. + *

+ *

+	 *     A.intersect(B)
+	 *
+	 *     +-------+
+	 *     |       |
+	 *     |   A   |
+	 *     |    +--+----+   =   +--+
+	 *     +----+--+    |       +--+
+	 *          |   B   |
+	 *          |       |
+	 *          +-------+
+	 * }
+	 * 
* * @param csgs other csgs * @return intersection of this csg and the specified csgs @@ -2346,9 +2405,6 @@ public ArrayList getExportFormats() { return exportFormats; } - /** - * @return the exportFormats - */ public void clearExportFormats() { if (exportFormats != null) exportFormats.clear(); @@ -2411,36 +2467,35 @@ public void setStorage(PropertyStorage storage) { * is the thinnest dimension. Assumes board thickness can be arbitrary but * uniform height. Assumes the edge having tabs added extends fully between Min * and Max in that dimension. - * + *

* TODO: Find the polygon defined by the XY plane slice that is perhaps 0.5mm * into the normalized +Y. Add tabs to THAT polygon's minX/maxX instead of * part's global minX/maxX. - * + *

* Example usage: // Create a temporary copy of the target object, without any * tabs CSG boardTemp = board - * + *

* // Instantiate a bucket to hold fastener CSG objects in ArrayList * fasteners = [] - * + *

* // Define the direction of the edge to be tabbed using a Vector3d object, in * this case the edge facing in the negative Y direction Vector3d edgeDirection * = new Vector3d(0, -1, 0); - * + *

* // Define the diameter of the fastener holes to be added using a * LengthParameter object LengthParameter screwDiameter = new * LengthParameter("Screw Hole Diameter (mm)", 3, [0, 20]) - * + *

* // Add tabs to the temporary object using the edgeDirection and screwDiameter * parameters ArrayList returned = boardTemp.addTabs(edgeDirection, * screwDiameter); - * + *

* // Combine the modified temporary object with the original object, to add the * new tabs board = boardTemp.union(returned.get(0)); - * + *

* // Add the separate fastener hole objects to the list fasteners = * returned.subList(1, returned.size()); * - * @param boardInput the original CSG object to add tabs to * @param edgeDirection a Vector3d object representing the direction of the edge * of the board to which tabs and fastener holes will be * added diff --git a/src/main/java/eu/mihosoft/vrl/v3d/ChamferedCylinder.java b/src/main/java/eu/mihosoft/vrl/v3d/ChamferedCylinder.java index ee44095e..337b47b2 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/ChamferedCylinder.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/ChamferedCylinder.java @@ -16,9 +16,9 @@ public PropertyStorage getProperties() { * Constructor. Creates a new cuboid with center {@code [0,0,0]} and with the specified * dimensions. * - * @param w width + * @param r radius * @param h height - * @param d depth + * @param chamferHeight the chamfer height */ public ChamferedCylinder(double r, double h, double chamferHeight) { this.r = r; diff --git a/src/main/java/eu/mihosoft/vrl/v3d/Dodecahedron.java b/src/main/java/eu/mihosoft/vrl/v3d/Dodecahedron.java index 438ba25f..1ddb983b 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/Dodecahedron.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/Dodecahedron.java @@ -7,8 +7,6 @@ import java.util.List; import eu.mihosoft.vrl.v3d.ext.quickhull3d.HullUtil; -import eu.mihosoft.vrl.v3d.parametrics.LengthParameter; -import eu.mihosoft.vrl.v3d.parametrics.Parameter; public class Dodecahedron extends Primitive { @@ -51,7 +49,7 @@ public Dodecahedron(double size) { * radius. * * @param center center of the dodecahedron - * @param circumradius of the dodecahedron + * @param size of the dodecahedron */ public Dodecahedron(Vector3d center, double size) { this.center = center; diff --git a/src/main/java/eu/mihosoft/vrl/v3d/Edge.java b/src/main/java/eu/mihosoft/vrl/v3d/Edge.java index b2b926c2..5a7d068c 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/Edge.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/Edge.java @@ -14,7 +14,6 @@ import java.util.stream.Stream; import eu.mihosoft.vrl.v3d.ext.org.poly2tri.PolygonUtil; -// TODO: Auto-generated Javadoc /** * The Class Edge. * @@ -526,7 +525,6 @@ public static List _toPolygons(List boundaryEdges, Plane plane) { * Determines whether the specified point is colinear * * @param p point to check - * @param TOL tolerance * @return true if the specified point lies on this line * segment; false otherwise */ diff --git a/src/main/java/eu/mihosoft/vrl/v3d/Fillet.java b/src/main/java/eu/mihosoft/vrl/v3d/Fillet.java index 2689c293..7d1ae61c 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/Fillet.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/Fillet.java @@ -20,7 +20,6 @@ public PropertyStorage getProperties() { * * @param w width * @param h height - * @param d depth */ public Fillet(double w, double h) { this.w = w; diff --git a/src/main/java/eu/mihosoft/vrl/v3d/Icosahedron.java b/src/main/java/eu/mihosoft/vrl/v3d/Icosahedron.java index 270eff85..a4efc430 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/Icosahedron.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/Icosahedron.java @@ -1,4 +1,4 @@ -/** +/* * Icosahedron.java */ package eu.mihosoft.vrl.v3d; @@ -7,8 +7,6 @@ import java.util.List; import eu.mihosoft.vrl.v3d.ext.quickhull3d.HullUtil; -import eu.mihosoft.vrl.v3d.parametrics.LengthParameter; -import eu.mihosoft.vrl.v3d.parametrics.Parameter; public class Icosahedron extends Primitive { @@ -51,7 +49,7 @@ public Icosahedron(double size) { * radius. * * @param center center of the icosahedron - * @param circumradius of the icosahedron + * @param size of the icosahedron */ public Icosahedron(Vector3d center, double size) { this.center = center; diff --git a/src/main/java/eu/mihosoft/vrl/v3d/Octahedron.java b/src/main/java/eu/mihosoft/vrl/v3d/Octahedron.java index 8a644694..b0fcaa97 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/Octahedron.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/Octahedron.java @@ -1,4 +1,4 @@ -/** +/* * Octahedron.java */ package eu.mihosoft.vrl.v3d; @@ -7,8 +7,6 @@ import java.util.List; import eu.mihosoft.vrl.v3d.ext.quickhull3d.HullUtil; -import eu.mihosoft.vrl.v3d.parametrics.LengthParameter; -import eu.mihosoft.vrl.v3d.parametrics.Parameter; public class Octahedron extends Primitive { @@ -51,7 +49,7 @@ public Octahedron(double size) { * radius. * * @param center center of the octahedron - * @param circumradius of the octahedron + * @param size of the octahedron */ public Octahedron(Vector3d center, double size) { this.center = center; diff --git a/src/main/java/eu/mihosoft/vrl/v3d/Tetrahedron.java b/src/main/java/eu/mihosoft/vrl/v3d/Tetrahedron.java index c2dc6430..05c6e1b0 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/Tetrahedron.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/Tetrahedron.java @@ -1,4 +1,4 @@ -/** +/* * Tetrahedron.java */ package eu.mihosoft.vrl.v3d; @@ -51,7 +51,7 @@ public Tetrahedron(double size) { * radius. * * @param center center of the tetrahedron - * @param circumradius of the tetrahedron + * @param size of the tetrahedron */ public Tetrahedron(Vector3d center, double size) { this.center = center; diff --git a/src/main/java/eu/mihosoft/vrl/v3d/Toroid.java b/src/main/java/eu/mihosoft/vrl/v3d/Toroid.java index 602e8bdb..70447843 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/Toroid.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/Toroid.java @@ -1,4 +1,4 @@ -/** +/* * Cylinder.java * * Copyright 2014-2014 Michael Hoffer info@michaelhoffer.de. All rights @@ -37,14 +37,10 @@ import java.util.Arrays; import java.util.List; -import eu.mihosoft.vrl.v3d.ext.org.poly2tri.PolygonUtil; -import eu.mihosoft.vrl.v3d.parametrics.LengthParameter; - -// TODO: Auto-generated Javadoc /** * A solid cylinder. - * - * The tessellation can be controlled via the {@link #numSlices} parameter. + *

+ * The tessellation can be controlled via the numSlices parameter. * * @author Michael Hoffer <info@michaelhoffer.de> */ diff --git a/src/main/java/eu/mihosoft/vrl/v3d/ext/openjfx/importers/obj/FloatArrayList.java b/src/main/java/eu/mihosoft/vrl/v3d/ext/openjfx/importers/obj/FloatArrayList.java index 80b1a3d4..ada5bd90 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/ext/openjfx/importers/obj/FloatArrayList.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/ext/openjfx/importers/obj/FloatArrayList.java @@ -52,44 +52,44 @@ * and doesn't permit null s. In addition to implementing the List interface, this class provides * methods to manipulate the size of the array that is used internally to store the list. (This class is roughly * equivalent to Vector , except that it is unsynchronized.) - * + *

* The size , isEmpty , get , set , iterator , and listIterator * operations run in constant time. The add operation runs in amortized constant time , that is, adding * n elements requires O(n) time. All of the other operations run in linear time (roughly speaking). The constant * factor is low compared to that for the LinkedList implementation. - * + *

* Each ArrayList instance has a capacity . The capacity is the size of the array used to store the * elements in the list. It is always at least as large as the list size. As elements are added to an ArrayList, its * capacity grows automatically. The details of the growth policy are not specified beyond the fact that adding an * element has constant amortized time cost. - * + *

* An application can increase the capacity of an ArrayList instance before adding a large number of * elements using the ensureCapacity operation. This may reduce the amount of incremental reallocation. - * + *

* Note that this implementation is not synchronized. If multiple threads access an * ArrayList instance concurrently, and at least one of the threads modifies the list structurally, it * must be synchronized externally. (A structural modification is any operation that adds or deletes one or more * elements, or explicitly resizes the backing array; merely setting the value of an element is not a structural * modification.) This is typically accomplished by synchronizing on some object that naturally encapsulates the list. - * + *

* If no such object exists, the list should be "wrapped" using the {@link Collections#synchronizedList * Collections.synchronizedList} method. This is best done at creation time, to prevent accidental * unsynchronized access to the list: * List list = Collections.synchronizedList(new ArrayList(...)); - * + *

* name="fail-fast" The iterators returned by this class's {@link #iterator() iterator} and {@link * #listIterator(int) listIterator} methods are fail-fast : if the list is structurally modified at any time * after the iterator is created, in any way except through the iterator's own {@link ListIterator#remove() remove} or * {@link ListIterator#add(Object) add} methods, the iterator will throw a {@link ConcurrentModificationException}. * Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, * non-deterministic behavior at an undetermined time in the future. - * + *

* Note that the fail-fast behavior of an iterator cannot be guaranteed as it is, generally speaking, impossible to * make any hard guarantees in the presence of unsynchronized concurrent modification. Fail-fast iterators throw {@code * ConcurrentModificationException} on a best-effort basis. Therefore, it would be wrong to write a program that * depended on this exception for its correctness: the fail-fast behavior of iterators should be used only to detect * bugs. - * + *

* This class is a member of the ="{@docRoot}/../technotes/guides/collections/ index.html" Java Collections * Framework . * @@ -314,19 +314,10 @@ private static int hugeCapacity(int minCapacity) { /** * Returns an array containing all of the elements in this list in proper sequence (from first to last element). -<<<<<<< HEAD - * - * The returned array will be "safe" in that no references to it are maintained by this list. (In other words, - * this method must allocate a new array). The caller is thus free to modify the returned array. - * - * This method acts as bridge between array-based and collection-based APIs. -======= - *

*

The returned array will be "safe" in that no references to it are maintained by this list. (In other words, * this method must allocate a new array). The caller is thus free to modify the returned array. *

- *

This method acts as bridge between array-based and collection-based APIs. ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 + *

This method acts as bridge between array-based and collection-based APIs.

* * @return an array containing all of the elements in this list in proper sequence */ @@ -343,18 +334,10 @@ private static int hugeCapacity(int minCapacity) { * runtime type of the returned array is that of the specified array. If the list fits in the specified array, it * is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the * size of this list. -<<<<<<< HEAD - * - * If the list fits in the specified array with room to spare (i.e., the array has more elements than the list), - * the element in the array immediately following the end of the collection is set to null . (This is - * useful in determining the length of the list only if the caller knows that the list does not contain any -======= - *

*

If the list fits in the specified array with room to spare (i.e., the array has more elements than the list), * the element in the array immediately following the end of the collection is set to null. (This is * useful in determining the length of the list only if the caller knows that the list does not contain any ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 - * null elements.) + * null elements.)

* * @param the generic type * @param a the array into which the elements of the list are to be stored, if it is big enough; otherwise, a new @@ -759,13 +742,7 @@ private void readObject(java.io.ObjectInputStream s) * in the list. The specified index indicates the first element that would be returned by an initial call to {@link * ListIterator#next next}. An initial call to {@link ListIterator#previous previous} would return the element with * the specified index minus one. -<<<<<<< HEAD - * - * The returned list iterator is ="#fail-fast" fail-fast . -======= - *

*

The returned list iterator is fail-fast. ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 * * @param index the index * @return the list iterator @@ -779,13 +756,7 @@ private void readObject(java.io.ObjectInputStream s) /** * Returns a list iterator over the elements in this list (in proper sequence). -<<<<<<< HEAD - * - * The returned list iterator is ="#fail-fast" fail-fast . -======= - *

*

The returned list iterator is fail-fast. ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 * * @return the list iterator * @see #listIterator(int) @@ -796,13 +767,7 @@ private void readObject(java.io.ObjectInputStream s) /** * Returns an iterator over the elements in this list in proper sequence. -<<<<<<< HEAD - * - * The returned iterator is ="#fail-fast" fail-fast . -======= - *

*

The returned iterator is fail-fast. ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 * * @return an iterator over the elements in this list in proper sequence */ @@ -960,13 +925,7 @@ private class ListItr extends Itr implements ListIterator { * toIndex}, exclusive. (If {@code fromIndex} and {@code toIndex} are equal, the returned list is empty.) The * returned list is backed by this list, so non-structural changes in the returned list are reflected in this list, * and vice-versa. The returned list supports all of the optional list operations. -<<<<<<< HEAD - * - * This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). -======= - *

*

This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 * Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole * list. For example, the following idiom removes a range of elements from a list: * @@ -974,15 +933,8 @@ private class ListItr extends Itr implements ListIterator { * * Similar idioms may be constructed for {@link #indexOf(Object)} and {@link #lastIndexOf(Object)}, and all of the * algorithms in the {@link Collections} class can be applied to a subList. -<<<<<<< HEAD - * - * The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is - * structurally modified in any way other than via the returned list. (Structural modifications are those -======= - *

*

The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is * structurally modified in any way other than via the returned list. (Structural modifications are those ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 * that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may * yield incorrect results.) * diff --git a/src/main/java/eu/mihosoft/vrl/v3d/ext/openjfx/importers/obj/IntegerArrayList.java b/src/main/java/eu/mihosoft/vrl/v3d/ext/openjfx/importers/obj/IntegerArrayList.java index 7b040a0c..2cf92bf0 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/ext/openjfx/importers/obj/IntegerArrayList.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/ext/openjfx/importers/obj/IntegerArrayList.java @@ -51,48 +51,44 @@ * Resizable-array implementation of the List<Integer> interface. Implements all optional list * operations, and doesn't permit null s. In addition to implementing the List interface, this class * provides methods to manipulate the size of the array that is used internally to store the list. (This class is - * roughly equivalent to Vector , except that it is unsynchronized.) - * + *

* The size , isEmpty , get , set , iterator , and listIterator * operations run in constant time. The add operation runs in amortized constant time , that is, adding * n elements requires O(n) time. All of the other operations run in linear time (roughly speaking). The constant * factor is low compared to that for the LinkedList implementation. - * + *

* Each ArrayList instance has a capacity . The capacity is the size of the array used to store the * elements in the list. It is always at least as large as the list size. As elements are added to an ArrayList, its * capacity grows automatically. The details of the growth policy are not specified beyond the fact that adding an * element has constant amortized time cost. - * + *

* An application can increase the capacity of an ArrayList instance before adding a large number of * elements using the ensureCapacity operation. This may reduce the amount of incremental reallocation. - * + *

* Note that this implementation is not synchronized. If multiple threads access an * ArrayList instance concurrently, and at least one of the threads modifies the list structurally, it * must be synchronized externally. (A structural modification is any operation that adds or deletes one or more * elements, or explicitly resizes the backing array; merely setting the value of an element is not a structural * modification.) This is typically accomplished by synchronizing on some object that naturally encapsulates the list. - * - * If no such object exists, the list should be "wrapped" using the {@link Collections#synchronizedList - * Collections.synchronizedList} method. This is best done at creation time, to prevent accidental - * unsynchronized access to the list: + *

+ * If no such object exists, the list should be "wrapped" using the {@link Collections#synchronizedList(List)} method. + * This is best done at creation time, to prevent accidental unsynchronized access to the list: * List list = Collections.synchronizedList(new ArrayList(...)); - * + *

* name="fail-fast" The iterators returned by this class's {@link #iterator() iterator} and {@link * #listIterator(int) listIterator} methods are fail-fast : if the list is structurally modified at any time - * after the iterator is created, in any way except through the iterator's own {@link ListIterator#remove() remove} or * {@link ListIterator#add(Object) add} methods, the iterator will throw a {@link ConcurrentModificationException}. * Thus, in the face of concurrent modification, the iterator fails quickly and cleanly, rather than risking arbitrary, * non-deterministic behavior at an undetermined time in the future. - - * + *

* Note that the fail-fast behavior of an iterator cannot be guaranteed as it is, generally speaking, impossible to * make any hard guarantees in the presence of unsynchronized concurrent modification. Fail-fast iterators throw {@code * ConcurrentModificationException} on a best-effort basis. Therefore, it would be wrong to write a program that * depended on this exception for its correctness: the fail-fast behavior of iterators should be used only to detect * bugs. - * + *

* This class is a member of the ="{@docRoot}/../technotes/guides/collections/ index.html" Java Collections * Framework . * @@ -317,19 +313,11 @@ private static int hugeCapacity(int minCapacity) { /** * Returns an array containing all of the elements in this list in proper sequence (from first to last element). -<<<<<<< HEAD - * - * The returned array will be "safe" in that no references to it are maintained by this list. (In other words, - * this method must allocate a new array). The caller is thus free to modify the returned array. - * - * This method acts as bridge between array-based and collection-based APIs. -======= - *

+ *

*

The returned array will be "safe" in that no references to it are maintained by this list. (In other words, * this method must allocate a new array). The caller is thus free to modify the returned array. *

*

This method acts as bridge between array-based and collection-based APIs. ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 * * @return an array containing all of the elements in this list in proper sequence */ @@ -346,17 +334,10 @@ private static int hugeCapacity(int minCapacity) { * runtime type of the returned array is that of the specified array. If the list fits in the specified array, it * is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the * size of this list. -<<<<<<< HEAD - * - * If the list fits in the specified array with room to spare (i.e., the array has more elements than the list), - * the element in the array immediately following the end of the collection is set to null . (This is - * useful in determining the length of the list only if the caller knows that the list does not contain any -======= - *

+ *

*

If the list fits in the specified array with room to spare (i.e., the array has more elements than the list), * the element in the array immediately following the end of the collection is set to null. (This is * useful in determining the length of the list only if the caller knows that the list does not contain any ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 * null elements.) * * @param the generic type @@ -762,13 +743,7 @@ private void readObject(java.io.ObjectInputStream s) * in the list. The specified index indicates the first element that would be returned by an initial call to {@link * ListIterator#next next}. An initial call to {@link ListIterator#previous previous} would return the element with * the specified index minus one. -<<<<<<< HEAD - * - * The returned list iterator is ="#fail-fast" fail-fast . -======= - *

- *

The returned list iterator is fail-fast. ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 + *

The returned list iterator is fail-fast.

* * @param index the index * @return the list iterator @@ -782,13 +757,7 @@ private void readObject(java.io.ObjectInputStream s) /** * Returns a list iterator over the elements in this list (in proper sequence). -<<<<<<< HEAD - * - * The returned list iterator is ="#fail-fast" fail-fast . -======= - *

- *

The returned list iterator is fail-fast. ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 + *

The returned list iterator is fail-fast.

* * @return the list iterator * @see #listIterator(int) @@ -799,13 +768,7 @@ private void readObject(java.io.ObjectInputStream s) /** * Returns an iterator over the elements in this list in proper sequence. -<<<<<<< HEAD - * - * The returned iterator is ="#fail-fast" fail-fast . -======= - *

- *

The returned iterator is fail-fast. ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 + *

The returned iterator is fail-fast.

* * @return an iterator over the elements in this list in proper sequence */ @@ -963,31 +926,20 @@ private class ListItr extends Itr implements ListIterator { * toIndex}, exclusive. (If {@code fromIndex} and {@code toIndex} are equal, the returned list is empty.) The * returned list is backed by this list, so non-structural changes in the returned list are reflected in this list, * and vice-versa. The returned list supports all of the optional list operations. -<<<<<<< HEAD - * - * This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). -======= - *

- *

This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 + *

+ * This method eliminates the need for explicit range operations (of the sort that commonly exist for arrays). * Any operation that expects a list can be used as a range operation by passing a subList view instead of a whole * list. For example, the following idiom removes a range of elements from a list: - * + * * list.subList(from, to).clear(); * * Similar idioms may be constructed for {@link #indexOf(Object)} and {@link #lastIndexOf(Object)}, and all of the * algorithms in the {@link Collections} class can be applied to a subList. -<<<<<<< HEAD - * - * The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is - * structurally modified in any way other than via the returned list. (Structural modifications are those -======= - *

+ *

*

The semantics of the list returned by this method become undefined if the backing list (i.e., this list) is * structurally modified in any way other than via the returned list. (Structural modifications are those ->>>>>>> c3ab46726db4f602ab94b02c0236f35f30cebcd7 * that change the size of this list, or otherwise perturb it in such a fashion that iterations in progress may - * yield incorrect results.) + * yield incorrect results.)

* * @param fromIndex the from index * @param toIndex the to index diff --git a/src/main/java/eu/mihosoft/vrl/v3d/ext/org/poly2tri/PolygonUtil.java b/src/main/java/eu/mihosoft/vrl/v3d/ext/org/poly2tri/PolygonUtil.java index cd26a796..c9fb7127 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/ext/org/poly2tri/PolygonUtil.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/ext/org/poly2tri/PolygonUtil.java @@ -1,4 +1,4 @@ -/** +/* * PolygonUtil.java * * Copyright 2014-2014 Michael Hoffer info@michaelhoffer.de. All rights @@ -42,18 +42,12 @@ import eu.mihosoft.vrl.v3d.Vertex; import java.util.ArrayList; import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; import java.util.List; -import java.util.Optional; import org.locationtech.jts.geom.Coordinate; -import org.locationtech.jts.geom.CoordinateSequence; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.GeometryFactory; -import org.locationtech.jts.geom.LinearRing; import org.locationtech.jts.triangulate.polygon.ConstrainedDelaunayTriangulator; -import org.locationtech.jts.triangulate.polygon.PolygonTriangulator; // TODO: Auto-generated Javadoc /** @@ -104,7 +98,7 @@ private PolygonUtil() { /** * Concave to convex. * - * @param concave the concave + * @param incoming the concave * @return the list */ public static List concaveToConvex(eu.mihosoft.vrl.v3d.Polygon incoming) { diff --git a/src/main/java/eu/mihosoft/vrl/v3d/ext/quickhull3d/HullUtil.java b/src/main/java/eu/mihosoft/vrl/v3d/ext/quickhull3d/HullUtil.java index 8de2b37c..72d7b8fd 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/ext/quickhull3d/HullUtil.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/ext/quickhull3d/HullUtil.java @@ -12,7 +12,6 @@ import java.util.ArrayList; import java.util.List; -// TODO: Auto-generated Javadoc /** * The Class HullUtil. * @@ -107,10 +106,8 @@ public static CSG hull(CSG csg, PropertyStorage storage) { /** * Hull. * - * @param csg - * the csg - * @param storage - * the storage + * @param csgList + * a list of csg * @return the csg */ public static CSG hull(CSG... csgList) { diff --git a/src/main/java/eu/mihosoft/vrl/v3d/svg/SVGLoad.java b/src/main/java/eu/mihosoft/vrl/v3d/svg/SVGLoad.java index a38ed80f..3ef8e51f 100644 --- a/src/main/java/eu/mihosoft/vrl/v3d/svg/SVGLoad.java +++ b/src/main/java/eu/mihosoft/vrl/v3d/svg/SVGLoad.java @@ -24,7 +24,6 @@ import org.apache.batik.dom.svg.SVGOMPolylineElement; import org.apache.batik.util.XMLResourceDescriptor; import org.w3c.dom.Document; -import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.w3c.dom.svg.SVGImageElement; @@ -206,7 +205,7 @@ public SVGLoad(URI uri) throws IOException { /** * Creates an SVG Document given a URI. * - * @param uri + * @param f * Path to the file. * @throws Exception * Something went wrong parsing the SVG file.