Package com.ardor3d.extension.animation.skeletal.state

Examples of com.ardor3d.extension.animation.skeletal.state.AbstractFiniteState


     *            and setting it active.
     * @return true if succeeds
     */
    public boolean setCurrentState(final String stateName, final boolean rewind) {
        if (stateName != null) {
            final AbstractFiniteState state = _steadyStates.get(stateName);
            if (state != null) {
                setCurrentState(state, rewind);
                return true;
            } else {
                AnimationLayer.logger.warning("unable to find SteadyState named: " + stateName);
View Full Code Here


     * @param key
     *            the transition key, a string key used to look up a transition in the current animation state.
     * @return true if there is a current state and we were able to do the given transition.
     */
    public boolean doTransition(final String key) {
        final AbstractFiniteState state = getCurrentState();
        // see if current state has a transition
        if (state instanceof SteadyState) {
            final SteadyState steadyState = (SteadyState) state;
            AbstractFiniteState nextState = steadyState.doTransition(key, this);
            if (nextState == null) {
                // no transition found, check if there is a global transition
                AbstractTransitionState transition = _transitions.get(key);
                if (transition == null) {
                    transition = _transitions.get("*");
 
View Full Code Here

    public Map<String, ? extends Object> getCurrentSourceData() {
        if (getLayerBlender() != null) {
            return getLayerBlender().getBlendedSourceData(getManager());
        }

        final AbstractFiniteState state = getCurrentState();
        if (state != null) {
            return state.getCurrentSourceData(getManager());
        } else {
            return null;
        }
    }
View Full Code Here

        }

        // move the time forward on the layers
        for (int i = 0; i < _layers.size(); ++i) {
            final AnimationLayer layer = _layers.get(i);
            final AbstractFiniteState state = layer.getCurrentState();
            if (state != null) {
                state.update(globalTime, layer);
            }
        }

        // call apply on blend module, passing in pose
        if (!_applyToPoses.isEmpty()) {
            for (int i = 0; i < _applyToPoses.size(); ++i) {
                final SkeletonPose pose = _applyToPoses.get(i);
                _applier.applyTo(pose, this);
            }
        }

        // apply for non-pose related assets
        _applier.apply(_sceneRoot, this);

        // post update to clear states
        for (int i = 0; i < _layers.size(); ++i) {
            final AnimationLayer layer = _layers.get(i);
            final AbstractFiniteState state = layer.getCurrentState();
            if (state != null) {
                state.postUpdate(layer);
            }
        }
    }
View Full Code Here

TOP

Related Classes of com.ardor3d.extension.animation.skeletal.state.AbstractFiniteState

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.