public override void Initialize() { _jellyData = OwnerNode.GetComponent <JellyData>(); _jellyData.OnDataModified += UpdateLines; SetupMeshData(); base.Initialize(); }
private void Modifying() { //if (OwnerNode != null) // OwnerNode.BackwardCompatibilityPropertySet(PropertyType.Name, this); if (IsModified) { return; } //-- Clone var orig = (BinaryDataValue)OwnerNode.Data.GetDynamicRawData(PropertyType); BinaryDataValue data; if (orig == null) { data = GetDefaultRawData(); } else { data = new BinaryDataValue { Id = orig.Id, ContentType = orig.ContentType, FileName = orig.FileName, Size = orig.Size, Checksum = orig.Checksum, Stream = orig.Stream }; } OwnerNode.MakePrivateData(); OwnerNode.Data.SetDynamicRawData(PropertyType, data, false); }
public override void Initialize() { _spinningTopMovement = OwnerNode.GetComponent <SpinningTopMovement>(); //_spinningTopMovement.OnSimulationUpdated += OnSimulationUpdated; _spinningTopMovement.OnSimulationRestarted += ClearTrajectory; base.Initialize(); }
public override void Initialize() { _spring = OwnerNode.GetComponent <SpringMovement>(); _spring.OnSimulationUpdated += UpdateData; _spring.OnSimulationReset += ResetData; base.Initialize(); }
private void Modifying() { if (IsModified) { return; } // Clone var orig = (BinaryDataValue)OwnerNode.Data.GetDynamicRawData(PropertyType); BinaryDataValue data; if (orig == null) { data = GetDefaultRawData(); } else { data = new BinaryDataValue { Id = orig.Id, FileId = orig.FileId, ContentType = orig.ContentType, FileName = orig.FileName, Size = orig.Size, BlobProviderName = orig.BlobProviderName, BlobProviderData = orig.BlobProviderData, Checksum = orig.Checksum, Stream = orig.Stream }; } OwnerNode.MakePrivateData(); OwnerNode.Data.SetDynamicRawData(PropertyType, data, false); }
public override void Initialize() { if (_source == null) { _source = OwnerNode.GetComponent <IDynamicMeshSource>(); } base.Initialize(); }
private void ChangeData(List <int> newData) { if (OwnerNode != null) { OwnerNode.MakePrivateData(); OwnerNode.Data.SetDynamicRawData(PropertyType, newData); } else { __privateList = newData; } }
internal T AnnotationRecursive <T>(T defaultValue) where T : class { var uc = Annotation <T>(); if (uc == null) { return(OwnerNode == null ? defaultValue : OwnerNode.AnnotationRecursive <T>(defaultValue)); } return(uc); }
private void Modifying() { if (IsModified) { return; } // Clone var orig = (List <int>)OwnerNode.Data.GetDynamicRawData(PropertyType); var clone = orig == null ? new List <int>() : new List <int>(orig); OwnerNode.MakePrivateData(); OwnerNode.Data.SetDynamicRawData(PropertyType, clone, false); }
//Start dragging if mouse was moved private void StartDragging(object sender, MouseEventArgs e) { Point movePoint = this.OwnerNode.OwnerCTreeView.PointToClient(Cursor.Position); if (Math.Abs(mouseDownPosition.X - movePoint.X) + Math.Abs(mouseDownPosition.Y - movePoint.Y) > 5) //if (Math.Abs(mouseDownPosition.X - e.Location.X) + Math.Abs(mouseDownPosition.Y - e.Location.Y)>5) { this.MouseUp -= NotDragging; this.MouseMove -= StartDragging; OwnerNode.Drag(); } }
public override void Initialize() { _jellyData = OwnerNode.GetComponent <JellyData>(); _initialData = new CubeArray <Vector3d>(_jellyData.DataPoints); _displacementVectors = new CubeArray <Vector3d>(_initialData.xSize, _initialData.ySize, _initialData.zSize); _displacementFrequency = new CubeArray <double>(_initialData.xSize, _initialData.ySize, _initialData.zSize); var gen = new Random(); for (int y = 0; y < _initialData.ySize; y++) { for (int z = 0; z < _initialData.zSize; z++) { for (int x = 0; x < _initialData.xSize; x++) { _displacementVectors[x, y, z] = new Vector3d(gen.NextDouble() * 2.0 - 1.0, gen.NextDouble() * 2.0 - 1.0, gen.NextDouble() * 2.0 - 1.0).Normalized(); _displacementFrequency[x, y, z] = gen.NextDouble() * _frequencyMult; } } } base.Initialize(); }
public HtmlNode CloneNode(bool something) { return(OwnerNode.CloneNode(something)); }