Example #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 ForewardKinematics Instantiate(DHParameter dhparam) //static variables are shared between all class instances.
 {
     if (instance == null)                                         //Prevents of Locking if the instance allready has been created
     {
         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 ForewardKinematics(dhparam);
             }
         }
     }
     return(instance);// when using this methode, allways the same and only instance will be returned
 }
Example #2
0
 private KinematicControl(DHParameter dhparam, ActualPosition _ActualPosition)
 {
     forewardkinematics = ForewardKinematics.Instantiate(dhparam);
     inversekinematics  = InverseKinematics.Instantiate(dhparam, _ActualPosition);
 }