Esempio n. 1
0
        /// <summary>Convert to a string representation.</summary>
        /// <returns></returns>
        public override string ToString()
        {
            string text = string.Format("{0}(Material '{1}'", GetType().Name, Path.GetFileNameWithoutExtension(Material.Parameters[0].Value));

            text += ", BoneCount " + Bones.Count;
            text += ", VertexCount " + VertexCount + ", VertexSize " + VertexSize;
            text += Unknowns.ToCommaPrefixedList();
            return(text + ")");
        }
Esempio n. 2
0
        /*public void SaveTextures(string path) {
         *      SaveTexture(path, ModelMaterial.DiffuseMap);
         *      SaveTexture(path, ModelMaterial.NormalMap);
         *      SaveTexture(path, ModelMaterial.SpecularMap);
         * }
         *
         * void SaveTexture(string path, IResourceSource<Texture2D> source) {
         *      Texture2D texture;
         *
         *      if (source == null || (texture = source.GetResourceValue()) == null)
         *              return;
         *      string texturePath = TexturePath(source, path);
         *      if(File.Exists(texturePath))
         *              return;
         *      using (Stream stream = File.Open(texturePath, FileMode.Create, FileAccess.Write, FileShare.ReadWrite))
         *      using (BinaryWriter writer = new BinaryWriter(stream))
         *              Parent.Manager.GetFormat<DdsFormat>().Save(texture, writer);
         * }
         *
         * static string TexturePath(IResourceSource<Texture2D> source, string path) {
         *      return Path.Combine(path, TexturePath(source));
         * }
         *
         * static string TexturePath(IResourceSource<Texture2D> source) {
         *      Texture2D texture;
         *
         *      if (source == null || (texture = source.GetResourceValue()) == null)
         *              return null;
         *      return Path.GetFileNameWithoutExtension(texture.Name) + ".dds";
         * }*/

        /// <summary>Create a string representation of the object.</summary>
        /// <returns></returns>
        public override string ToString()
        {
            return(string.Format("{0}('{1}', '{2}'{3})", GetType().Name, Name, ShaderName, Unknowns.ToCommaPrefixedList()));
        }
Esempio n. 3
0
 /// <summary>
 /// Convert to a string representation of the object.
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(string.Format("{0}({1})", GetType().Name, Unknowns.ToCommaPrefixedList()));
 }
Esempio n. 4
0
 /// <summary>
 /// Get a string representation of the object.
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(string.Format("{0}(Offset {1}, Type {2}, Usage {3}{4}{5})", GetType().Name, Offset, Format, Usage, UsageIndex > 0 ? "+" + UsageIndex : "", Unknowns.ToCommaPrefixedList()));
 }
Esempio n. 5
0
 /// <summary>Create a string representation of the object.</summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(string.Format("{0}(id {1:X}, IndexCount {2})", GetType().Name, Threshold, IndexCount, Unknowns.ToCommaPrefixedList()));
 }
 /// <summary>
 /// Get a string representation of the object.
 /// </summary>
 /// <returns></returns>
 public override string ToString()
 {
     return(string.Format("{0}(AttributeCount {1}{2})", GetType().Name, Attributes.Count, Unknowns.ToCommaPrefixedList()));
 }