commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [commons-geometry] svenrathgeber commented on a change in pull request #31: Geometry 29 2 sven
Date Wed, 03 Apr 2019 17:08:41 GMT
svenrathgeber commented on a change in pull request #31: Geometry 29 2 sven
URL: https://github.com/apache/commons-geometry/pull/31#discussion_r271843621
 
 

 ##########
 File path: commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Plane.java
 ##########
 @@ -16,174 +16,193 @@
  */
 package org.apache.commons.geometry.euclidean.threed;
 
+import java.util.Objects;
+
 import org.apache.commons.geometry.core.exception.IllegalNormException;
 import org.apache.commons.geometry.core.partitioning.Embedding;
 import org.apache.commons.geometry.core.partitioning.Hyperplane;
 import org.apache.commons.geometry.core.precision.DoublePrecisionContext;
-import org.apache.commons.geometry.euclidean.internal.Vectors;
 import org.apache.commons.geometry.euclidean.oned.Vector1D;
 import org.apache.commons.geometry.euclidean.threed.rotation.QuaternionRotation;
 import org.apache.commons.geometry.euclidean.twod.PolygonsSet;
 import org.apache.commons.geometry.euclidean.twod.Vector2D;
 
-/** The class represent planes in a three dimensional space.
+/**
+ * The class represents a plane in a three dimensional space.
  */
-public class Plane implements Hyperplane<Vector3D>, Embedding<Vector3D, Vector2D>
{
-
-    /** Offset of the origin with respect to the plane. */
-    private double originOffset;
+public final class Plane implements Hyperplane<Vector3D>, Embedding<Vector3D, Vector2D>
{
 
-    /** Origin of the plane frame. */
-    private Vector3D origin;
+    /** First normalized vector of the plane frame (in plane). */
+    private final Vector3D u;
 
-    /** First vector of the plane frame (in plane). */
-    private Vector3D u;
+    /** Second normalized vector of the plane frame (in plane). */
+    private final Vector3D v;
 
-    /** Second vector of the plane frame (in plane). */
-    private Vector3D v;
+    /** Normalized plane normal. */
+    private final Vector3D w;
 
-    /** Third vector of the plane frame (plane normal). */
-    private Vector3D w;
+    /** Offset of the origin with respect to the plane. */
+    private final double originOffset;
 
+    /** orthogonal projection of the 3D-space origin in the plane. */
+    private final Vector3D projectedOrigin;
 
 Review comment:
   I'am undecided. Depends on the way it is used, could be a performance gain or loss. 
   Some use cases and profile runs would be great

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message