Examples of JointData


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

     */
    public void setJointTransformData(final int jointIndex, final JointData jointData) {
        final String key = JointChannel.JOINT_CHANNEL_NAME + jointIndex;
        // reuse TransformData object
        if (!data.containsKey(key)) {
            data.put(key, new JointData(jointData));
        } else {
            final JointData old = data.get(key);
            old.set(jointData);
        }
    }
View Full Code Here

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

     * @param translation
     *            the translation to set
     */
    public void setJointTranslation(final int jointIndex, final ReadOnlyVector3 translation) {
        final String key = JointChannel.JOINT_CHANNEL_NAME + jointIndex;
        JointData tData = data.get(key);
        if (tData == null) {
            tData = new JointData(jointIndex);
            data.put(key, tData);
        }

        tData.setTranslation(translation);
    }
View Full Code Here

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

     * @param scale
     *            the scale to set
     */
    public void setJointScale(final int jointIndex, final ReadOnlyVector3 scale) {
        final String key = JointChannel.JOINT_CHANNEL_NAME + jointIndex;
        JointData tData = data.get(key);
        if (tData == null) {
            tData = new JointData(jointIndex);
            data.put(key, tData);
        }

        tData.setScale(scale);
    }
View Full Code Here

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

     * @param rotation
     *            the rotation to set
     */
    public void setJointRotation(final int jointIndex, final ReadOnlyQuaternion rotation) {
        final String key = JointChannel.JOINT_CHANNEL_NAME + jointIndex;
        JointData tData = data.get(key);
        if (tData == null) {
            tData = new JointData(jointIndex);
            data.put(key, tData);
        }

        tData.setRotation(rotation);
    }
View Full Code Here

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

     */
    public void initJointsByName(final SkeletonPose pose, final AnimationClip clip, final String... jointNames) {
        for (final String name : jointNames) {
            final int jointIndex = pose.getSkeleton().findJointByName(name);
            setJointTransformData(jointIndex, ((JointChannel) clip.findChannelByName(JointChannel.JOINT_CHANNEL_NAME
                    + jointIndex)).getJointData(0, new JointData(jointIndex)));
        }
    }
View Full Code Here

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

     *            the indices of the joints to initialize data for.
     */
    public void initJointsById(final AnimationClip clip, final int... jointIndices) {
        for (final int jointIndex : jointIndices) {
            setJointTransformData(jointIndex, ((JointChannel) clip.findChannelByName(JointChannel.JOINT_CHANNEL_NAME
                    + jointIndex)).getJointData(0, new JointData(jointIndex)));
        }
    }
View Full Code Here

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

        // cycle through, pulling out and applying those we know about
        if (data != null) {
            for (final Object value : data.values()) {
                if (value instanceof JointData) {
                    final JointData jointData = (JointData) value;
                    if (jointData.getJointIndex() >= 0) {
                        jointData.applyTo(applyToPose.getLocalJointTransforms()[jointData.getJointIndex()]);
                    }
                } else if (value instanceof TriggerData) {
                    final TriggerData trigger = (TriggerData) value;
                    if (trigger.isArmed()) {
                        try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.