From 6d3a5de6b526129eb541df0d90f7e45e08369d43 Mon Sep 17 00:00:00 2001 From: Stephen Gold Date: Sun, 9 Sep 2018 21:29:22 -0700 Subject: [PATCH] Minie: comments --- .../collision/shapes/CollisionShape.java | 6 ++-- .../shapes/SimplexCollisionShape.java | 30 +++++++------------ .../control/AbstractPhysicsControl.java | 6 ++-- .../java/jme3utilities/minie/MyShape.java | 2 +- 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/Minie/src/main/java/com/jme3/bullet/collision/shapes/CollisionShape.java b/Minie/src/main/java/com/jme3/bullet/collision/shapes/CollisionShape.java index 2fbb00ef9..6962bf7b2 100644 --- a/Minie/src/main/java/com/jme3/bullet/collision/shapes/CollisionShape.java +++ b/Minie/src/main/java/com/jme3/bullet/collision/shapes/CollisionShape.java @@ -66,7 +66,7 @@ public abstract class CollisionShape implements Savable { */ final protected Vector3f scale = new Vector3f(1f, 1f, 1f); /** - * collision margin (in physics-world units, ≥0, default=0) + * collision margin (in physics-space units, ≥0, default=0) */ protected float margin = 0f; @@ -116,7 +116,7 @@ public Vector3f getScale() { /** * Read the collision margin for this shape. * - * @return the margin distance (in physics-world units, ≥0) + * @return the margin distance (in physics-space units, ≥0) */ public float getMargin() { return getMargin(objectId); @@ -131,7 +131,7 @@ public float getMargin() { * Note that if the shape is shared (between collision objects and/or * compound shapes) changes can have unintended consequences. * - * @param margin the desired margin distance (in physics-world units, ≥0, + * @param margin the desired margin distance (in physics-space units, ≥0, * default=0) */ public void setMargin(float margin) { diff --git a/Minie/src/main/java/com/jme3/bullet/collision/shapes/SimplexCollisionShape.java b/Minie/src/main/java/com/jme3/bullet/collision/shapes/SimplexCollisionShape.java index dc865f577..f26e4fa6c 100644 --- a/Minie/src/main/java/com/jme3/bullet/collision/shapes/SimplexCollisionShape.java +++ b/Minie/src/main/java/com/jme3/bullet/collision/shapes/SimplexCollisionShape.java @@ -68,14 +68,10 @@ public SimplexCollisionShape() { /** * Instantiate a tetrahedral collision shape based on the specified points. * - * @param point1 the world coordinates of 1st point (not null, alias - * created) TODO - * @param point2 the world coordinates of 2nd point (not null, alias - * created) TODO - * @param point3 the world coordinates of 3rd point (not null, alias - * created) TODO - * @param point4 the world coordinates of 4th point (not null, alias - * created) TODO + * @param point1 the coordinates of 1st point (not null, alias created) TODO + * @param point2 the coordinates of 2nd point (not null, alias created) TODO + * @param point3 the coordinates of 3rd point (not null, alias created) TODO + * @param point4 the coordinates of 4th point (not null, alias created) TODO */ public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3, Vector3f point4) { @@ -89,12 +85,9 @@ public SimplexCollisionShape(Vector3f point1, Vector3f point2, /** * Instantiate a triangular collision shape based on the specified points. * - * @param point1 the world coordinates of 1st point (not null, alias - * created) TODO - * @param point2 the world coordinates of 2nd point (not null, alias - * created) TODO - * @param point3 the world coordinates of 3rd point (not null, alias - * created) TODO + * @param point1 the coordinates of 1st point (not null, alias created) TODO + * @param point2 the coordinates of 2nd point (not null, alias created) TODO + * @param point3 the coordinates of 3rd point (not null, alias created) TODO */ public SimplexCollisionShape(Vector3f point1, Vector3f point2, Vector3f point3) { @@ -107,10 +100,8 @@ public SimplexCollisionShape(Vector3f point1, Vector3f point2, /** * Instantiate a line-segment collision shape based on the specified points. * - * @param point1 the world coordinates of 1st point (not null, alias - * created) TODO - * @param point2 the world coordinates of 2nd point (not null, alias - * created) TODO + * @param point1 the coordinates of 1st point (not null, alias created) TODO + * @param point2 the coordinates of 2nd point (not null, alias created) TODO */ public SimplexCollisionShape(Vector3f point1, Vector3f point2) { vector1 = point1; @@ -121,8 +112,7 @@ public SimplexCollisionShape(Vector3f point1, Vector3f point2) { /** * Instantiate a point collision shape based on the specified points. * - * @param point1 the world coordinates of point (not null, alias created) - * TODO + * @param point1 the coordinates of point (not null, alias created) TODO */ public SimplexCollisionShape(Vector3f point1) { vector1 = point1; diff --git a/Minie/src/main/java/com/jme3/bullet/control/AbstractPhysicsControl.java b/Minie/src/main/java/com/jme3/bullet/control/AbstractPhysicsControl.java index e3949cbdd..56899cbf0 100644 --- a/Minie/src/main/java/com/jme3/bullet/control/AbstractPhysicsControl.java +++ b/Minie/src/main/java/com/jme3/bullet/control/AbstractPhysicsControl.java @@ -164,7 +164,8 @@ public void setApplyPhysicsLocal(boolean applyPhysicsLocal) { /** * Access whichever spatial translation corresponds to the physics location. * - * @return the pre-existing coordinate vector (not null) TODO + * @return the pre-existing location vector (in physics-space coordinates, + * not null) TODO */ protected Vector3f getSpatialTranslation() { if (MySpatial.isIgnoringTransforms(spatial)) { @@ -179,7 +180,8 @@ protected Vector3f getSpatialTranslation() { /** * Access whichever spatial rotation corresponds to the physics rotation. * - * @return the pre-existing quaternion (not null) + * @return the pre-existing quaternion (in physics-space coordinates, not + * null) */ protected Quaternion getSpatialRotation() { if (MySpatial.isIgnoringTransforms(spatial)) { diff --git a/Minie/src/main/java/jme3utilities/minie/MyShape.java b/Minie/src/main/java/jme3utilities/minie/MyShape.java index 477c4c19c..793405420 100644 --- a/Minie/src/main/java/jme3utilities/minie/MyShape.java +++ b/Minie/src/main/java/jme3utilities/minie/MyShape.java @@ -476,7 +476,7 @@ public static CollisionShape setRadius(CollisionShape oldShape, * Compute the volume of a closed collision shape. * * @param shape (not null, unaffected) - * @return the volume in cubic physics-world units (≥0) + * @return the volume in cubic physics-space units (≥0) */ public static float volume(CollisionShape shape) { Vector3f scale = shape.getScale();