Exemplo n.º 1
0
 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();
 }
Exemplo n.º 2
0
 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;
 }