MinieLibrary/src/main/java/com/jme3/bullet/animation/RagUtils.java
/**
     * Calculate a coordinate transform for the specified spatial relative to a
     * specified ancestor node. The result incorporates the transform of the
     * starting spatial, but not that of the ancestor.
     *
     * @param startSpatial the starting spatial (not null, unaffected)
     * @param ancestorNode the ancestor node (not null, unaffected)
     * @param storeResult storage for the result (modified if not null)
     * @return a coordinate transform (either storeResult or a new vector, not
     * null)
     */
Calculate a coordinate transform for the specified spatial relative to a
specified ancestor node. The result incorporates the transform of the
starting spatial, but not that of the ancestor.

@param startSpatial the starting spatial (not null, unaffected)
@param ancestorNode the ancestor node (not null, unaffected)
@param storeResult storage for the result (modified if not null)
@return a coordinate transform (either storeResult or a new vector, not
null)
Calculate a coordinate transform for the specified spatial relative to a specified ancestor node . The result incorporates the transform of the starting spatial but not that of the ancestor . @param startSpatial the starting spatial ( not null unaffected ) @param ancestorNode the ancestor node ( not null unaffected ) @param storeResult storage for the result ( modified if not null ) @return a coordinate transform ( either storeResult or a new vector not null )
public static Transform relativeTransform(Spatial startSpatial,
            Node ancestorNode, Transform storeResult) {
        Validate.nonNull(startSpatial, "spatial");
        Validate.nonNull(ancestorNode, "ancestor");
        assert startSpatial.hasAncestor(ancestorNode);
        Transform result
                = (storeResult == null) ? new Transform() : storeResult;
        result.loadIdentity();
        Spatial loopSpatial = startSpatial;
        while (loopSpatial != ancestorNode) {
            Transform localTransform = loopSpatial.getLocalTransform();
            result.combineWithParent(localTransform);
            loopSpatial = loopSpatial.getParent();
        }
        return result;
    }
public static Transform relativeTransform ( Spatial startSpatial , Node ancestorNode , Transform storeResult ) { Validate . nonNull ( startSpatial , "spatial" ) ; Validate . nonNull ( ancestorNode , "ancestor" ) ; assert startSpatial . hasAncestor ( ancestorNode ) ; Transform result = ( storeResult == null ) ? new Transform ( ) : storeResult ; result . loadIdentity ( ) ; Spatial loopSpatial = startSpatial ; while ( loopSpatial != ancestorNode ) { Transform localTransform = loopSpatial . getLocalTransform ( ) ; result . combineWithParent ( localTransform ) ; loopSpatial = loopSpatial . getParent ( ) ; } return result ; }
Calculate a coordinate transform for the specified spatial relative to a
 specified ancestor node.
Calculate a coordinate transform for the specified spatial relative to a specified ancestor node .