Exemplo n.º 1
0
        /// <summary>
        /// Read UV data from buffer data, datapos, and numuvs.
        /// </summary>
        /// <param name="data">vertex buffer data</param>
        /// <param name="i">current position to read from</param>
        /// <param name="uvpos">numuvs</param>
        public void ReadUvData(byte[] data, int i, int uvpos)
        {
            Half x = Half.ToHalf(data, i);
            Half y = Half.ToHalf(data, i + 2);

            y          = -y;
            uvs[uvpos] = new UVVector2(x, y);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Construct empty vertex.
        /// </summary>
        public Vertex()
        {
            position = new Vector3(0);
            normal   = new Vector3(0);
            tangent  = new Vector3(0);
            uvs      = new UVVector2[4];

            for (int i = 0; i != uvs.Length; i++)
            {
                uvs[i] = new UVVector2();
            }
        }