com.jme3.animation.Animation.getLength()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中com.jme3.animation.Animation.getLength()方法的一些代码示例,展示了Animation.getLength()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Animation.getLength()方法的具体详情如下:
包路径:com.jme3.animation.Animation
类名称:Animation
方法名:getLength

Animation.getLength介绍

[英]Returns the length in seconds of this animation
[中]返回此动画的长度(以秒为单位)

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * @return The length of the currently playing animation, or zero
 * if no animation is playing.
 *
 * @see AnimChannel#getTime()
 */
public float getAnimMaxTime(){
  return animation != null ? animation.getLength() : 0f;
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * @param speed Set the speed of the animation channel. The speed
 * is a scale value starting from 0.0, at 1.0 the animation will play
 * at its default speed.
 */
public void setSpeed(float speed) {
  this.speed = speed;
  if(blendTime>0){
    this.speedBlendFrom = speed;
    blendTime = Math.min(blendTime, animation.getLength() / speed);  
    blendRate = 1/ blendTime;
  }
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Returns the length of the given named animation.
 * @param name The name of the animation
 * @return The length of time, in seconds, of the named animation.
 */
public float getAnimationLength(String name) {
  Animation a = animationMap.get(name);
  if (a == null) {
    throw new IllegalArgumentException("The animation " + name
        + " does not exist in this AnimControl");
  }
  return a.getLength();
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

this.blendTime = blendTime;
blendTime = Math.min(blendTime, anim.getLength() / speed);            
blendFrom = animation;
timeBlendFrom = time;

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

blendFrom.getLength(),
                 loopModeBlendFrom);
  if (timeBlendFrom < 0){
if (animation.getLength() > 0){
  if (!notified && (time >= animation.getLength() || time < 0)) {
    if (loopMode == LoopMode.DontLoop) {
time = AnimationUtils.clampWrapTime(time, animation.getLength(), loopMode);
if (time < 0){

代码示例来源:origin: org.jmonkeyengine/jme3-core

/**
 * @return The length of the currently playing animation, or zero
 * if no animation is playing.
 *
 * @see AnimChannel#getTime()
 */
public float getAnimMaxTime(){
  return animation != null ? animation.getLength() : 0f;
}

代码示例来源:origin: info.projectkyoto/mms-engine

/**
 * @return The length of the currently playing animation, or zero
 * if no animation is playing.
 *
 * @see AnimChannel#getTime()
 */
public float getAnimMaxTime(){
  return animation != null ? animation.getLength() : 0f;
}

代码示例来源:origin: org.jmonkeyengine/jme3-core

/**
 * @param speed Set the speed of the animation channel. The speed
 * is a scale value starting from 0.0, at 1.0 the animation will play
 * at its default speed.
 */
public void setSpeed(float speed) {
  this.speed = speed;
  if(blendTime>0){
    this.speedBlendFrom = speed;
    blendTime = Math.min(blendTime, animation.getLength() / speed);  
    blendRate = 1/ blendTime;
  }
}

代码示例来源:origin: org.jmonkeyengine/jme3-core

/**
 * Returns the length of the given named animation.
 * @param name The name of the animation
 * @return The length of time, in seconds, of the named animation.
 */
public float getAnimationLength(String name) {
  Animation a = animationMap.get(name);
  if (a == null) {
    throw new IllegalArgumentException("The animation " + name
        + " does not exist in this AnimControl");
  }
  return a.getLength();
}

代码示例来源:origin: info.projectkyoto/mms-engine

/**
 * Returns the length of the given named animation.
 * @param name The name of the animation
 * @return The length of time, in seconds, of the named animation.
 */
public float getAnimationLength(String name) {
  Animation a = animationMap.get(name);
  if (a == null) {
    throw new IllegalArgumentException("The animation " + name
        + " does not exist in this AnimControl");
  }
  return a.getLength();
}

代码示例来源:origin: org.jmonkeyengine/jme3-core

this.blendTime = blendTime;
blendTime = Math.min(blendTime, anim.getLength() / speed);            
blendFrom = animation;
timeBlendFrom = time;

代码示例来源:origin: info.projectkyoto/mms-engine

blendFrom.getLength(),
                 loopModeBlendFrom);
  if (timeBlendFrom < 0){
time += tpf * speed;
if (animation.getLength() > 0){
  if (!notified && (time >= animation.getLength() || time < 0)) {
    if (loopMode == LoopMode.DontLoop) {
time = clampWrapTime(time, animation.getLength(), loopMode);
if (time < 0){

代码示例来源:origin: org.jmonkeyengine/jme3-core

blendFrom.getLength(),
                 loopModeBlendFrom);
  if (timeBlendFrom < 0){
if (animation.getLength() > 0){
  if (!notified && (time >= animation.getLength() || time < 0)) {
    if (loopMode == LoopMode.DontLoop) {
time = AnimationUtils.clampWrapTime(time, animation.getLength(), loopMode);
if (time < 0){

代码示例来源:origin: org.jmonkeyengine/jme3-plugins

if (trackData.length > anim.getLength()) {
  anim.setLength(trackData.length);
  if (!usedBones.contains(bone) && !equalBindAndLocalTransforms(bone)) {
    float[] times = new float[]{0, anim.getLength()};

相关文章