Exemplo n.º 1
0
 public void AddAligner(Aligner a)
 {
     m_AlignerList.Add(a);
 }
Exemplo n.º 2
0
        public void AlignEdge(Indicatrix A, Indicatrix B, Aligner Al)
        {
            Point2D
                APos = null,
                BPos = null;

            for (int i = 0; i < m_Size; i++ )
            {
                for( int j=0; j<m_Size; j++ )
                {
                    if( m_Net[i,j]==A) APos = new Point2D(i,j);
                    if( m_Net[i,j]==B) BPos = new Point2D(i,j);
                }
            }

            for (int i = 0; i < m_Size; i++ )
            {
                for( int j=0; j<m_Size; j++ )
                {
                    if (m_Net[i,j] == null)
                        continue;
                    Point2D indexpos = new Point2D(i,j);

                    if (indexpos == A.Position ||
                        indexpos == B.Position ||
                        Math.Abs(Point2D.Angle(APos, indexpos, BPos) - Math.PI) < 1.0e-3)
                    {
                        m_Net[i,j].Alignment = Al;
                    }
                }
            }
        }
Exemplo n.º 3
0
        public Indicatrix(Point2D pos, double theta, double size)
        {
            m_Position = pos;
            m_Theta = theta;
            m_Size = size;

            Save();

            m_North = m_South = m_East = m_West = null;

            m_Alignment = new Aligner();
        }