From 2631e7a7c0829f0abd82918bd788f98d3a0c3c65 Mon Sep 17 00:00:00 2001 From: stephengold Date: Sat, 29 Jun 2024 16:01:59 -0700 Subject: [PATCH] library: javadoc --- .../java/com/jme3/bullet/BulletAppState.java | 10 ++--- .../java/com/jme3/bullet/CollisionSpace.java | 8 ++-- .../java/com/jme3/bullet/PhysicsSpace.java | 4 +- .../com/jme3/bullet/PhysicsTickListener.java | 8 ++-- .../collision/PhysicsCollisionObject.java | 41 ++++++++++--------- .../shapes/CylinderCollisionShape.java | 2 +- .../jme3/bullet/util/DebugShapeFactory.java | 2 +- 7 files changed, 39 insertions(+), 36 deletions(-) diff --git a/MinieLibrary/src/main/java/com/jme3/bullet/BulletAppState.java b/MinieLibrary/src/main/java/com/jme3/bullet/BulletAppState.java index d64a65189..0e88258e7 100644 --- a/MinieLibrary/src/main/java/com/jme3/bullet/BulletAppState.java +++ b/MinieLibrary/src/main/java/com/jme3/bullet/BulletAppState.java @@ -955,10 +955,10 @@ public void update(float tpf) { // PhysicsTickListener methods /** - * Callback from Bullet, invoked just after the physics is stepped. A good - * time to clear/apply forces. Meant to be overridden. + * Callback invoked just after the physics has been stepped. A good time to + * clear/apply forces. Meant to be overridden. * - * @param space the space that's about to be stepped (not null) + * @param space the space that was just stepped (not null) * @param timeStep the duration of the simulation step (in seconds, ≥0) */ @Override @@ -967,8 +967,8 @@ public void physicsTick(PhysicsSpace space, float timeStep) { } /** - * Callback from Bullet, invoked just before the physics is stepped. A good - * time to clear/apply forces. Meant to be overridden. + * Callback invoked just before the physics is stepped. A good time to + * clear/apply forces. Meant to be overridden. * * @param space the space that's about to be stepped (not null) * @param timeStep the duration of the simulation step (in seconds, ≥0) diff --git a/MinieLibrary/src/main/java/com/jme3/bullet/CollisionSpace.java b/MinieLibrary/src/main/java/com/jme3/bullet/CollisionSpace.java index 927340576..0d34c83b8 100644 --- a/MinieLibrary/src/main/java/com/jme3/bullet/CollisionSpace.java +++ b/MinieLibrary/src/main/java/com/jme3/bullet/CollisionSpace.java @@ -94,7 +94,7 @@ public int compare(PhysicsRayTestResult r1, PhysicsRayTestResult r2) { } }; /** - * number of contact-and-constraint solvers (≥1, ≤64, default=1) + * number of worker threads (≥1, ≤64, default=1) */ final private int numSolvers; /** @@ -201,7 +201,7 @@ protected CollisionSpace(Vector3f worldMin, Vector3f worldMax, /** * Add the specified object to the space. * - * @param object the collision object to add (not null) + * @param object the object to add (not null) */ public void add(Object object) { Validate.nonNull(object, "object"); @@ -314,7 +314,7 @@ public int countCollisionObjects() { } /** - * Count the solvers. + * Count the worker threads. * * @return the count (≥1, ≤64) */ @@ -668,7 +668,7 @@ public List rayTestRaw( /** * Remove the specified object from the space. * - * @param object the collision object to remove, or null + * @param object the object to remove, or null */ public void remove(Object object) { if (object == null) { diff --git a/MinieLibrary/src/main/java/com/jme3/bullet/PhysicsSpace.java b/MinieLibrary/src/main/java/com/jme3/bullet/PhysicsSpace.java index f221dc000..613e56411 100644 --- a/MinieLibrary/src/main/java/com/jme3/bullet/PhysicsSpace.java +++ b/MinieLibrary/src/main/java/com/jme3/bullet/PhysicsSpace.java @@ -1409,7 +1409,7 @@ private boolean checkGravity(Vector3f storeVector) { } /** - * Callback invoked (by native code) just after the physics is stepped. + * Callback invoked just after the physics is stepped. * * @param timeStep the duration of the simulation step (in seconds, ≥0) */ @@ -1422,7 +1422,7 @@ private void postTick(float timeStep) { } /** - * Callback invoked (by native code) just before the physics is stepped. + * Callback invoked just before the physics is stepped. * * @param timeStep the duration of the simulation step (in seconds, ≥0) */ diff --git a/MinieLibrary/src/main/java/com/jme3/bullet/PhysicsTickListener.java b/MinieLibrary/src/main/java/com/jme3/bullet/PhysicsTickListener.java index 28e810b54..42aed1b88 100644 --- a/MinieLibrary/src/main/java/com/jme3/bullet/PhysicsTickListener.java +++ b/MinieLibrary/src/main/java/com/jme3/bullet/PhysicsTickListener.java @@ -38,8 +38,8 @@ */ public interface PhysicsTickListener { /** - * Callback from Bullet, invoked just before the physics is stepped. A good - * time to clear/apply forces and reposition kinematic objects. + * Callback invoked just before the physics is stepped. A good time to + * clear/apply forces and reposition kinematic objects. * * @param space the space that's about to be stepped (not null) * @param timeStep the duration of the simulation step (in seconds, ≥0) @@ -47,8 +47,8 @@ public interface PhysicsTickListener { void prePhysicsTick(PhysicsSpace space, float timeStep); /** - * Callback from Bullet, invoked just after the physics has been stepped. A - * good time to re-activate deactivated objects. + * Callback invoked just after the physics has been stepped. A good time to + * re-activate deactivated objects. * * @param space the space that was just stepped (not null) * @param timeStep the duration of the simulation step (in seconds, ≥0) diff --git a/MinieLibrary/src/main/java/com/jme3/bullet/collision/PhysicsCollisionObject.java b/MinieLibrary/src/main/java/com/jme3/bullet/collision/PhysicsCollisionObject.java index a8bc907ce..d75629bcc 100644 --- a/MinieLibrary/src/main/java/com/jme3/bullet/collision/PhysicsCollisionObject.java +++ b/MinieLibrary/src/main/java/com/jme3/bullet/collision/PhysicsCollisionObject.java @@ -250,7 +250,8 @@ protected PhysicsCollisionObject() { // new methods exposed /** - * Reactivate this object if it has been deactivated due to lack of motion. + * Reactivate the collision object if it has been deactivated due to lack of + * motion. *

* Deactivation doesn't affect a PhysicsCharacter or PhysicsGhostObject. * @@ -506,7 +507,7 @@ public Vector3f getAnisotropicFriction(Vector3f storeResult) { } /** - * Access any application-specific data associated with this collision + * Access any application-specific data associated with the collision * object. * * @return the pre-existing instance, or null if none @@ -585,7 +586,7 @@ public int getCollisionGroup() { } /** - * Access the shape of this object. + * Access the shape of the collision object. * * @return the pre-existing instance, or null if none */ @@ -594,7 +595,7 @@ public CollisionShape getCollisionShape() { } /** - * Access the space where this object is added. + * Access the space where the collision object is added. * * @return the pre-existing instance, or null if none */ @@ -677,7 +678,7 @@ public Material getDebugMaterial() { } /** - * Return this object's friction parameter (native field: m_friction). + * Return the collision object's friction parameter (native field: m_friction). *

* Friction doesn't affect a PhysicsCharacter or PhysicsGhostObject. * @@ -700,7 +701,7 @@ public Vector3f getPhysicsLocation() { } /** - * Copy the location of this object's center to a Vector3f. + * Copy the location of the collision object's center to a Vector3f. * * @param storeResult storage for the result (modified if not null) * @return a location vector (in physics-space coordinates, either @@ -717,7 +718,7 @@ public Vector3f getPhysicsLocation(Vector3f storeResult) { } /** - * Copy the location of this object's center to a Vec3d. + * Copy the location of the collision object's center to a Vec3d. * * @param storeResult storage for the result (modified if not null) * @return a location vector (in physics-space coordinates, either @@ -734,7 +735,7 @@ public Vec3d getPhysicsLocationDp(Vec3d storeResult) { } /** - * Copy the orientation (rotation) of this object to a Quaternion. + * Copy the orientation (rotation) of the collision object to a Quaternion. * * @param storeResult storage for the result (modified if not null) * @return a rotation Quaternion (in physics-space coordinates, either @@ -876,7 +877,7 @@ public Transform getTransform(Transform storeResult) { } /** - * Access the scene object that's using this collision object, typically a + * Access the scene object that's using the collision object, typically a * PhysicsControl, PhysicsLink, or Spatial. Used by physics controls. * * @return the pre-existing instance, or null if none @@ -888,7 +889,7 @@ public Object getUserObject() { } /** - * Test whether this object has anisotropic friction. + * Test whether the collision object has anisotropic friction. *

* Friction doesn't affect a PhysicsCharacter or PhysicsGhostObject. * @@ -906,7 +907,7 @@ public boolean hasAnisotropicFriction(int mode) { } /** - * Test whether the specified collision object is in this object's ignore + * Test whether the specified collision object is in the current collision object's ignore * list. * * @param other the collision object to search for @@ -925,7 +926,8 @@ public boolean ignores(PhysicsCollisionObject other) { } /** - * Test whether this object has been deactivated due to lack of motion. + * Test whether the collision object has been deactivated due to lack of + * motion. *

* Deactivation doesn't affect a PhysicsCharacter or PhysicsGhostObject. * @@ -939,7 +941,7 @@ public boolean isActive() { } /** - * Test whether this object responds to contact with other objects. All + * Test whether the collision object responds to contact with other objects. All * ghost objects are non-responsive. Other types are responsive by default. * * @return true if responsive, otherwise false @@ -953,7 +955,7 @@ final public boolean isContactResponse() { } /** - * Test whether this object is added to a space. + * Test whether the collision object is added to a space. * * @return true→added to a space, false→not added to a space */ @@ -965,7 +967,7 @@ final public boolean isInWorld() { } /** - * Test whether this object is static (immobile). + * Test whether the collision object is static (immobile). * * @return true if static, otherwise false */ @@ -1169,7 +1171,8 @@ public void setCollisionGroup(int collisionGroup) { } /** - * Apply the specified shape to this object. Meant to be overridden. + * Apply the specified shape to the collision object. Meant to be + * overridden. * * @param collisionShape the shape to apply (not null, alias created) */ @@ -1328,7 +1331,7 @@ public void setIgnoreList(PhysicsCollisionObject[] desiredList) { } /** - * Alter this object's restitution (bounciness) (native field: + * Alter the collision object's restitution (bounciness) (native field: * m_restitution). For perfect elasticity, set restitution=1. *

* Restitution doesn't affect a PhysicsCharacter or PhysicsGhostObject. @@ -1401,7 +1404,7 @@ public void setUserIndex3(int index) { } /** - * Associate a "user" with this collision object. Used by physics controls. + * Associate a "user" with the collision object. Used by physics controls. * * @param user the desired scene object (alias created, default=null) * @see #getUserObject() @@ -1412,7 +1415,7 @@ public void setUserObject(Object user) { } /** - * Return the ID of the space where this object is added. + * Return the ID of the space where the collision object is added. * * @return the ID, or zero if not added to any space */ diff --git a/MinieLibrary/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java b/MinieLibrary/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java index fcb8ea56b..37924dbe0 100644 --- a/MinieLibrary/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java +++ b/MinieLibrary/src/main/java/com/jme3/bullet/collision/shapes/CylinderCollisionShape.java @@ -76,7 +76,7 @@ public class CylinderCollisionShape extends ConvexShape { */ private int axis; /** - * copy of the unscaled half extent for each local axis (not null, no + * copy of the unscaled half extents for each local axis (not null, no * negative component) */ private Vector3f halfExtents = new Vector3f(0.5f, 0.5f, 0.5f); diff --git a/MinieLibrary/src/main/java/com/jme3/bullet/util/DebugShapeFactory.java b/MinieLibrary/src/main/java/com/jme3/bullet/util/DebugShapeFactory.java index 6a28c9730..c028685e9 100644 --- a/MinieLibrary/src/main/java/com/jme3/bullet/util/DebugShapeFactory.java +++ b/MinieLibrary/src/main/java/com/jme3/bullet/util/DebugShapeFactory.java @@ -116,7 +116,7 @@ final public class DebugShapeFactory { private static int maxVerticesToIndex = 6_000; /** * map keys to previously generated debug meshes, for reuse - * + *

* Synchronized so that it can be updated from the "Physics Cleaner" thread. */ final private static Map cache