예제 #1
0
 public void addOap(optimAnchorPoint oap)
 {
     oaplist.AddLast(oap);
     if (verbosity == verbosityE.verbose)
     {
         GraphUtil.Log("addOap  source:" + oap.source.ToString("F4"));
         GraphUtil.Log("addOap  target:" + oap.target.ToString("F4"));
         Debug.Log("addOap  source:" + oap.source.ToString("F4"));
         Debug.Log("addOap  target:" + oap.target.ToString("F4"));
     }
 }
예제 #2
0
        float F(optimAnchorPoint oap)
        {
            var v0 = oap.source;

            // scale
            var v1 = new Vector3(v0.x * scavek.x, v0.y * scavek.y, v0.z * scavek.z);
            // rotate (just y for now)
            var v2 = rotateY(rotvek.y, v1);

            // translate
            var v3 = v2 + trnvek;

            var   dt  = v3 - oap.target;
            float err = dt.x * dt.x + dt.y * dt.y + dt.z * dt.z;

            return(err);
        }