Canguro.Commands.Model.AddJointCmd.Run C# (CSharp) 메소드

Run() 공개 메소드

Executes the command. Adds Joints in selected points until canceled.
public Run ( Canguro services ) : void
services Canguro CommandServices object to interact with the system
리턴 void
        public override void Run(Canguro.Controller.CommandServices services)
        {
            Joint joint;
            Microsoft.DirectX.Vector3 pt;
            Controller.Snap.Magnet m;
            bool showJoints = false;

            while ((joint = services.GetJoint((IList<LineElement>)null)) != null)
            {
                if (!showJoints)
                    Canguro.View.GraphicViewManager.Instance.ActiveView.ModelRenderer.RenderOptions.OptionsShown |= Canguro.View.Renderer.RenderOptions.ShowOptions.ShowJoints;

                showJoints = true;

                //pt = m.SnapPosition;
                //services.Model.JointList.Add(joint = new Joint(pt.X, pt.Y, pt.Z));
                //services.SnapPrimaryPoint = new Canguro.Controller.Snap.PointMagnet(joint);
                //// Para que se refleje el cambio inmediatamente
                services.Model.ChangeModel();
            }
        }