Beispiel #1
0
    // Graph Editor Update
    private void UpdateGraph()
    {
        if (currentAnimation != null)
        {
            // Clears Graph Canvas
            graphCanvas.clearAllLines();

            // Readd Points
            graphCanvas.addPoints(AnimVR.KEYFRAME_TYPE.POS_X, Pos_XColour, KeyframesToUIPoints(keyframesContainer.posX));
            graphCanvas.addPoints(AnimVR.KEYFRAME_TYPE.POS_Y, Pos_YColour, KeyframesToUIPoints(keyframesContainer.posY));
            graphCanvas.addPoints(AnimVR.KEYFRAME_TYPE.POS_Z, Pos_ZColour, KeyframesToUIPoints(keyframesContainer.posZ));
            graphCanvas.addPoints(AnimVR.KEYFRAME_TYPE.ROT_X, Rot_XColour, KeyframesToUIPoints(keyframesContainer.rotX));
            graphCanvas.addPoints(AnimVR.KEYFRAME_TYPE.ROT_Y, Rot_YColour, KeyframesToUIPoints(keyframesContainer.rotY));
            graphCanvas.addPoints(AnimVR.KEYFRAME_TYPE.ROT_Z, Rot_ZColour, KeyframesToUIPoints(keyframesContainer.rotZ));
            graphCanvas.addPoints(AnimVR.KEYFRAME_TYPE.SCALE_X, Sca_XColour, KeyframesToUIPoints(keyframesContainer.scaleX));
            graphCanvas.addPoints(AnimVR.KEYFRAME_TYPE.SCALE_Y, Sca_YColour, KeyframesToUIPoints(keyframesContainer.scaleY));
            graphCanvas.addPoints(AnimVR.KEYFRAME_TYPE.SCALE_Z, Sca_ZColour, KeyframesToUIPoints(keyframesContainer.scaleZ));

            // Redraw Canvas
            graphCanvas.redraw();
        }
    }