本文整理了Java中com.jme3.animation.Animation.<init>()
方法的一些代码示例,展示了Animation.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Animation.<init>()
方法的具体详情如下:
包路径:com.jme3.animation.Animation
类名称:Animation
方法名:<init>
[英]Serialization-only. Do not use.
[中]仅序列化。不要使用。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
SpatialTrack[] tracks = action.toTracks(node, blenderContext);
if (tracks != null && tracks.length > 0) {
Animation spatialAnimation = new Animation(action.getName(), action.getAnimationTime());
spatialAnimation.setTracks(tracks);
animations.add(spatialAnimation);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
BoneTrack[] tracks = action.toTracks(skeleton, blenderContext);
if (tracks != null && tracks.length > 0) {
Animation boneAnimation = new Animation(action.getName(), action.getAnimationTime());
boneAnimation.setTracks(tracks);
animations.add(boneAnimation);
代码示例来源: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
float animStart = animInfo.firstFrame / this.animFrameRate;
float animStop = animInfo.lastFrame / this.animFrameRate;
Animation anim = new Animation(animInfo.name, length);
if(tracks == null || tracks.length == 0)
continue;
anim = new Animation(animInfo.name, realLength);
for(Track track : tracks)
anim.addTrack(track);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
anim = new Animation(animName, duration);
animControl.addAnim(anim);
} else {
Animation anim = new Animation(animName, duration);
anim.setTracks(new Track[]{ pair.toJmeSpatialTrack() });
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* No ClassCastException when clear() a Cinematic with AnimationEvent
*/
@Test
public void clearAnimationEvent() {
Cinematic sut = new Cinematic();
Node model = new Node("model");
AnimControl ac = new AnimControl();
ac.addAnim(new Animation("animName", 1.0f));
model.addControl(ac);
sut.enqueueCinematicEvent(new AnimationEvent(model, "animName"));
sut.initialize(null, null);
sut.clear();
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
Animation spatialAnimation = new Animation("anim", animTime);
spatialAnimation.setTracks(new SpatialTrack[] { spatialTrack });
代码示例来源:origin: org.jmonkeyengine/jme3-plugins
String name = SAXUtil.parseString(attribs.getValue("name"));
float length = SAXUtil.parseFloat(attribs.getValue("length"));
animation = new Animation(name, length);
} else if (qName.equals("bonehierarchy")) {
assert elementStack.peek().equals("skeleton");
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-plugins
String name = SAXUtil.parseString(attribs.getValue("name"));
float length = SAXUtil.parseFloat(attribs.getValue("length"));
animation = new Animation(name, length);
} else if (qName.equals("bonehierarchy")) {
assert elementStack.peek().equals("skeleton");
代码示例来源:origin: info.projectkyoto/mms-engine
String name = SAXUtil.parseString(attribs.getValue("name"));
float length = SAXUtil.parseFloat(attribs.getValue("length"));
animation = new Animation(name, length);
} else if (qName.equals("bonehierarchy")) {
assert elementStack.peek().equals("skeleton");
代码示例来源:origin: us.ihmc.thirdparty.jme/jme3-plugins
float animStart = animInfo.firstFrame / this.animFrameRate;
float animStop = animInfo.lastFrame / this.animFrameRate;
Animation anim = new Animation(animInfo.name, length);
代码示例来源: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: tonihele/OpenKeeper
com.jme3.animation.Animation animation = new com.jme3.animation.Animation("anim", (anim.getFrames() - 1) / 30f);
animation.setTracks(poseTracks.toArray(new PoseTrack[poseTracks.size()]));
AnimControl control = new AnimControl();
代码示例来源: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: org.jmonkeyengine/jme3-plugins
float animStart = animInfo.firstFrame / this.animFrameRate;
float animStop = animInfo.lastFrame / this.animFrameRate;
Animation anim = new Animation(animInfo.name, length);
if(tracks == null || tracks.length == 0)
continue;
anim = new Animation(animInfo.name, realLength);
for(Track track : tracks)
anim.addTrack(track);
代码示例来源:origin: org.jmonkeyengine/jme3-plugins
anim = new Animation(animName, duration);
animControl.addAnim(anim);
} else {
Animation anim = new Animation(animName, duration);
anim.setTracks(new Track[]{ pair.toJmeSpatialTrack() });
代码示例来源:origin: org.jmonkeyengine/jme3-plugins
Animation anim = new Animation();
anim.setName(name);
int skinIndex = -1;
代码示例来源:origin: org.jmonkeyengine/jme3-dae
BoneTrack boneTrack = new BoneTrack(0, times, translations, rotations);
Animation boneAnim = new Animation("test animation", 3);
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;
}
内容来源于网络,如有侵权,请联系作者删除!