Ejemplo n.º 1
0
 /// <summary>
 /// Resets the object's properties.
 /// </summary>
 public void Reset()
 {
     // Check if there is a rendering caller.
     renderingCaller = GetComponent <Rendering.Rendering>();
     // Reset the key child components.
     _cameraSetup = CameraSetup.CreateOrResetCameraSetup(transform);
     _dataHandler = DataHandler.CreateOrResetDataHandler(transform);
     // Initialize the processing methods.
     _processingMethods = ProcessingMethod.CreateOrResetProcessingMethods(transform);
     for (int iter = 0; iter < _processingMethods.Length; iter++)
     {
         _processingMethods[iter].InitializeLinks();
     }
     // Initialize the external tools.
     _externalHelpers = ExternalHelper.CreateOrResetExternalHelpers(transform);
     for (int iter = 0; iter < _externalHelpers.Length; iter++)
     {
         _externalHelpers[iter].InitializeLinks();
     }
     // Get the method defining the container for the input images.
     _previewSourceImagesLoader = _processingMethods[0].PMColorTextureArray;
     // Reads the acquisition information from the source data directory.
     ReadAcquisitionInformation();
     // Destroys all created method components.
     foreach (MonoBehaviour component in GetComponents <MonoBehaviour>())
     {
         if (component is IMethodGUI)
         {
             DestroyImmediate(component);
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Resets the object's properties.
 /// </summary>
 void Reset()
 {
     // Reset the key child components.
     _cameraSetup = CameraSetup.CreateOrResetCameraSetup(transform);
     _dataHandler = DataHandler.CreateOrResetDataHandler(transform);
     // Reset other properties.
     scaleFactor            = 0.01f;
     repositionAroundCenter = true;
 }
        /// <summary>
        /// Resets the object's properties.
        /// </summary>
        void Reset()
        {
            // Reset the key child components.
            _cameraSetup          = CameraSetup.CreateOrResetCameraSetup(transform);
            _dataHandler          = DataHandler.CreateOrResetDataHandler(transform);
            _previewCameraManager = PreviewCameraManager.CreateOrResetPreviewCameraManager(transform);
#if UNITY_EDITOR
            // Reset parameters to their default values.
            _cameraPrefab     = null;
            _cameraCount      = new Vector2Int(4, 4);
            _acquireDepthData = false;
            _copyGlobalMesh   = false;
            _setupType        = SetupType.Grid;
            _setupDirection   = SetupDirection.Outwards;
            _lockSetup        = false;
            // Update the acquisition camera poses to reflect the updated setup.
            ComputeAcquisitionCameraPoses();
            // Create a preview camera from the prefab.
            CreatePreviewCameraFromPrefab();
#endif //UNITY_EDITOR
        }