Fixed git clone URL
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / math / Transform.java
index f7f64db..90015b7 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Sixth 3D engine. Author: Svjatoslav Agejenko. 
+ * Sixth 3D engine. Author: Svjatoslav Agejenko.
  * This project is released under Creative Commons Zero (CC0) license.
  */
 package eu.svjatoslav.sixth.e3d.math;
@@ -8,11 +8,18 @@ import eu.svjatoslav.sixth.e3d.geometry.Point3D;
 
 /**
  * Used to represent transformation in a 3D space.
- * Transformations are represented as a translation and an orientation.
+ * Transformations are represented as a translation and an {@link Orientation}.
  */
 public class Transform implements Cloneable {
 
+    /**
+     * The translation is applied after the orientation.
+     */
     private final Point3D translation;
+
+    /**
+     * The orientation is applied before the translation.
+     */
     private final Orientation orientation;
 
     public Transform() {
@@ -23,8 +30,7 @@ public class Transform implements Cloneable {
     /**
      * Creates a new transform with the specified translation.
      *
-     * @param translation
-     *            the translation
+     * @param translation the translation
      */
     public Transform(final Point3D translation) {
         this.translation = translation;
@@ -34,12 +40,9 @@ public class Transform implements Cloneable {
     /**
      * Creates a new transform with the specified translation and orientation.
      *
-     * @param translation
-     *            the translation
-     * @param angleXZ
-     *            the angle around the XZ axis
-     * @param angleYZ
-     *            the angle around the YZ axis
+     * @param translation the translation
+     * @param angleXZ     the angle around the XZ axis
+     * @param angleYZ     the angle around the YZ axis
      */
     public Transform(final Point3D translation, final double angleXZ,
                      final double angleYZ) {
@@ -51,10 +54,8 @@ public class Transform implements Cloneable {
     /**
      * Creates a new transform with the specified translation and orientation.
      *
-     * @param translation
-     *            the translation
-     * @param orientation
-     *            the orientation
+     * @param translation the translation
+     * @param orientation the orientation
      */
     public Transform(final Point3D translation, final Orientation orientation) {
         this.translation = translation;
@@ -74,6 +75,11 @@ public class Transform implements Cloneable {
         return translation;
     }
 
+    /**
+     * Applies this transform to the specified point in a 3D space.
+     *
+     * @param point to apply this transform to
+     */
     public void transform(final Point3D point) {
         orientation.rotate(point);
         point.add(translation);