Skip to content

Commit

Permalink
library: javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Jun 29, 2024
1 parent 18d9157 commit 2631e7a
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 36 deletions.
10 changes: 5 additions & 5 deletions MinieLibrary/src/main/java/com/jme3/bullet/BulletAppState.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -314,7 +314,7 @@ public int countCollisionObjects() {
}

/**
* Count the solvers.
* Count the worker threads.
*
* @return the count (≥1, ≤64)
*/
Expand Down Expand Up @@ -668,7 +668,7 @@ public List<PhysicsRayTestResult> 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) {
Expand Down
4 changes: 2 additions & 2 deletions MinieLibrary/src/main/java/com/jme3/bullet/PhysicsSpace.java
Original file line number Diff line number Diff line change
Expand Up @@ -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, &ge;0)
*/
Expand All @@ -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, &ge;0)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@
*/
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, &ge;0)
*/
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, &ge;0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <p>
* Deactivation doesn't affect a PhysicsCharacter or PhysicsGhostObject.
*
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
*/
Expand All @@ -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
*/
Expand Down Expand Up @@ -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).
* <p>
* Friction doesn't affect a PhysicsCharacter or PhysicsGhostObject.
*
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -888,7 +889,7 @@ public Object getUserObject() {
}

/**
* Test whether this object has anisotropic friction.
* Test whether the collision object has anisotropic friction.
* <p>
* Friction doesn't affect a PhysicsCharacter or PhysicsGhostObject.
*
Expand All @@ -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
Expand All @@ -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.
* <p>
* Deactivation doesn't affect a PhysicsCharacter or PhysicsGhostObject.
*
Expand All @@ -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
Expand All @@ -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&rarr;added to a space, false&rarr;not added to a space
*/
Expand All @@ -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
*/
Expand Down Expand Up @@ -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)
*/
Expand Down Expand Up @@ -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.
* <p>
* Restitution doesn't affect a PhysicsCharacter or PhysicsGhostObject.
Expand Down Expand Up @@ -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()
Expand All @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ final public class DebugShapeFactory {
private static int maxVerticesToIndex = 6_000;
/**
* map keys to previously generated debug meshes, for reuse
*
* <p>
* Synchronized so that it can be updated from the "Physics Cleaner" thread.
*/
final private static Map<DebugMeshKey, Mesh> cache
Expand Down

0 comments on commit 2631e7a

Please sign in to comment.