Ejemplo n.º 1
0
 /// <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++;
 }
Ejemplo n.º 2
0
        /// <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;
            }
        }