public void Log(FishModelData bodyModel, float current)
 {
     if (current > this.current)
     {
         this.logData.trajectory.Append(current, bodyModel.Head.Position);
         this.logData.velocity.Append(current, bodyModel.Velocity);
         this.logData.direction.Append(current, bodyModel.Direction);
         this.current += this.sampleInterval;
     }
 }
        protected void ApplyActivation(float t, FishModelData modelData, FishActivationData data)
        {
            var types = new List <Spring.Type>()
            {
                Spring.Type.MuscleFront, Spring.Type.MuscleMiddle, Spring.Type.MuscleBack
            };

            foreach (var type in types)
            {
                data.ApplyActivation(t, type, modelData);
            }
        }
 public void UpdateData(FishModelData modelData, FishActivationData activationData)
 {
     this.bodyModel      = modelData;
     this.activationData = activationData;
 }
 public Problem(FishModelData model, FishActivationData activationData)
 {
     this.UpdateData(model, activationData);
 }
Esempio n. 5
0
 public void Init()
 {
     this.modelData = GeometryFunctions.Load(this.modelFileName);
 }