コード例 #1
0
        public virtual IDrawObject Clone()
        {
            Circle3Point a = new Circle3Point();

            a.Copy(this);
            return(a);
        }
コード例 #2
0
        public NodePointCircleCenter(Circle3Point owner)
        {
            m_owner = owner;
            m_clone = m_owner.Clone() as Circle3Point;
            //Console.WriteLine("!!" + m_clone.P1.X + " " + m_clone.P1.Y);

            m_originalPoint = m_owner.Center;
            //Console.WriteLine("!!" + m_clone.P1.X + " " + m_clone.P1.Y);
        }
コード例 #3
0
 public void Copy(Circle3Point acopy)
 {
     base.Copy(acopy);
     m_p1       = acopy.m_p1;
     m_p2       = acopy.m_p2;
     m_p3       = acopy.m_p3;
     m_center   = acopy.m_center;
     m_radius   = acopy.m_radius;
     m_curPoint = acopy.m_curPoint;
 }
コード例 #4
0
 public NodePointCircleRadius(Circle3Point owner)
 {
     m_owner = owner;
     m_clone = m_owner.Clone() as Circle3Point;
     m_clone.CurrentPoint = m_owner.CurrentPoint;
     m_originalValue      = m_owner.Radius;
     Angle1 = (float)HitUtil.RadiansToDegrees(HitUtil.LineAngleR(m_owner.Center, m_owner.P1, 0));
     Angle2 = (float)HitUtil.RadiansToDegrees(HitUtil.LineAngleR(m_owner.Center, m_owner.P2, 0));
     Angle3 = (float)HitUtil.RadiansToDegrees(HitUtil.LineAngleR(m_owner.Center, m_owner.P3, 0));
 }
コード例 #5
0
        public virtual void Finish()
        {
            //float Angle1 = (float)HitUtil.RadiansToDegrees(HitUtil.LineAngleR(m_owner.Center,m_owner.P1, 0));
            //float Angle2 = (float)HitUtil.RadiansToDegrees(HitUtil.LineAngleR(m_owner.Center, m_owner.P2, 0));
            //float Angle3 = (float)HitUtil.RadiansToDegrees(HitUtil.LineAngleR(m_owner.Center, m_owner.P3, 0));
            //Console.WriteLine(Angle1);
            m_owner.P1 = HitUtil.PointOncircle(m_clone.Center, m_clone.Radius, HitUtil.DegressToRadians(Angle1));
            m_owner.P2 = HitUtil.PointOncircle(m_clone.Center, m_clone.Radius, HitUtil.DegressToRadians(Angle2));
            m_owner.P3 = HitUtil.PointOncircle(m_clone.Center, m_clone.Radius, HitUtil.DegressToRadians(Angle3));

            m_endValue       = m_clone.Radius;
            m_owner.Radius   = m_clone.Radius;
            m_owner.Selected = true;
            m_clone          = null;
        }
コード例 #6
0
        public virtual void Finish()
        {
            UnitPoint offset = new UnitPoint(m_clone.Center.X - m_owner.Center.X, m_clone.Center.Y - m_owner.Center.Y);

            m_endPoint     = m_clone.Center;
            m_owner.Center = m_clone.Center;
            m_owner.Radius = m_clone.Radius;

            m_owner.P1 += offset;
            m_owner.P2 += offset;
            m_owner.P3 += offset;


            m_owner.Selected = true;
            m_clone          = null;
        }