예제 #1
0
  /**
   * Applies channels in this clip to given {@link AnimatedGroup}. Animations are cumulative. The
   * Meshes are not changed by calling this method.
   *
   * @see AnimatedGroup#resetAnimation()
   * @see AnimatedGroup#applyAnimation()
   */
  public void applyTo(float time, AnimatedGroup targetGroup, float weight) {
    time = SkinHelper.clamp(0f, maxTime, time);

    for (MeshChannel channel : channels) {
      if (channel == null) continue;
      Animated3D target = targetGroup.get(channel.objectIndex);
      channel.applyTo(time, target, weight);
    }
  }
예제 #2
0
 /**
  * Applies channels in this clip to given {@link Animated3D}. Animations are cumulative. The Mesh
  * is not changed by calling this method.
  *
  * @see Animated3D#resetAnimation()
  * @see Animated3D#applyAnimation()
  */
 public void applyTo(float time, Animated3D target, float weight) {
   MeshChannel channel = channels[target.getIndex()];
   if (channel == null) return;
   time = SkinHelper.clamp(0f, maxTime, time);
   channel.applyTo(time, target, weight);
 }