Exemplo n.º 1
0
            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;
 }
Exemplo n.º 3
0
 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;
     }
 }