Example #1
0
 public static void Color <TVert, V> (this TVert[] vertices, IVertexColor <V> color)
     where TVert : struct, IVertexColor <V>
     where V : struct, IVec <V, float>
 {
     for (int i = 0; i < vertices.Length; i++)
     {
         vertices[i].diffuse   = color.diffuse;
         vertices[i].specular  = color.specular;
         vertices[i].shininess = color.shininess;
     }
 }
Example #2
0
        public static Geometry <TVert> Color <TVert, V> (this Geometry <TVert> geometry, IVertexColor <V> color)
            where TVert : struct, IVertex3D, IVertexColor <V>
            where V : struct, IVec <V, float>
        {
            var result = new Wrapper <TVert> (geometry);

            Color(result.Vertices, color);
            return(result);
        }