Esempio n. 1
0
        /// <summary>
        /// Adds a new spring to the model.
        /// </summary>
        public Spring AddSpring(double stiffness, double shearStiffness, double rotationalStiffness, Node n1, Node n2)
        {
            Spring n = new Spring(stiffness, shearStiffness, rotationalStiffness, n1, n2);

            Springs.Add(n);
            return(n);
        }
Esempio n. 2
0
        public void AddSpring(IVehicleComponent component)
        {
            if (SpringNeedsToAdd && component.Type == VehicleComponentType.Spring)
            {
                Springs.Add(component);

                SpringNeedsToAdd = false;
            }
        }
        public void AddSpringJoint(ABSpringJoint _joint)
        {
            if (Springs.Contains(_joint))
            {
                Debug.LogWarning("Can't add duplicate spring joints!");
                return;
            }

            Springs.Add(_joint);
        }
Esempio n. 4
0
 public SolutionPointModel(bool zero = false)
 {
     if (zero)
     {
         Chosen          = false;
         UpperSpringBool = false;
         LowerSpringBool = false;
         XPosition       = 0;
         YPosition       = 0;
         Springs.Add(new SpringModel(true));
         Springs.Add(new SpringModel(true));
     }
 }