Skip to content

Commit 7add915

Browse files
committed
whitespace changes in jme3-core (#1760)
* jme3-core: whitespace * jme3-core: whitespace again * jme3-core: whitespace some more * Tweens: tweak whitespace in javadoc * BoneTrack: correct indentation * Pose: delete extra whitespace * Skeleton.java: horizontal whitespace per style guide * SkeletonControl: delete excess whitespace * BasicProfiler: whitespace * BasicProfilerState: whitespace * FlyCamAppState: whitespace in javadoc * LegacyApplication: add space per 4.6.2.5 * SimpleApplication: indentation * StatsAppState: whitespace * AssetConfig: add whitespace * AssetKey: whitespace in cast per 4.6.2.5 * AssetLoadException: add vertical whitespace required by 4.6.1 * AssetNotFoundException: add vertical whitespace required by 4.6.1.1 * DesktopAssetManager: whitespace * ImplHandler: whitespace per the style guide * ThreadingManager: indentation * WeakRefAssetCache: cast spacing per 4.6.2.5 * WeakRefCloneAssetCache: whitespace * AudioBuffer: whitespace * AudioKey: line wrapping * AudioNode: whitespace * Filter: whitespace per 4.6.2.5 * Listener: delete trailing whitespace * AlAudioRenderer: whitespace per perferred style * BoundingSphere: whitespace per perferred style * Intersection: whitespace per perferred style * KeyFrame: whitespace * MotionPath: whitespace * TimeLine: delete excess vertical whitespace * AbstractCinematicEvent: whitespace * AnimationEvent: whitespace * MotionEvent: tweak the whitespace * SoundEvent: tweak the whitespace * CollisionResult: space after closing parenthesis of a cast * CollisionResults: space on both sides of a binary operator * SweepSphere: whitespace * BIHTree: space before { * TriangleAxisComparator: one statement per line * ParticleEmitter: whitespace * ParticlePointMesh: whitespace * ParticleTriMesh: misc whitespace * ReadialParticleInfluencer: delete extra vertical whitespace
1 parent 2ffe671 commit 7add915

File tree

156 files changed

+2806
-2823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+2806
-2823
lines changed

jme3-core/src/main/java/com/jme3/anim/AnimComposer.java

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@
4848
/**
4949
* AnimComposer is a Spatial control that allows manipulation of
5050
* {@link Armature armature} (skeletal) animation.
51-
*
51+
*
5252
* @author Nehon
5353
*/
5454
public class AnimComposer extends AbstractControl {
55-
5655
/**
5756
* The name of the default layer.
5857
*/
@@ -72,7 +71,7 @@ public AnimComposer() {
7271

7372
/**
7473
* Tells if an animation is contained in the list of animations.
75-
*
74+
*
7675
* @param name The name of the animation.
7776
* @return true, if the named animation is in the list of animations.
7877
*/
@@ -117,17 +116,17 @@ public void removeAnimClip(AnimClip anim) {
117116

118117
/**
119118
* Run an action on the default layer.
120-
*
119+
*
121120
* @param name The name of the action to run.
122121
* @return The action corresponding to the given name.
123122
*/
124123
public Action setCurrentAction(String name) {
125124
return setCurrentAction(name, DEFAULT_LAYER);
126125
}
127-
126+
128127
/**
129128
* Run an action on specified layer.
130-
*
129+
*
131130
* @param actionName The name of the action to run.
132131
* @param layerName The layer on which action should run.
133132
* @return The action corresponding to the given name.
@@ -139,19 +138,19 @@ public Action setCurrentAction(String actionName, String layerName) {
139138

140139
return currentAction;
141140
}
142-
141+
143142
/**
144143
* Return the current action on the default layer.
145-
*
146-
* @return The action corresponding to the given name.
144+
*
145+
* @return The action corresponding to the given name.
147146
*/
148147
public Action getCurrentAction() {
149148
return getCurrentAction(DEFAULT_LAYER);
150149
}
151-
150+
152151
/**
153152
* Return current action on specified layer.
154-
*
153+
*
155154
* @param layerName The layer on which action should run.
156155
* @return The action corresponding to the given name.
157156
*/
@@ -161,14 +160,14 @@ public Action getCurrentAction(String layerName) {
161160

162161
return result;
163162
}
164-
163+
165164
/**
166165
* Remove current action on default layer.
167166
*/
168167
public void removeCurrentAction() {
169168
removeCurrentAction(DEFAULT_LAYER);
170169
}
171-
170+
172171
/**
173172
* Remove current action on specified layer.
174173
*
@@ -178,19 +177,19 @@ public void removeCurrentAction(String layerName) {
178177
AnimLayer l = getLayer(layerName);
179178
l.setCurrentAction(null);
180179
}
181-
180+
182181
/**
183182
* Returns current time of the default layer.
184-
*
183+
*
185184
* @return The current time.
186185
*/
187186
public double getTime() {
188187
return getTime(DEFAULT_LAYER);
189188
}
190-
189+
191190
/**
192191
* Returns current time of the specified layer.
193-
*
192+
*
194193
* @param layerName The layer from which to get the time.
195194
* @return the time (in seconds)
196195
*/
@@ -200,7 +199,7 @@ public double getTime(String layerName) {
200199

201200
return result;
202201
}
203-
202+
204203
/**
205204
* Sets current time on the default layer.
206205
*
@@ -226,7 +225,7 @@ public void setTime(String layerName, double time) {
226225
}
227226

228227
/**
229-
*
228+
*
230229
* @param name The name of the action to return.
231230
* @return The action registered with specified name. It will make a new action if there isn't any.
232231
* @see #makeAction(java.lang.String)
@@ -239,29 +238,29 @@ public Action action(String name) {
239238
}
240239
return action;
241240
}
242-
241+
243242
/**
244-
*
243+
*
245244
* @param name The name of the action to return.
246245
* @return The action registered with specified name or null if nothing is registered.
247246
*/
248-
public Action getAction(String name){
247+
public Action getAction(String name) {
249248
return actions.get(name);
250249
}
251-
250+
252251
/**
253252
* Register given action with specified name.
254-
*
253+
*
255254
* @param name The name of the action.
256255
* @param action The action to add.
257256
*/
258-
public void addAction(String name, Action action){
257+
public void addAction(String name, Action action) {
259258
actions.put(name, action);
260259
}
261260

262261
/**
263262
* Create a new ClipAction with specified clip name.
264-
*
263+
*
265264
* @param name The name of the clip.
266265
* @return a new action
267266
* @throws IllegalArgumentException if clip with specified name not found.
@@ -275,17 +274,17 @@ public Action makeAction(String name) {
275274
action = new ClipAction(clip);
276275
return action;
277276
}
278-
277+
279278
/**
280279
* Tells if an action is contained in the list of actions.
281-
*
280+
*
282281
* @param name The name of the action.
283282
* @return true, if the named action is in the list of actions.
284283
*/
285284
public boolean hasAction(String name) {
286285
return actions.containsKey(name);
287286
}
288-
287+
289288
/**
290289
* Remove specified action.
291290
*

jme3-core/src/main/java/com/jme3/anim/interpolator/FrameInterpolator.java

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
* Created by nehon on 15/04/17.
3939
*/
4040
public class FrameInterpolator {
41-
4241
public static final FrameInterpolator DEFAULT = new FrameInterpolator();
4342

4443
private AnimInterpolator<Float> timeInterpolator;
@@ -51,23 +50,23 @@ public class FrameInterpolator {
5150
final private TrackDataReader<Vector3f> scaleReader = new TrackDataReader<>();
5251
final private TrackTimeReader timesReader = new TrackTimeReader();
5352

54-
5553
final private Transform transforms = new Transform();
5654

57-
public Transform interpolate(float t, int currentIndex, CompactVector3Array translations, CompactQuaternionArray rotations, CompactVector3Array scales, float[] times){
55+
public Transform interpolate(float t, int currentIndex, CompactVector3Array translations,
56+
CompactQuaternionArray rotations, CompactVector3Array scales, float[] times) {
5857
timesReader.setData(times);
59-
if( timeInterpolator != null){
60-
t = timeInterpolator.interpolate(t,currentIndex, null, timesReader, null );
58+
if (timeInterpolator != null) {
59+
t = timeInterpolator.interpolate(t, currentIndex, null, timesReader, null);
6160
}
62-
if(translations != null) {
61+
if (translations != null) {
6362
translationReader.setData(translations);
6463
translationInterpolator.interpolate(t, currentIndex, translationReader, timesReader, transforms.getTranslation());
6564
}
66-
if(rotations != null) {
65+
if (rotations != null) {
6766
rotationReader.setData(rotations);
6867
rotationInterpolator.interpolate(t, currentIndex, rotationReader, timesReader, transforms.getRotation());
6968
}
70-
if(scales != null){
69+
if (scales != null) {
7170
scaleReader.setData(scales);
7271
scaleInterpolator.interpolate(t, currentIndex, scaleReader, timesReader, transforms.getScale());
7372
}
@@ -83,7 +82,7 @@ public void interpolateWeights(float t, int currentIndex, float[] weights, int n
8382
next = current;
8483
}
8584

86-
float val = FastMath.interpolateLinear(t, weights[current], weights[next]);
85+
float val = FastMath.interpolateLinear(t, weights[current], weights[next]);
8786
store[i] = val;
8887
}
8988
}
@@ -104,7 +103,6 @@ public void setScaleInterpolator(AnimInterpolator<Vector3f> scaleInterpolator) {
104103
this.scaleInterpolator = scaleInterpolator;
105104
}
106105

107-
108106
public static class TrackTimeReader {
109107
private float[] data;
110108

@@ -122,7 +120,6 @@ public int getLength() {
122120
}
123121

124122
public static class TrackDataReader<T> {
125-
126123
private CompactArray<T> data;
127124

128125
protected void setData(CompactArray<T> data) {
@@ -148,7 +145,6 @@ public T getEntryModSkip(int index, T store) {
148145

149146
index = mod(index, total);
150147

151-
152148
return data.get(index, store);
153149
}
154150
}
@@ -163,5 +159,4 @@ public T getEntryModSkip(int index, T store) {
163159
private static int mod(int val, int n) {
164160
return ((val % n) + n) % n;
165161
}
166-
167162
}

jme3-core/src/main/java/com/jme3/anim/tween/Tweens.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ public static Tween callMethod(Object target, String method, Object... args) {
163163
* <pre>Tweens.callTweenMethod(1, myObject, "foo", "bar")</pre>
164164
* <p>Would work for any of the following method signatures:</p>
165165
* <pre>
166-
* void foo( float t, String arg )
167-
* void foo( double t, String arg )
168-
* void foo( String arg, float t )
169-
* void foo( String arg, double t )
170-
* </pre>
166+
* void foo(float t, String arg)
167+
* void foo(double t, String arg)
168+
* void foo(String arg, float t)
169+
* void foo(String arg, double t)
170+
* </pre>
171171
*
172172
* @param length the desired duration (in seconds)
173173
* @param target object on which the method is to be invoked
@@ -208,7 +208,7 @@ public double curve(double t) {
208208
} else if (t > 1) {
209209
return 1;
210210
}
211-
// Sine starting at -90 will go from -1 to 1 through 0
211+
// Sine starting at -90 will go from -1 to 1 through 0
212212
double result = Math.sin(t * Math.PI - Math.PI * 0.5);
213213
return (result + 1) * 0.5;
214214
}
@@ -575,7 +575,7 @@ private Method findMethod(Class type, String name, Object... args) {
575575
// We accept the 't' parameter as either first or last,
576576
// so we'll see which one matches.
577577
if (isFloatType(paramTypes[0]) || isDoubleType(paramTypes[0])) {
578-
// Try it as the first parameter
578+
// Try it as the first parameter
579579
int matches = 0;
580580

581581
for (int i = 1; i < paramTypes.length; i++) {
@@ -597,7 +597,7 @@ private Method findMethod(Class type, String name, Object... args) {
597597
return m;
598598
}
599599

600-
// Else try it at the end
600+
// Else try it at the end
601601
int last = paramTypes.length - 1;
602602
if (isFloatType(paramTypes[last]) || isDoubleType(paramTypes[last])) {
603603
int matches = 0;

jme3-core/src/main/java/com/jme3/anim/tween/action/ClipAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import java.util.List;
1111

1212
public class ClipAction extends BlendableAction {
13-
1413
private AnimClip clip;
1514
private Transform transform = new Transform();
1615

@@ -25,7 +24,7 @@ public void doInterpolate(double t) {
2524
for (AnimTrack track : tracks) {
2625
if (track instanceof TransformTrack) {
2726
TransformTrack tt = (TransformTrack) track;
28-
if(getMask() != null && !getMask().contains(tt.getTarget())){
27+
if (getMask() != null && !getMask().contains(tt.getTarget())) {
2928
continue;
3029
}
3130
interpolateTransformTrack(t, tt);
@@ -46,6 +45,7 @@ private void interpolateTransformTrack(double t, TransformTrack track) {
4645
this.collectTransform(target, transform, getTransitionWeight(), this);
4746
}
4847
}
48+
4949
private void interpolateMorphTrack(double t, MorphTrack track) {
5050
Geometry target = track.getTarget();
5151
float[] weights = target.getMorphState();

0 commit comments

Comments
 (0)