X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=sixth-3d.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fgeometry%2FPoint3D.java;h=6bf2dd3f45b4ea08191cf70167ef85a5c7a99086;hp=8d723454c453370682e01c91f7a7cc2b9cc58e9e;hb=6b9b5a6b70397f3cea7b965a54aaacc03cdae4f7;hpb=ff13a51ec53b3d2ee1c9309152ed2b40366218b9 diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/geometry/Point3D.java b/src/main/java/eu/svjatoslav/sixth/e3d/geometry/Point3D.java index 8d72345..6bf2dd3 100755 --- a/src/main/java/eu/svjatoslav/sixth/e3d/geometry/Point3D.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/geometry/Point3D.java @@ -58,6 +58,20 @@ public class Point3D implements Cloneable { return this; } + /** + * Add coordinates of current point to other point. Value of current point will not be changed. + * @return current point. + */ + public Point3D addTo(final Point3D ... otherPoints) { + for (final Point3D otherPoint : otherPoints) otherPoint.add(this); + return this; + } + + /** + * Create new point by cloning position of current point. + * + * @return newly created clone. + */ public Point3D clone() { return new Point3D(this); }