48
48
/**
49
49
* AnimComposer is a Spatial control that allows manipulation of
50
50
* {@link Armature armature} (skeletal) animation.
51
- *
51
+ *
52
52
* @author Nehon
53
53
*/
54
54
public class AnimComposer extends AbstractControl {
55
-
56
55
/**
57
56
* The name of the default layer.
58
57
*/
@@ -72,7 +71,7 @@ public AnimComposer() {
72
71
73
72
/**
74
73
* Tells if an animation is contained in the list of animations.
75
- *
74
+ *
76
75
* @param name The name of the animation.
77
76
* @return true, if the named animation is in the list of animations.
78
77
*/
@@ -117,17 +116,17 @@ public void removeAnimClip(AnimClip anim) {
117
116
118
117
/**
119
118
* Run an action on the default layer.
120
- *
119
+ *
121
120
* @param name The name of the action to run.
122
121
* @return The action corresponding to the given name.
123
122
*/
124
123
public Action setCurrentAction (String name ) {
125
124
return setCurrentAction (name , DEFAULT_LAYER );
126
125
}
127
-
126
+
128
127
/**
129
128
* Run an action on specified layer.
130
- *
129
+ *
131
130
* @param actionName The name of the action to run.
132
131
* @param layerName The layer on which action should run.
133
132
* @return The action corresponding to the given name.
@@ -139,19 +138,19 @@ public Action setCurrentAction(String actionName, String layerName) {
139
138
140
139
return currentAction ;
141
140
}
142
-
141
+
143
142
/**
144
143
* 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.
147
146
*/
148
147
public Action getCurrentAction () {
149
148
return getCurrentAction (DEFAULT_LAYER );
150
149
}
151
-
150
+
152
151
/**
153
152
* Return current action on specified layer.
154
- *
153
+ *
155
154
* @param layerName The layer on which action should run.
156
155
* @return The action corresponding to the given name.
157
156
*/
@@ -161,14 +160,14 @@ public Action getCurrentAction(String layerName) {
161
160
162
161
return result ;
163
162
}
164
-
163
+
165
164
/**
166
165
* Remove current action on default layer.
167
166
*/
168
167
public void removeCurrentAction () {
169
168
removeCurrentAction (DEFAULT_LAYER );
170
169
}
171
-
170
+
172
171
/**
173
172
* Remove current action on specified layer.
174
173
*
@@ -178,19 +177,19 @@ public void removeCurrentAction(String layerName) {
178
177
AnimLayer l = getLayer (layerName );
179
178
l .setCurrentAction (null );
180
179
}
181
-
180
+
182
181
/**
183
182
* Returns current time of the default layer.
184
- *
183
+ *
185
184
* @return The current time.
186
185
*/
187
186
public double getTime () {
188
187
return getTime (DEFAULT_LAYER );
189
188
}
190
-
189
+
191
190
/**
192
191
* Returns current time of the specified layer.
193
- *
192
+ *
194
193
* @param layerName The layer from which to get the time.
195
194
* @return the time (in seconds)
196
195
*/
@@ -200,7 +199,7 @@ public double getTime(String layerName) {
200
199
201
200
return result ;
202
201
}
203
-
202
+
204
203
/**
205
204
* Sets current time on the default layer.
206
205
*
@@ -226,7 +225,7 @@ public void setTime(String layerName, double time) {
226
225
}
227
226
228
227
/**
229
- *
228
+ *
230
229
* @param name The name of the action to return.
231
230
* @return The action registered with specified name. It will make a new action if there isn't any.
232
231
* @see #makeAction(java.lang.String)
@@ -239,29 +238,29 @@ public Action action(String name) {
239
238
}
240
239
return action ;
241
240
}
242
-
241
+
243
242
/**
244
- *
243
+ *
245
244
* @param name The name of the action to return.
246
245
* @return The action registered with specified name or null if nothing is registered.
247
246
*/
248
- public Action getAction (String name ){
247
+ public Action getAction (String name ) {
249
248
return actions .get (name );
250
249
}
251
-
250
+
252
251
/**
253
252
* Register given action with specified name.
254
- *
253
+ *
255
254
* @param name The name of the action.
256
255
* @param action The action to add.
257
256
*/
258
- public void addAction (String name , Action action ){
257
+ public void addAction (String name , Action action ) {
259
258
actions .put (name , action );
260
259
}
261
260
262
261
/**
263
262
* Create a new ClipAction with specified clip name.
264
- *
263
+ *
265
264
* @param name The name of the clip.
266
265
* @return a new action
267
266
* @throws IllegalArgumentException if clip with specified name not found.
@@ -275,17 +274,17 @@ public Action makeAction(String name) {
275
274
action = new ClipAction (clip );
276
275
return action ;
277
276
}
278
-
277
+
279
278
/**
280
279
* Tells if an action is contained in the list of actions.
281
- *
280
+ *
282
281
* @param name The name of the action.
283
282
* @return true, if the named action is in the list of actions.
284
283
*/
285
284
public boolean hasAction (String name ) {
286
285
return actions .containsKey (name );
287
286
}
288
-
287
+
289
288
/**
290
289
* Remove specified action.
291
290
*
0 commit comments