Beispiel #1
0
        // Vertex Source Interface to feed the coordinates to the rasterizer
        protected void LoadArrangedVertices(out CoordAndColor c0, out CoordAndColor c1, out CoordAndColor c2)
        {
            c0 = m_coord_0;
            c1 = m_coord_1;
            c2 = m_coord_2;

            if (m_coord_0.y > m_coord_2.y)
            {
                c0 = m_coord_2;
                c2 = m_coord_0;
            }

            CoordAndColor tmp;

            if (c0.y > c1.y)
            {
                tmp = c1;
                c1  = c0;
                c0  = tmp;
            }

            if (c1.y > c2.y)
            {
                tmp = c2;
                c2  = c1;
                c1  = tmp;
            }
        }
Beispiel #2
0
        // Vertex Source Interface to feed the coordinates to the rasterizer
        public void GetArrangedVertices(out CoordAndColor c0, out CoordAndColor c1, out CoordAndColor c2)
        {
            c0 = _coord_0;
            c1 = _coord_1;
            c2 = _coord_2;
            if (_coord_0.y > _coord_2.y)
            {
                c0 = _coord_2;
                c2 = _coord_0;
            }

            CoordAndColor tmp;

            if (c0.y > c1.y)
            {
                tmp = c1;
                c1  = c0;
                c0  = tmp;
            }

            if (c1.y > c2.y)
            {
                tmp = c2;
                c2  = c1;
                c1  = tmp;
            }
        }
        // Vertex Source Interface to feed the coordinates to the rasterizer 
        protected void LoadArrangedVertices(out CoordAndColor c0, out CoordAndColor c1, out CoordAndColor c2)
        {
            c0 = m_coord_0;
            c1 = m_coord_1;
            c2 = m_coord_2;
            if (m_coord_0.y > m_coord_2.y)
            {
                c0 = m_coord_2;
                c2 = m_coord_0;
            }

            CoordAndColor tmp;
            if (c0.y > c1.y)
            {
                tmp = c1;
                c1 = c0;
                c0 = tmp;
            }

            if (c1.y > c2.y)
            {
                tmp = c2;
                c2 = c1;
                c1 = tmp;
            }
        }