Package com.ardor3d.extension.animation.skeletal.clip

Examples of com.ardor3d.extension.animation.skeletal.clip.AnimationClip


        }

        // Make our manager
        manager = new AnimationManager(_timer, skinDatas.get(0).getPose());

        final AnimationClip clipA = storage.extractChannelsAsClip("clipA");

        // Set some clip instance specific data - repeat, time scaling
        manager.getClipInstance(clipA).setLoopCount(Integer.MAX_VALUE);

        // Add our "applier logic".
View Full Code Here


        for (int i = 0; i < finalTimeList.size(); i++) {
            time[i] = finalTimeList.get(i);
        }
        final Transform[] transforms = finalTransformList.toArray(new Transform[finalTransformList.size()]);

        AnimationClip animationClip = animationItemRoot.getAnimationClip();
        if (animationClip == null) {
            animationClip = new AnimationClip(animationItemRoot.getName());
            animationItemRoot.setAnimationClip(animationClip);
        }

        // Make an animation channel - first find if we have a matching joint
        Joint joint = _dataCache.getElementJointMapping().get(parentElement);
        if (joint == null) {
            String nodeName = parentElement.getAttributeValue("name", (String) null);
            if (nodeName == null) { // use id if name doesn't exist
                nodeName = parentElement.getAttributeValue("id", parentElement.getName());
            }
            if (nodeName != null) {
                joint = _dataCache.getExternalJointMapping().get(nodeName);
            }

            if (joint == null) {
                // no joint still, so make a transform channel.
                final TransformChannel transformChannel = new TransformChannel(nodeName, time, transforms);
                animationClip.addChannel(transformChannel);
                _colladaStorage.getAnimationChannels().add(transformChannel);
                return;
            }
        }

        // create joint channel
        final JointChannel jointChannel = new JointChannel(joint, time, transforms);
        animationClip.addChannel(jointChannel);
        _colladaStorage.getAnimationChannels().add(jointChannel);
    }
View Full Code Here

     * @param name
     *            the name to give our new clip.
     * @return the new AnimationClip.
     */
    public AnimationClip extractChannelsAsClip(final String name) {
        final AnimationClip clip = new AnimationClip(name);
        for (final AbstractAnimationChannel channel : getAnimationChannels()) {
            clip.addChannel(channel);
        }
        return clip;
    }
View Full Code Here

TOP

Related Classes of com.ardor3d.extension.animation.skeletal.clip.AnimationClip

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.