Skip to content

Commit

Permalink
javadoc and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Jun 28, 2024
1 parent 7540d7b commit d496166
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 9 deletions.
6 changes: 6 additions & 0 deletions src/main/java/com/github/stephengold/joltjni/BoxShape.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ public class BoxShape extends ConvexShape {
// *************************************************************************
// constructors

/**
* Instantiate a shape with the specified native object assigned.
*
* @param virtualAddress the virtual address of the native object to assign
* (not zero)
*/
BoxShape(long va) {
super(va);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class BoxShapeSettings extends ConvexShapeSettings {
// constructors

/**
* Instantiate box settings for the specified half extents.
* Instantiate settings for the specified half extents.
*
* @param halfExtents the desired half extents on each local axis (not null,
* all components ≥0, unaffected)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ public class JobSystemThreadPool extends JobSystem {
// constructors

/**
* Instantiate a system with the specified limits.
* Instantiate a job system with the specified limits.
*
* @param maxJobs the maximum number of jobs to be scheduled
* @param maxBarriers the maximum number of barriers
* @param numThreads the number of worker threads to be created
* @param maxJobs the maximum number of jobs that can be allocated at one
* time
* @param maxBarriers the maximum number of barriers that can be allocated
* at one time
* @param numThreads the number of worker threads to start (≥1) or -1 to
* auto detect
*/
public JobSystemThreadPool(int maxJobs, int maxBarriers, int numThreads) {
long systemVa = createJobSystem(maxJobs, maxBarriers, numThreads);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ of this software and associated documentation files (the "Software"), to deal
package com.github.stephengold.joltjni;

/**
* Perform simulation on physics objects. Bodies are added via a separate
* interface.
* Perform simulation on a collection of physics objects. Bodies are added via a
* separate interface.
*
* @author Stephen Gold [email protected]
*/
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/github/stephengold/joltjni/Vec3.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ of this software and associated documentation files (the "Software"), to deal

/**
* A vector composed of 3 single-precision components, used to represent
* velocities and directions in 3-dimensional space.
* directions, extents, forces, impulses, offsets, scaling factors, torques,
* and velocities in 3-dimensional space.
*
* @author Stephen Gold [email protected]
*/
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/HelloWorld.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ of this software and associated documentation files (the "Software"), to deal

/**
* A straightforward Java translation of the Jolt Physics "hello world" sample
* application.
* application.
* <p>
* Derived from HelloWorld/HelloWorld.cpp by Jorrit Rouwe.
*
Expand Down
3 changes: 3 additions & 0 deletions src/test/java/Test001.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ public void test001() {
JobSystemThreadPool jobSystem
= new JobSystemThreadPool(maxJobs, maxBarriers, numThreads);

// object layers:
final int objLayerNonMoving = 0;
final int objLayerMoving = 1;
final int numObjLayers = 2;

// broadphase layers:
final int bpLayerNonMoving = 0;
final int bpLayerMoving = 1;
final int numBpLayers = 2;
Expand Down

0 comments on commit d496166

Please sign in to comment.