Skip to content

Commit 2830870

Browse files
committed
javadoc and comments
1 parent 9f0dd5b commit 2830870

13 files changed

Lines changed: 40 additions & 32 deletions

src/main/java/com/github/stephengold/joltjni/BodyCreationSettings.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,9 +1286,11 @@ public void saveBinaryState(StreamOut stream) {
12861286
* unaffected.
12871287
*
12881288
* @param stream where to write objects (not {@code null})
1289-
* @param shapeMap track multiple uses of shapes (may be null)
1290-
* @param materialMap track multiple uses of physics materials (may be null)
1291-
* @param filterMap track multiple uses of group filters (may be null)
1289+
* @param shapeMap track multiple uses of shapes (may be {@code null})
1290+
* @param materialMap track multiple uses of physics materials (may be
1291+
* {@code null})
1292+
* @param filterMap track multiple uses of group filters (may be
1293+
* {@code null})
12921294
*/
12931295
@Override
12941296
public void saveWithChildren(StreamOut stream, ShapeToIdMap shapeMap,

src/main/java/com/github/stephengold/joltjni/ConvexHullShapeSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public ConvexHullShapeSettings setPoints(Vec3Arg... points) {
409409
/**
410410
* Apply the specified linear transform to all points.
411411
*
412-
* @param matrix the tranform to apply (not {@code null}, unaffected)
412+
* @param matrix the transform to apply (not {@code null}, unaffected)
413413
* @return the modified settings, for chaining
414414
*/
415415
public ConvexHullShapeSettings transformPoints(Mat44Arg matrix) {

src/main/java/com/github/stephengold/joltjni/HairShadersRef.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public HairShadersRef() {
4646
*
4747
* @param refVa the virtual address of the native object to assign (not
4848
* zero)
49-
* @param shaders the the shaders to target (not {@code null})
49+
* @param shaders the shaders to target (not {@code null})
5050
*/
5151
HairShadersRef(long refVa, HairShaders shaders) {
5252
assert shaders != null;

src/main/java/com/github/stephengold/joltjni/MassProperties.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public MassProperties(ConstMassProperties original) {
8484
/**
8585
* Rotate the inertia by the specified 3x3 matrix.
8686
*
87-
* @param rotation the rotation to apply (not null, unaffected)
87+
* @param rotation the rotation to apply (not {@code null}, unaffected)
8888
*/
8989
public void rotate(Mat44Arg rotation) {
9090
long propertiesVa = va();
@@ -96,7 +96,7 @@ public void rotate(Mat44Arg rotation) {
9696
* Scale the mass and inertia by the specified factors. Note that factors
9797
* can be <0 to flip the shape.
9898
*
99-
* @param scaleFactors the desired scaling (not null unaffected)
99+
* @param scaleFactors the desired scaling (not {@code null}, unaffected)
100100
*/
101101
public void scale(Vec3Arg scaleFactors) {
102102
long propertiesVa = va();
@@ -119,7 +119,8 @@ public void scaleToMass(float mass) {
119119
/**
120120
* Alter the inertia tensor. (native attribute: mInertia)
121121
*
122-
* @param inertia the desired value (not null, unaffected, default=zero)
122+
* @param inertia the desired value (not {@code null}, unaffected,
123+
* default=zero)
123124
* @return the modified properties, for chaining
124125
*/
125126
public MassProperties setInertia(Mat44Arg inertia) {
@@ -147,7 +148,7 @@ public MassProperties setMass(float mass) {
147148
* Alter the mass and inertia to that of a box with the specified dimensions
148149
* and uniform density.
149150
*
150-
* @param boxSize the edge lengths of the box (not null, unaffected)
151+
* @param boxSize the edge lengths of the box (not {@code null}, unaffected)
151152
* @param density the density to use
152153
*/
153154
public void setMassAndInertiaOfSolidBox(Vec3Arg boxSize, float density) {
@@ -161,7 +162,7 @@ public void setMassAndInertiaOfSolidBox(Vec3Arg boxSize, float density) {
161162
/**
162163
* Translate the inertia by the specified offset.
163164
*
164-
* @param offset the amount of translation (not null, unaffected)
165+
* @param offset the amount of translation (not {@code null}, unaffected)
165166
*/
166167
public void translate(Vec3Arg offset) {
167168
long propertiesVa = va();
@@ -177,8 +178,10 @@ public void translate(Vec3Arg offset) {
177178
* Decompose the inertia tensor into a diagonal matrix and a right-handed
178179
* rotation matrix. The properties are unaffected.
179180
*
180-
* @param storeRotation storage for the rotation matrix (not null, modified)
181-
* @param storeDiagonal storage for the diagonal matrix (not null, modified)
181+
* @param storeRotation storage for the rotation matrix (not {@code null},
182+
* modified)
183+
* @param storeDiagonal storage for the diagonal matrix (not {@code null},
184+
* modified)
182185
* @return {@code true} if successful, otherwise {@code false}
183186
*/
184187
@Override
@@ -198,7 +201,7 @@ public boolean decomposePrincipalMomentsOfInertia(
198201
* Copy the inertia tensor. The properties are unaffected. (native
199202
* attribute: mInertia)
200203
*
201-
* @return a new matrix (in kilogram.meters squared)
204+
* @return a new matrix (in kilogram.meters^2)
202205
*/
203206
@Override
204207
public Mat44 getInertia() {
@@ -245,7 +248,7 @@ public boolean isEqual(ConstMassProperties other) {
245248
* Return a string representation of the properties object, which is
246249
* unaffected.
247250
*
248-
* @return the string representation (not null, not empty)
251+
* @return the string representation (not {@code null}, not empty)
249252
*/
250253
@Override
251254
public String toString() {

src/main/java/com/github/stephengold/joltjni/PhysicsSettings.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2024-2025 Stephen Gold
2+
Copyright (c) 2024-2026 Stephen Gold
33
44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal
@@ -167,7 +167,7 @@ public void setContactNormalCosMaxDeltaRotation(float cosine) {
167167
* (native member: mContactPointPreserveLambdaMaxDistSq)
168168
*
169169
* @param squaredDistance the square of the desired threshold distance (in
170-
* meters squared, ≥0, default=1e-4)
170+
* meters^2, ≥0, default=1e-4)
171171
*/
172172
public void setContactPointPreserveLambdaMaxDistSq(float squaredDistance) {
173173
assert squaredDistance >= 0f : squaredDistance;
@@ -519,7 +519,7 @@ public float getContactNormalCosMaxDeltaRotation() {
519519
* settings are unaffected. (native member:
520520
* mContactPointPreserveLambdaMaxDistSq)
521521
*
522-
* @return the square of the threshold distance (in meters squared, ≥0)
522+
* @return the square of the threshold distance (in meters^2, ≥0)
523523
*/
524524
@Override
525525
public float getContactPointPreserveLambdaMaxDistSq() {

src/main/java/com/github/stephengold/joltjni/SoftBodyCreationSettings.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ public float getVertexRadius() {
707707
* shared settings, materials, and group filter. The settings are
708708
* unaffected.
709709
*
710-
* @param stream where to write objects (not null)
710+
* @param stream where to write objects (not {@code null})
711711
*/
712712
@Override
713713
public void saveBinaryState(StreamOut stream) {
@@ -720,10 +720,13 @@ public void saveBinaryState(StreamOut stream) {
720720
* Write the state of this object to the specified stream. The settings are
721721
* unaffected.
722722
*
723-
* @param stream where to write objects (not null)
724-
* @param sbssMap track multiple uses of shared settings (may be null)
725-
* @param materialMap track multiple uses of physics materials (may be null)
726-
* @param filterMap track multiple uses of group filters (may be null)
723+
* @param stream where to write objects (not {@code null})
724+
* @param sbssMap track multiple uses of shared settings (may be
725+
* {@code null})
726+
* @param materialMap track multiple uses of physics materials (may be
727+
* {@code null})
728+
* @param filterMap track multiple uses of group filters (may be
729+
* {@code null})
727730
*/
728731
@Override
729732
public void saveWithChildren(

src/main/java/com/github/stephengold/joltjni/VehicleCollisionTesterRayRef.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public long targetVa() {
8686
}
8787

8888
/**
89-
* Create a additional counted reference to the targeted tester.
89+
* Create an additional counted reference to the targeted tester.
9090
*
9191
* @return a new JVM object with a new native object assigned
9292
*/

src/main/java/com/github/stephengold/joltjni/VehicleTransmissionSettings.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public void setSwitchTime(float latency) {
181181
setSwitchTime(settingsVa, latency);
182182
}
183183
// *************************************************************************
184-
// ConstVechicleTransmissionSettings methods
184+
// ConstVehicleTransmissionSettings methods
185185

186186
/**
187187
* Return how long it takes to release the clutch in {@code Auto} mode. The

src/main/java/com/github/stephengold/joltjni/WheelSettingsWv.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public void setAngularDamping(float damping) {
8888
* Alter the moment of inertia around the wheel's rolling axis. (native
8989
* attribute: mInertia)
9090
*
91-
* @param moment the desired moment of inertia (in kilogram.meters squared,
91+
* @param moment the desired moment of inertia (in kilogram.meters^2,
9292
* default=0.9)
9393
*/
9494
public void setInertia(float moment) {
@@ -173,7 +173,7 @@ public float getAngularDamping() {
173173
* Return the moment of inertia around the wheel's rolling axis. The
174174
* settings are unaffected. (native attribute: mInertia)
175175
*
176-
* @return the moment of inertia (in kilogram.meters squared, ≥0)
176+
* @return the moment of inertia (in kilogram.meters^2, ≥0)
177177
*/
178178
@Override
179179
public float getInertia() {

src/main/java/com/github/stephengold/joltjni/WheelSettingsWvRef.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public WheelSettingsWvRef setEnableSuspensionForcePoint(boolean enable) {
9696
* Alter the moment of inertia around the wheel's rolling axis. (native
9797
* attribute: mInertia)
9898
*
99-
* @param moment the desired moment of inertia (in kilogram.meters squared,
99+
* @param moment the desired moment of inertia (in kilogram.meters^2,
100100
* default=0.9)
101101
*/
102102
public void setInertia(float moment) {
@@ -381,7 +381,7 @@ public boolean getEnableSuspensionForcePoint() {
381381
* Return the moment of inertia around the wheel's rolling axis. The
382382
* settings are unaffected. (native attribute: mInertia)
383383
*
384-
* @return the moment of inertia (in kilogram.meters squared, ≥0)
384+
* @return the moment of inertia (in kilogram.meters^2, ≥0)
385385
*/
386386
@Override
387387
public float getInertia() {

0 commit comments

Comments
 (0)