Ejemplo n.º 1
0
        public void captureSceneState(EditUICallback callback)
        {
            action.clear();
            if (Layers)
            {
                ChangeLayersCommand changeLayers = new ChangeLayersCommand();
                changeLayers.Layers.captureState();
                action.addCommand(changeLayers);
            }

            if (MusclePosition)
            {
                SetMusclePositionCommand musclePosition = new SetMusclePositionCommand();
                musclePosition.MusclePosition.captureState();
                action.addCommand(musclePosition);
            }

            if (Camera)
            {
                MoveCameraCommand moveCamera = new MoveCameraCommand();
                callback.runOneWayCustomQuery(CameraPosition.CustomEditQueries.CaptureCameraPosition, moveCamera.CameraPosition);
                action.addCommand(moveCamera);
            }

            if (MedicalState)
            {
                ChangeMedicalStateCommand medicalState = new ChangeMedicalStateCommand();
                MedicalState medState = new MedicalState("");
                medState.update();
                medicalState.captureFromMedicalState(medState);
                action.addCommand(medicalState);
            }

            if (HighlightTeeth)
            {
                action.addCommand(new ChangeTeethHighlightsCommand(TeethController.HighlightContacts));
            }
        }
Ejemplo n.º 2
0
        public void captureSceneStateTo(EditUICallback callback, Action setLayerState, Action setMusclePosition, Action <CameraPosition> setCameraPosition, Action <MedicalState> setMedicalState)
        {
            if (Layers)
            {
                if (layersCommand == null)
                {
                    layersCommand = new BlendLayersCommand();
                    action.addCommand(layersCommand);
                }

                setLayerState();
            }
            else if (layersCommand != null)
            {
                action.removeCommand(layersCommand);
                layersCommand = null;
            }

            if (MusclePosition)
            {
                if (muscleCommand == null)
                {
                    muscleCommand = new BlendMusclePositionCommand();
                    action.addCommand(muscleCommand);
                }

                setMusclePosition();
            }
            else if (muscleCommand != null)
            {
                action.removeCommand(muscleCommand);
                muscleCommand = null;
            }

            if (Camera)
            {
                if (cameraCommand == null)
                {
                    cameraCommand = new MoveBlendedCameraCommand();
                    action.addCommand(cameraCommand);
                }

                CameraPosition camPos = new CameraPosition();
                callback.runOneWayCustomQuery(CameraPosition.CustomEditQueries.CaptureCameraPosition, camPos);
                setCameraPosition(camPos);
            }
            else if (cameraCommand != null)
            {
                action.removeCommand(cameraCommand);
                cameraCommand = null;
            }

            if (MedicalState)
            {
                if (medicalStateCommand == null)
                {
                    medicalStateCommand = new BlendMedicalStateCommand();
                    action.addCommand(medicalStateCommand);
                }

                MedicalState medState = new MedicalState("");
                medState.update();
                setMedicalState(medState);
            }
            else if (medicalStateCommand != null)
            {
                action.removeCommand(medicalStateCommand);
                medicalStateCommand = null;
            }
        }
Ejemplo n.º 3
0
 private void captureCameraPosition(EditUICallback callback)
 {
     callback.runOneWayCustomQuery(CustomEditQueries.CaptureCameraPosition, this);
     editInterface.safeFireDataNeedsRefresh();
 }