本文整理了Java中com.jme3.animation.Animation.setTracks()
方法的一些代码示例,展示了Animation.setTracks()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Animation.setTracks()
方法的具体详情如下:
包路径:com.jme3.animation.Animation
类名称:Animation
方法名:setTracks
[英]Set the Tracks to be used by this animation.
[中]设置此动画要使用的轨迹。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
if (tracks != null && tracks.length > 0) {
Animation spatialAnimation = new Animation(action.getName(), action.getAnimationTime());
spatialAnimation.setTracks(tracks);
animations.add(spatialAnimation);
blenderContext.addAnimation((Long) node.getUserData(ObjectHelper.OMA_MARKER), spatialAnimation);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
if (tracks != null && tracks.length > 0) {
Animation boneAnimation = new Animation(action.getName(), action.getAnimationTime());
boneAnimation.setTracks(tracks);
animations.add(boneAnimation);
Long animatedNodeOMA = ((Number) blenderContext.getMarkerValue(ObjectHelper.OMA_MARKER, node)).longValue();
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Creates an Animation based on the keyFrames previously added to the helper.
* @return the generated animation
*/
public Animation buildAnimation() {
interpolateTime();
interpolate(keyFramesTranslation, Type.Translation);
interpolate(keyFramesRotation, Type.Rotation);
interpolate(keyFramesScale, Type.Scale);
SpatialTrack spatialTrack = new SpatialTrack(times, translations, rotations, scales);
//creating the animation
Animation spatialAnimation = new Animation(name, duration);
spatialAnimation.setTracks(new SpatialTrack[]{spatialTrack});
return spatialAnimation;
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
anim.setTracks(new Track[]{ pair.toJmeSpatialTrack() });
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
spatialAnimation.setTracks(new SpatialTrack[] { spatialTrack });
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-plugins
animation.setTracks(trackList);
tracks.clear();
} else if (qName.equals("keyframe")) {
代码示例来源:origin: org.jmonkeyengine/jme3-plugins
animation.setTracks(trackList);
tracks.clear();
} else if (qName.equals("keyframe")) {
代码示例来源:origin: info.projectkyoto/mms-engine
animation.setTracks(trackList);
tracks.clear();
} else if (qName.equals("keyframe")) {
代码示例来源:origin: tonihele/OpenKeeper
animation.setTracks(poseTracks.toArray(new PoseTrack[poseTracks.size()]));
AnimControl control = new AnimControl();
control.addAnim(animation);
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Creates an Animation based on the keyFrames previously added to the helper.
* @return the generated animation
*/
public Animation buildAnimation() {
interpolateTime();
interpolate(keyFramesTranslation, Type.Translation);
interpolate(keyFramesRotation, Type.Rotation);
interpolate(keyFramesScale, Type.Scale);
SpatialTrack spatialTrack = new SpatialTrack(times, translations, rotations, scales);
//creating the animation
Animation spatialAnimation = new Animation(name, duration);
spatialAnimation.setTracks(new SpatialTrack[]{spatialTrack});
return spatialAnimation;
}
代码示例来源:origin: info.projectkyoto/mms-engine
/**
* Creates an Animation based on the keyFrames previously added to the helper.
* @return the generated animation
*/
public Animation buildAnimation() {
interpolateTime();
interpolate(keyFramesTranslation, Type.Translation);
interpolate(keyFramesRotation, Type.Rotation);
interpolate(keyFramesScale, Type.Scale);
SpatialTrack spatialTrack = new SpatialTrack(times, translations, rotations, scales);
//creating the animation
Animation spatialAnimation = new Animation(name, duration);
spatialAnimation.setTracks(new SpatialTrack[]{spatialTrack});
return spatialAnimation;
}
代码示例来源:origin: org.jmonkeyengine/jme3-plugins
anim.setTracks(new Track[]{ pair.toJmeSpatialTrack() });
代码示例来源:origin: org.jmonkeyengine/jme3-dae
boneAnim.setTracks(new BoneTrack[] {boneTrack});
代码示例来源:origin: org.jmonkeyengine/jme3-dae
private Animation createAnimation(DAENode animationNode, Bone bone, Skeleton skeleton)
{
DAENode channel = animationNode.getChild(Names.CHANNEL);
DAENode sampler = animationNode.getChild(Names.SAMPLER);
DAENode times = sampler.getChild(Names.INPUT, Names.SEMANTIC, Semantic.INPUT.name()).getLinkedSource();
DAENode values = sampler.getChild(Names.INPUT, Names.SEMANTIC, Semantic.OUTPUT.name()).getLinkedSource();
float[] timeValues = times.getChild(Names.FLOAT_ARRAY).getContent(FLOAT_LIST).get();
float[] outputValues = values.getChild(Names.FLOAT_ARRAY).getContent(FLOAT_LIST).get();
ChannelTarget channelTarget = ChannelTarget.forName(channel.getAttribute(Names.TARGET, TEXT).get());
Conditions.checkTrue(sampler.isDefined());
Conditions.checkTrue(times.isDefined());
Conditions.checkTrue(values.isDefined());
Conditions.checkTrue(channel.isDefined());
Conditions.checkNotNull(channelTarget);
Conditions.checkNotNull(timeValues);
Conditions.checkNotNull(outputValues);
Transform[] transformList = channelTarget.transform(outputValues).get();
Conditions.checkNotNull(transformList);
Conditions.checkValue(transformList.length, timeValues.length);
int boneIndex = skeleton.getBoneIndex(bone);
float animationLength = max(timeValues);
Quaternion[] rotations = getRotations(transformList);
Vector3f[] translations = getTranslations(transformList);
BoneTrack track = new BoneTrack(boneIndex, timeValues, translations, rotations);
Animation anim = new Animation(animationNode.getAttribute(Names.ID, TEXT).get(), animationLength);
anim.setTracks(new BoneTrack[] {track});
return anim;
}
内容来源于网络,如有侵权,请联系作者删除!