Example #1
0
 void OnTrackerDrag(object sender, NodeTrackerEventArgs e)
 {
     if (iHit > 0)
     {
         Line.Set(iHit, new Point3D(e.DeltaX, e.DeltaY, e.DeltaZ));
         Update();
     }
 }
Example #2
0
 void OnTrackerDown(object sender, NodeTrackerEventArgs e)
 {
     Point3D pnt = new Point3D(e.DeltaX, e.DeltaY, e.DeltaZ);
     for (iHit = 0; iHit < Line.Count; ++iHit)
     {
         if (pnt.DistanceTo(Line[iHit]) < radius)
         {
             break;
         }
     }
     if( Line.Count == 0 || iHit == Line.Count)
     {
         Line.Add(new Point3D(e.DeltaX, e.DeltaY, e.DeltaZ));
     }
     Update();
 }
 void view_TrackerDown(object sender, NodeTrackerEventArgs e)
 {
     Point3dAttribute p = null;
     Point3D pt = new Point3D(e.DeltaX, e.DeltaY, e.DeltaZ);
     m_hit = null;
     foreach (IAttribute atr in Node.Attributes)
     {
         if (atr is Point3dAttribute)
         {
             p = atr as Point3dAttribute;
             if (p.DistanceTo(pt) < radius)
                 m_hit = p;
         }
     }
     if (m_hit == null)
     {
         m_hit = new Point3dAttribute(Node, e.DeltaX, e.DeltaY, e.DeltaZ);
         Node.Add(m_hit);
     }
     Node.Update();
 }
Example #4
0
 public override void OnDrag(object sender, NodeTrackerEventArgs e)
 {
     base.OnDrag(sender, e);
        if (Parent.Type.Contains("Sail"))
             Parent.OnDrag(sender, e);
        if (e.DeltaX + e.DeltaY + e.DeltaZ != 0)
             TransformBy(new Translation(e.DeltaX, e.DeltaY, e.DeltaZ));
        else
             Update();
 }
 void view_TrackerDetach(object sender, NodeTrackerEventArgs e)
 {
     Line.Add(Line[0]);//close the polygon
     Node.Update();
 }
 void view_TrackerUp(object sender, NodeTrackerEventArgs e)
 {
     if (iHit > 0)
     {
         Line.Set(iHit, new Point3D(e.DeltaX, e.DeltaY, e.DeltaZ));
         Node.Update();
     }
     iHit = -1;
 }
Example #7
0
 public override void OnDrag(object sender, NodeTrackerEventArgs e)
 {
     //List<Point3D> pts = new List<Point3D>(Attributes.Count);
        //foreach (IAttribute atr in Attributes)
        //{
        //    if (atr is Point3Attribute)
        //    {
        //        double[] pnt = (atr.Value as double[]);
        //        pnt[0] += e.DeltaX;
        //        pnt[1] += e.DeltaY;
        //        pnt[2] += e.DeltaZ;
        //    }
        //}
        if (e.DeltaX + e.DeltaY + e.DeltaZ != 0)
             TransformBy(new devDept.Eyeshot.Geometry.Translation(e.DeltaX, e.DeltaY, e.DeltaZ));
 }
 void view_TrackerUp(object sender, NodeTrackerEventArgs e)
 {
     if (m_hit != null)
     {
         m_hit.Value = new Point3D(e.DeltaX, e.DeltaY, e.DeltaZ);
         Node.Update();
     }
     m_hit = null;
 }
 void view_TrackerDetach(object sender, NodeTrackerEventArgs e)
 {
     Node.Update();
 }