Skip to content

Commit c183ff0

Browse files
authored
rename more method arguments for clarity (#1742)
* rename a couple method args * KinematicRagdollControl: rename "reccount" * rename 2 method args * rename method args
1 parent 0b5e869 commit c183ff0

9 files changed

Lines changed: 92 additions & 92 deletions

File tree

jme3-android/src/main/java/com/jme3/renderer/android/AndroidGL.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,8 @@ public void glRenderbufferStorageMultisampleEXT(int target, int samples, int int
580580
}
581581

582582
@Override
583-
public void glTexImage2DMultisample(int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) {
584-
GLES31.glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations);
583+
public void glTexImage2DMultisample(int target, int samples, int internalformat, int width, int height, boolean fixedSampleLocations) {
584+
GLES31.glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedSampleLocations);
585585
}
586586

587587
@Override

jme3-bullet/src/common/java/com/jme3/bullet/control/KinematicRagdollControl.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -673,10 +673,10 @@ protected void scanSpatial(Spatial model) {
673673
* @param model the spatial with the model's SkeletonControl (not null)
674674
* @param bone the bone to be linked (not null)
675675
* @param parent the body linked to the parent bone (not null)
676-
* @param reccount depth of the recursion (≥1)
676+
* @param recursionCount depth of the recursion (≥1)
677677
* @param pointsMap (not null)
678678
*/
679-
protected void boneRecursion(Spatial model, Bone bone, PhysicsRigidBody parent, int reccount, Map<Integer, List<Float>> pointsMap) {
679+
protected void boneRecursion(Spatial model, Bone bone, PhysicsRigidBody parent, int recursionCount, Map<Integer, List<Float>> pointsMap) {
680680
PhysicsRigidBody parentShape = parent;
681681
if (boneList.contains(bone.getName())) {
682682

@@ -693,10 +693,10 @@ protected void boneRecursion(Spatial model, Bone bone, PhysicsRigidBody parent,
693693
shape = RagdollUtils.makeShapeFromVerticeWeights(model, RagdollUtils.getBoneIndices(link.bone, skeleton, boneList), initScale, link.bone.getModelSpacePosition(), weightThreshold);
694694
}
695695

696-
PhysicsRigidBody shapeNode = new PhysicsRigidBody(shape, rootMass / reccount);
696+
PhysicsRigidBody shapeNode = new PhysicsRigidBody(shape, rootMass / recursionCount);
697697

698698
shapeNode.setKinematic(mode == Mode.Kinematic);
699-
totalMass += rootMass / reccount;
699+
totalMass += rootMass / recursionCount;
700700

701701
link.rigidBody = shapeNode;
702702
link.initalWorldRotation = bone.getModelSpaceRotation().clone();
@@ -721,7 +721,7 @@ protected void boneRecursion(Spatial model, Bone bone, PhysicsRigidBody parent,
721721

722722
for (Iterator<Bone> it = bone.getChildren().iterator(); it.hasNext();) {
723723
Bone childBone = it.next();
724-
boneRecursion(model, childBone, parentShape, reccount + 1, pointsMap);
724+
boneRecursion(model, childBone, parentShape, recursionCount + 1, pointsMap);
725725
}
726726
}
727727

jme3-core/src/main/java/com/jme3/audio/Environment.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ public Environment(Environment source) {
9494
}
9595

9696
public Environment(float density, float diffusion, float gain, float gainHf,
97-
float decayTime, float decayHf, float reflGain,
98-
float reflDelay, float lateGain, float lateDelay) {
97+
float decayTime, float decayHf, float reflectGain,
98+
float reflectDelay, float lateGain, float lateDelay) {
9999
this.decayTime = decayTime;
100100
this.decayHFRatio = decayHf;
101101
this.density = density;
@@ -104,8 +104,8 @@ public Environment(float density, float diffusion, float gain, float gainHf,
104104
this.gainHf = gainHf;
105105
this.lateReverbDelay = lateDelay;
106106
this.lateReverbGain = lateGain;
107-
this.reflectDelay = reflDelay;
108-
this.reflectGain = reflGain;
107+
this.reflectDelay = reflectDelay;
108+
this.reflectGain = reflectGain;
109109
}
110110

111111
public Environment(float[] e) {

jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -935,22 +935,22 @@ public float distanceToEdge(Vector3f point) {
935935
*
936936
* @param denom
937937
* the denominator of the line segment.
938-
* @param numer
938+
* @param numerator
939939
* the numerator of the line segment.
940940
* @param t
941941
* test values of the plane.
942942
* @return true if the line segment intersects the plane, false otherwise.
943943
*/
944-
private boolean clip(float denom, float numer, float[] t) {
944+
private boolean clip(float denom, float numerator, float[] t) {
945945
// Return value is 'true' if line segment intersects the current test
946946
// plane. Otherwise, 'false' is returned, in which case the line segment
947947
// is entirely clipped.
948948
if (denom > 0.0f) {
949949
// This is the old if statement...
950-
// if (numer > denom * t[1]) {
950+
// if (numerator > denom * t[1]) {
951951
//
952952
// The problem is that what is actually stored is
953-
// numer/denom. In non-floating point, this math should
953+
// numerator/denom. In non-floating point, this math should
954954
// work out the same but in floating point there can
955955
// be subtle math errors. The multiply will exaggerate
956956
// errors that may have been introduced when the value
@@ -974,7 +974,7 @@ private boolean clip(float denom, float numer, float[] t) {
974974
// angles and distances because they fail the bounding box test.
975975
// Many Bothans died bring you this fix.
976976
// -pspeed
977-
float newT = numer / denom;
977+
float newT = numerator / denom;
978978
if (newT > t[1]) {
979979
return false;
980980
}
@@ -984,12 +984,12 @@ private boolean clip(float denom, float numer, float[] t) {
984984
return true;
985985
} else if (denom < 0.0f) {
986986
// Old if statement... see above
987-
// if (numer > denom * t[0]) {
987+
// if (numerator > denom * t[0]) {
988988
//
989989
// Note though that denom is always negative in this block.
990990
// When we move it over to the other side we have to flip
991991
// the comparison. Algebra for the win.
992-
float newT = numer / denom;
992+
float newT = numerator / denom;
993993
if (newT < t[0]) {
994994
return false;
995995
}
@@ -998,7 +998,7 @@ private boolean clip(float denom, float numer, float[] t) {
998998
}
999999
return true;
10001000
} else {
1001-
return numer <= 0.0;
1001+
return numerator <= 0.0;
10021002
}
10031003
}
10041004

jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,9 @@ public static int getSampleFromMip(int mipLevel, int miptot) {
390390

391391
//see Lagarde's paper https://seblagarde.files.wordpress.com/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf
392392
//linear roughness
393-
public static float getRoughnessFromMip(int miplevel, int miptot) {
393+
public static float getRoughnessFromMip(int mipLevel, int miptot) {
394394
float step = 1f / ((float) miptot - 1);
395-
step *= miplevel;
395+
step *= mipLevel;
396396
return step * step;
397397
}
398398

jme3-core/src/main/java/com/jme3/util/mikktspace/MikktspaceTangentGenerator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,7 @@ static boolean generateTSpaces(TSpace psTspace[], final TriInfo pTriInfos[], fin
11641164
}
11651165

11661166
static TSpace evalTspace(int face_indices[], final int iFaces, final int piTriListIn[], final TriInfo pTriInfos[],
1167-
final MikkTSpaceContext mikkTSpace, final int iVertexRepresentitive) {
1167+
final MikkTSpaceContext mikkTSpace, final int iVertexRepresentative) {
11681168
TSpace res = new TSpace();
11691169
float fAngleSum = 0;
11701170

@@ -1175,11 +1175,11 @@ static TSpace evalTspace(int face_indices[], final int iFaces, final int piTriLi
11751175
if ((pTriInfos[f].flag & GROUP_WITH_ANY) == 0) {
11761176

11771177
int i = -1;
1178-
if (piTriListIn[3 * f + 0] == iVertexRepresentitive) {
1178+
if (piTriListIn[3 * f + 0] == iVertexRepresentative) {
11791179
i = 0;
1180-
} else if (piTriListIn[3 * f + 1] == iVertexRepresentitive) {
1180+
} else if (piTriListIn[3 * f + 1] == iVertexRepresentative) {
11811181
i = 1;
1182-
} else if (piTriListIn[3 * f + 2] == iVertexRepresentitive) {
1182+
} else if (piTriListIn[3 * f + 2] == iVertexRepresentative) {
11831183
i = 2;
11841184
}
11851185
assert (i >= 0 && i < 3);

jme3-desktop/src/main/java/com/jme3/app/state/MjpegFileWriter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ public void addImage(Image image, float quality) throws Exception {
109109
addImage(writeImageToBytes(image, quality));
110110
}
111111

112-
public void addImage(byte[] imagedata) throws Exception {
112+
public void addImage(byte[] imageData) throws Exception {
113113
byte[] fcc = new byte[]{'0', '0', 'd', 'b'};
114-
int useLength = imagedata.length;
114+
int useLength = imageData.length;
115115
int extra = (useLength + (int) position) % 4;
116116
if (extra > 0) {
117117
useLength = useLength + extra;
@@ -122,15 +122,15 @@ public void addImage(byte[] imagedata) throws Exception {
122122
ByteArrayOutputStream baos = new ByteArrayOutputStream(fcc.length + 4 + useLength);
123123
baos.write(fcc);
124124
baos.write(intBytes(swapInt(useLength)));
125-
baos.write(imagedata);
125+
baos.write(imageData);
126126
if (extra > 0) {
127127
for (int i = 0; i < extra; i++) {
128128
baos.write(0);
129129
}
130130
}
131131
byte[] data = baos.toByteArray();
132132
aviOutput.write(data);
133-
imagedata = null;
133+
imageData = null;
134134

135135
numFrames++; //add a frame
136136
position += data.length;

0 commit comments

Comments
 (0)