/// <summary> /// Enters the given ETV into a list of observed ETVs. All ETVs entered here, /// will be persisted, when the app is closed. /// </summary> /// <param name="etv">ETV to persist later</param> /// <param name="dataSetID">data set ID of it</param> /// <param name="variables">variables which it visualizes</param> /// <param name="visType">visualization type used</param> override public void PersistETV(GameObject etv, int dataSetID, string[] variables, VisType visType) { var persistableETV = new SerializedETV(); persistableETV.dataSetID = dataSetID; persistableETV.variables = variables; persistableETV.visType = visType; ETVs.Add(etv, persistableETV); }
/// <summary> /// Restores an ETV from the persisted information (position, rotation, variables, /// data set ID and Visualization Type). /// </summary> /// <param name="etv">serialized ETV information</param> override public void LoadPersistentETV(SerializedETV etv) { // Restore Visualization from loaded information var loadedETV = Services.VisFactory().GenerateVisFrom(etv.dataSetID, etv.variables, etv.visType); // Restore position and rotation var p = etv.position; var r = etv.rotation; loadedETV.transform.localPosition = new Vector3(p[0], p[1], p[2]); loadedETV.GetComponent <ETVAnchor>().Rotatable.transform.localRotation = Quaternion.Euler(r[0], r[1], r[2]); }
public override void LoadPersistentETV(SerializedETV etv) { Debug.Log(TAG + ": Dummy. Doing nothing."); }
public abstract void LoadPersistentETV(SerializedETV etv);