Пример #1
0
 public TexturedVertex(Vertex other)
 {
     this.Position = other.Position;
     this.Color = other.Color;
     this.Normal = other.Normal;
     this.Texcoord = Vector2.Zero;
 }
Пример #2
0
        public static Vertex[] CompileVerticies(RawModel model)
        {
            var combinedVertex = new Vertex[model.TotalVerticies];

            int vCount = 0;
            foreach (var part in model.parts)
            {
                for (int i = 0; i < part.verticies.Length; ++i)
                    combinedVertex[i + vCount] = part.GetVertex(i);
                vCount += part.VertexCount;
            }

            return combinedVertex;
        }
Пример #3
0
 public Vertex(Vertex other)
 {
     this.Position = other.Position;
     this.Color = other.Color;
     this.Normal = other.Normal;
 }
Пример #4
0
 public static Vertex[] GetVerticies(Mesh mesh, int startIndex, int Length)
 {
     var r = new Vertex[Length];
     for (int i = 0; i < Length; ++i) r[i] = mesh.verticies[i + startIndex];
     return r;
 }