Ejemplo n.º 1
0
 /// <summary>
 /// IF the instance has allready been created, the instance created before will be given back, when calling this method. Ohterwise a new instance will be given back
 /// </summary>
 /// <param name="dhparam"></param>
 /// <returns></returns>
 public static InverseKinematics Instantiate(DHParameter dhparam, ActualPosition _ActualPosition) //static variables are shared between all class instances.
 {
     if (instance == null)                                                                        //Prevents of Locking if the instance allready has been created. IF the instance has allready been created, this instance created before will be given back, when calling this method
     {
         lock (LockObj)                                                                           //no new instance can be createt from any thread as long as the first one onlocks the object
         {
             if (instance == null)
             {
                 instance = new InverseKinematics(dhparam, _ActualPosition);
             }
         }
     }
     return(instance);
 }
Ejemplo n.º 2
0
 private KinematicControl(DHParameter dhparam, ActualPosition _ActualPosition)
 {
     forewardkinematics = ForewardKinematics.Instantiate(dhparam);
     inversekinematics  = InverseKinematics.Instantiate(dhparam, _ActualPosition);
 }