/// <summary> /// Add a bender to the arrays. /// </summary public void AddBender(OptimizedVertexBender b) { benderLocal2World[currentNumber] = b.benderLocal2World; benderWorld2Local[currentNumber] = b.benderWorld2Local; benderHPDN[currentNumber] = b.HPDN; currentNumber++; }
/// <summary> /// Updates every internal parameter that is needed /// </summary> public virtual void UpdateData() { if (benderData == null) { benderData = new OptimizedVertexBender(); GenerateMatrices(); } if (transform.hasChanged) { SetDirtyFlags(true); } if (_changed) { if (_generateMatrix) { GenerateMatrices(); } this.benderData.HPDN.Set(Hardness, Power, Direction, Noise); _changed = false; } }