Пример #1
0
 /// <summary>
 /// Reads dualquat vertices into a format-independent list.
 /// </summary>
 /// <param name="reader">The vertex reader to read from.</param>
 /// <param name="count">The number of vertices to read.</param>
 /// <returns>The vertices that were read.</returns>
 private static List<ObjVertex> ReadDualQuatVertices(VertexStream reader, int count)
 {
     var result = new List<ObjVertex>();
     for (var i = 0; i < count; i++)
     {
         var dualQuat = reader.ReadDualQuatVertex();
         result.Add(new ObjVertex
         {
             Position = dualQuat.Position,
             Normal = dualQuat.Normal,
             TexCoords = dualQuat.Texcoord,
         });
     }
     return result;
 }
Пример #2
0
 /// <summary>
 /// Reads skinned vertices into a format-independent list.
 /// </summary>
 /// <param name="reader">The vertex reader to read from.</param>
 /// <param name="count">The number of vertices to read.</param>
 /// <returns>The vertices that were read.</returns>
 private static List<ObjVertex> ReadSkinnedVertices(VertexStream reader, int count)
 {
     var result = new List<ObjVertex>();
     for (var i = 0; i < count; i++)
     {
         var skinned = reader.ReadSkinnedVertex();
         result.Add(new ObjVertex
         {
             Position = skinned.Position,
             Normal = skinned.Normal,
             TexCoords = skinned.Texcoord,
         });
     }
     return result;
 }