Ejemplo n.º 1
0
 /// <summary>
 /// Determines whether this model has the specified texture type.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <returns>
 ///   <c>true</c> if the specified type has texture; otherwise, <c>false</c>.
 /// </returns>
 public bool HasTexture(TextureType type)
 {
     if (type == TextureType.ENVIRONMENT)
     {
         return(textureInformation.getCubeTexture(TextureType.ENVIRONMENT) != null);
     }
     if (type == TextureType.DIFFUSE)
     {
         return(textureInformation.getTexture(TextureType.DIFFUSE) != null);
     }
     else if (type == TextureType.BUMP)
     {
         return(textureInformation.getTexture(TextureType.BUMP) != null);
     }
     else if (type == TextureType.SPECULAR)
     {
         return(textureInformation.getTexture(TextureType.SPECULAR) != null);
     }
     else if (type == TextureType.GLOW)
     {
         return(textureInformation.getTexture(TextureType.GLOW) != null);
     }
     else if (type == TextureType.PARALAX)
     {
         return(textureInformation.getTexture(TextureType.PARALAX) != null);
     }
     return(false);
 }
 void Modelo_OnTextureChange(TextureType type, TextureInformation model)
 {
     this.aniTex = model.getTexture(TextureType.DIFFUSE);
     totalwidth  = aniTex.Width;
     this.width  = aniTex.Width / numberOfFrames;
     this.height = aniTex.Height;
     size        = width / totalwidth;
 }