Beispiel #1
0
 public void Rotate(HeadsUtils.CPoint3D BasePoint, double RotationAngle)
 {
     this.vdobj.Rotation = RotationAngle;
 }
Beispiel #2
0
 public void Rotate3D(HeadsUtils.CPoint3D Point1, HeadsUtils.CPoint3D Point2, double RotationAngle)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Beispiel #3
0
 public void set_Coordinate(int Index, HeadsUtils.CPoint3D pVal)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Beispiel #4
0
 public void Move(HeadsUtils.CPoint3D FromPoint, HeadsUtils.CPoint3D ToPoint)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Beispiel #5
0
        public static double GetAngle(CPoint3D pt1, CPoint3D pt2, bool BearingFlg /*= FALSE*/) //Optional
        {
            double th;
            double temp;
            double B2 = 0;
            double x1 = pt1.X, y1 = pt1.Y;
            double x2 = pt2.X, y2 = pt2.Y;

            if (y1 == y2 && x2 > x1)
            {
                if (BearingFlg)
                {
                    B2 = 90;
                }
                else
                {
                    B2 = 0;
                }
            }
            else if (y1 == y2 && x2 < x1)
            {
                if (BearingFlg)
                {
                    B2 = 270;
                }
                else
                {
                    B2 = 180;
                }
            }
            else if (x1 == x2 && y2 > y1)
            {
                if (BearingFlg)
                {
                    B2 = 0;
                }
                else
                {
                    B2 = 90;
                }
            }
            else if (x1 == x2 && y2 < y1)
            {
                if (BearingFlg)
                {
                    B2 = 180;
                }
                else
                {
                    B2 = 270;
                }
            }
            else
            {
                temp = (y2 - y1) / (x2 - x1);
                th   = Math.Atan(temp);
                th   = Math.Abs((th * 180) / Math.PI);

                if (BearingFlg)
                {
                    if (x2 > x1 && y2 > y1)
                    {
                        B2 = 90 - th;
                    }
                    else if (x2 > x1 && y2 < y1)
                    {
                        B2 = 90 + th;
                    }
                    else if (x2 < x1 && y2 < y1)
                    {
                        B2 = 270 - th;
                    }
                    else if (x2 < x1 && y2 > y1)
                    {
                        B2 = 270 + th;
                    }
                }
                else
                {
                    if (x2 > x1 && y2 > y1)
                    {
                        B2 = th;
                    }
                    else if (x2 > x1 && y2 < y1)
                    {
                        B2 = 360 - th;
                    }
                    else if (x2 < x1 && y2 < y1)
                    {
                        B2 = 180 + th;
                    }
                    else if (x2 < x1 && y2 > y1)
                    {
                        B2 = 180 - th;
                    }
                }
            }


            if (BearingFlg)
            {
                if (B2 < 0)
                {
                    B2 = B2 + 360;
                }
                else if (B2 > 360)
                {
                    B2 = B2 - 360;
                }
            }

            return(B2);
        }
Beispiel #6
0
 public void AppendVertex(HeadsUtils.CPoint3D vertex)
 {
     VectorDraw.Geometry.Vertex ver = new VectorDraw.Geometry.Vertex(GeneraHelper.GetVDPoint(vertex));
     this.vdobj.AppendVertex(ver);
 }
Beispiel #7
0
 public void CopyTo(CPoint3D obj)
 {
     obj.m_dx = m_dx;
     obj.m_dy = m_dy;
     obj.m_dz = m_dz;
 }
Beispiel #8
0
 public CPoint3D(CPoint3D pt)
 {
     m_dx = pt.m_dx;
     m_dy = pt.m_dy;
     m_dz = pt.m_dz;
 }
Beispiel #9
0
 public CBox(CPoint3D ptTopLeft, CPoint3D ptBottomRight)
 {
     this.TopLeft     = ptTopLeft;
     this.BottomRight = ptBottomRight;
 }