Skip to content

rename private variables #1736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions jme3-core/src/main/java/com/jme3/anim/MorphControl.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ protected void controlRender(RenderManager rm, ViewPort vp) {
lastGpuTargetIndex = i;
// binding the morph target's buffers to the mesh morph buffers.
MorphTarget t = morphTargets[i];
boundBufferIdx = bindMorphtargetBuffer(mesh, targetNumBuffers, boundBufferIdx, t);
boundBufferIdx = bindMorphTargetBuffer(mesh, targetNumBuffers, boundBufferIdx, t);
// setting the weight in the mat param array
matWeights[nbGPUTargets] = weights[i];
nbGPUTargets++;
Expand Down Expand Up @@ -179,7 +179,7 @@ protected void controlRender(RenderManager rm, ViewPort vp) {
writeCpuBuffer(targetNumBuffers, mt);

// binding the merged morph target
bindMorphtargetBuffer(mesh, targetNumBuffers, (nbGPUTargets - 1) * targetNumBuffers, mt);
bindMorphTargetBuffer(mesh, targetNumBuffers, (nbGPUTargets - 1) * targetNumBuffers, mt);

// setting the eight of the merged targets
matWeights[nbGPUTargets - 1] = cpuWeightSum;
Expand Down Expand Up @@ -236,7 +236,7 @@ private int getMaxGPUTargets(RenderManager rm, Geometry geom, Material mat, int
return maxGPUTargets;
}

private int bindMorphtargetBuffer(Mesh mesh, int targetNumBuffers, int boundBufferIdx, MorphTarget t) {
private int bindMorphTargetBuffer(Mesh mesh, int targetNumBuffers, int boundBufferIdx, MorphTarget t) {
int start = VertexBuffer.Type.MorphTarget0.ordinal();
if (targetNumBuffers >= 1) {
activateBuffer(mesh, boundBufferIdx, start, t.getBuffer(VertexBuffer.Type.Position));
Expand Down
30 changes: 15 additions & 15 deletions jme3-core/src/main/java/com/jme3/audio/openal/ALAudioRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ public class ALAudioRenderer implements AudioRenderer, Runnable {
private final ByteBuffer nativeBuf = BufferUtils.createByteBuffer(BUFFER_SIZE);
private final byte[] arrayBuf = new byte[BUFFER_SIZE];
private int[] channels;
private AudioSource[] chanSrcs;
private AudioSource[] channelSources;
private int nextChan = 0;
private final ArrayList<Integer> freeChans = new ArrayList<>();
private final ArrayList<Integer> freeChannels = new ArrayList<>();
private Listener listener;
private boolean audioDisabled = false;
private boolean supportEfx = false;
Expand Down Expand Up @@ -116,7 +116,7 @@ private void initOpenAL() {
}

ib = BufferUtils.createIntBuffer(channels.length);
chanSrcs = new AudioSource[channels.length];
channelSources = new AudioSource[channels.length];

final String deviceName = alc.alcGetString(ALC.ALC_DEVICE_SPECIFIER);

Expand Down Expand Up @@ -189,8 +189,8 @@ private void destroyOpenAL() {
}

// stop any playing channels
for (int i = 0; i < chanSrcs.length; i++) {
if (chanSrcs[i] != null) {
for (int i = 0; i < channelSources.length; i++) {
if (channelSources[i] != null) {
clearChannel(i);
}
}
Expand Down Expand Up @@ -643,8 +643,8 @@ private void setListenerParams(Listener listener) {
}

private int newChannel() {
if (freeChans.size() > 0) {
return freeChans.remove(0);
if (freeChannels.size() > 0) {
return freeChannels.remove(0);
} else if (nextChan < channels.length) {
return nextChan++;
} else {
Expand All @@ -656,7 +656,7 @@ private void freeChannel(int index) {
if (index == nextChan - 1) {
nextChan--;
} else {
freeChans.add(index);
freeChannels.add(index);
}
}

Expand Down Expand Up @@ -817,8 +817,8 @@ private void attachAudioToSource(int sourceId, AudioData data, boolean looping)

private void clearChannel(int index) {
// make room at this channel
if (chanSrcs[index] != null) {
AudioSource src = chanSrcs[index];
if (channelSources[index] != null) {
AudioSource src = channelSources[index];

int sourceId = channels[index];
al.alSourceStop(sourceId);
Expand All @@ -837,7 +837,7 @@ private void clearChannel(int index) {
}
}

chanSrcs[index] = null;
channelSources[index] = null;
}
}

Expand Down Expand Up @@ -891,7 +891,7 @@ public void updateInRenderThread(float tpf) {
}

for (int i = 0; i < channels.length; i++) {
AudioSource src = chanSrcs[i];
AudioSource src = channelSources[i];

if (src == null) {
continue;
Expand Down Expand Up @@ -974,7 +974,7 @@ public void updateInDecoderThread(float tpf) {
}

for (int i = 0; i < channels.length; i++) {
AudioSource src = chanSrcs[i];
AudioSource src = channelSources[i];

if (src == null || !(src.getAudioData() instanceof AudioStream)) {
continue;
Expand Down Expand Up @@ -1080,7 +1080,7 @@ public void playSourceInstance(AudioSource src) {
// set parameters, like position and max distance
setSourceParams(sourceId, src, true);
attachAudioToSource(sourceId, src.getAudioData(), false);
chanSrcs[index] = src;
channelSources[index] = src;

// play the channel
al.alSourcePlay(sourceId);
Expand Down Expand Up @@ -1116,7 +1116,7 @@ public void playSource(AudioSource src) {
updateAudioData(data);
}

chanSrcs[index] = src;
channelSources[index] = src;
setSourceParams(channels[index], src, false);
attachAudioToSource(channels[index], data, src.isLooping());
}
Expand Down
46 changes: 23 additions & 23 deletions jme3-core/src/main/java/com/jme3/collision/bih/BIHTriangle.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,39 +36,39 @@

public final class BIHTriangle {

private final Vector3f pointa = new Vector3f();
private final Vector3f pointb = new Vector3f();
private final Vector3f pointc = new Vector3f();
private final Vector3f pointA = new Vector3f();
private final Vector3f pointB = new Vector3f();
private final Vector3f pointC = new Vector3f();
private final Vector3f center = new Vector3f();

public BIHTriangle(Vector3f p1, Vector3f p2, Vector3f p3) {
pointa.set(p1);
pointb.set(p2);
pointc.set(p3);
center.set(pointa);
center.addLocal(pointb).addLocal(pointc).multLocal(FastMath.ONE_THIRD);
pointA.set(p1);
pointB.set(p2);
pointC.set(p3);
center.set(pointA);
center.addLocal(pointB).addLocal(pointC).multLocal(FastMath.ONE_THIRD);
}

public Vector3f get1() {
return pointa;
return pointA;
}

public Vector3f get2() {
return pointb;
return pointB;
}

public Vector3f get3() {
return pointc;
return pointC;
}

public Vector3f getCenter() {
return center;
}

public Vector3f getNormal() {
Vector3f normal = new Vector3f(pointb);
normal.subtractLocal(pointa)
.crossLocal(pointc.x - pointa.x, pointc.y - pointa.y, pointc.z - pointa.z);
Vector3f normal = new Vector3f(pointB);
normal.subtractLocal(pointA)
.crossLocal(pointC.x - pointA.x, pointC.y - pointA.y, pointC.z - pointA.z);
normal.normalizeLocal();
return normal;
}
Expand All @@ -77,19 +77,19 @@ public float getExtreme(int axis, boolean left) {
float v1, v2, v3;
switch (axis) {
case 0:
v1 = pointa.x;
v2 = pointb.x;
v3 = pointc.x;
v1 = pointA.x;
v2 = pointB.x;
v3 = pointC.x;
break;
case 1:
v1 = pointa.y;
v2 = pointb.y;
v3 = pointc.y;
v1 = pointA.y;
v2 = pointB.y;
v3 = pointC.y;
break;
case 2:
v1 = pointa.z;
v2 = pointb.z;
v3 = pointc.z;
v1 = pointA.z;
v2 = pointB.z;
v3 = pointC.z;
break;
default:
assert false;
Expand Down
6 changes: 3 additions & 3 deletions jme3-core/src/main/java/com/jme3/font/StringBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class StringBlock implements Cloneable {
private String text;
private Rectangle textBox;
private Align alignment = Align.Left;
private VAlign valignment = VAlign.Top;
private VAlign vAlignment = VAlign.Top;
private float size;
private ColorRGBA color = new ColorRGBA(ColorRGBA.White);
private boolean kerning;
Expand Down Expand Up @@ -118,15 +118,15 @@ BitmapFont.Align getAlignment() {
}

BitmapFont.VAlign getVerticalAlignment() {
return valignment;
return vAlignment;
}

void setAlignment(BitmapFont.Align alignment) {
this.alignment = alignment;
}

void setVerticalAlignment(BitmapFont.VAlign alignment) {
this.valignment = alignment;
this.vAlignment = alignment;
}

float getSize() {
Expand Down
Loading