public Image(string texsym, Texture texture, string path) : base(ns + "image", texsym + "_img") { this.Texture = texture; this.TextureSymbol = texsym; this.Add( new XAttribute("depth", "1"), new XElement(ns + "init_from", Path.Combine(path, texture.Filename).Replace('\\', '/')) ); }
public TextureCoordinate(Texture texture, double U, double V) { this.Texture = texture; this.U = U; this.V = V; }
protected Material GetOrCreateMaterial(Texture texture) { if (Materials.ContainsKey(texture.Name)) { return Materials[texture.Name]; } else { Material material = new Material(new Effect(new Image(CreateSymbol("texture"), texture, basepath))); Materials[texture.Name] = material; return material; } }