/// <summary>
 /// </summary>
 /// <param name="strName">Name of texture, excluding any prefixes. Ex: myTexture NOT myHandle.myMod.myTexture</param>
 /// <param name="strNAMESPACE">Prefix used to generate ID. Ex: myHandle.myMod</param>
 public TextureGroup(string strName, string strNAMESPACE = null)
 {
     Name      = (strName == null || strName.Length < 1) ? "NewTexture" : strName;
     NAMESPACE = strNAMESPACE == null ? "" : strNAMESPACE;
     Default   = new SpecificTexture(this.Name, this.NAMESPACE);
     Pipliz.Log.Write("{0}: Initialized texturegroup {1}, it is not yet registered.", NAMESPACE == null ? "" : NAMESPACE, this.Name);
 }
        /// <summary>
        /// Automates setting specific textures, preventing accidental reference exceptions.
        /// </summary>
        /// <param name="whenRotated">Orientation of desired texture.</param>
        /// <param name="part">Which part of that texture is being set.</param>
        /// <param name="path">Path to physical texture file.</param>
        public void setRotatedTexture(Rotation whenRotated, TexturePart part, string path)
        {
            switch (whenRotated)
            {
            case Rotation.zero:
                if (this.Default == null)
                {
                    this.Default = new SpecificTexture(this.Name, this.NAMESPACE);
                }
                switch (part)
                {
                case TexturePart.albedo:
                    this.Default.AlbedoPath = path;
                    break;

                case TexturePart.emissive:
                    this.Default.EmissivePath = path;
                    break;

                case TexturePart.height:
                    this.Default.HeightPath = path;
                    break;

                case TexturePart.normal:
                    this.Default.NormalPath = path;
                    break;

                default:
                    break;
                }
                break;

            case Rotation.counter90d:
                if (this.counter90d == null)
                {
                    this.counter90d = new SpecificTexture(this.Name + "z+", this.NAMESPACE);
                }
                switch (part)
                {
                case TexturePart.albedo:
                    this.counter90d.AlbedoPath = path;
                    break;

                case TexturePart.emissive:
                    this.counter90d.EmissivePath = path;
                    break;

                case TexturePart.height:
                    this.counter90d.HeightPath = path;
                    break;

                case TexturePart.normal:
                    this.counter90d.NormalPath = path;
                    break;

                default:
                    break;
                }
                break;

            case Rotation.counter180d:
                if (this.counter180d == null)
                {
                    this.counter180d = new SpecificTexture(this.Name + "x-", this.NAMESPACE);
                }
                switch (part)
                {
                case TexturePart.albedo:
                    this.counter180d.AlbedoPath = path;
                    break;

                case TexturePart.emissive:
                    this.counter180d.EmissivePath = path;
                    break;

                case TexturePart.height:
                    this.counter180d.HeightPath = path;
                    break;

                case TexturePart.normal:
                    this.counter180d.NormalPath = path;
                    break;

                default:
                    break;
                }
                break;

            case Rotation.counter270d:
                if (this.counter270d == null)
                {
                    this.counter270d = new SpecificTexture(this.Name + "z-", this.NAMESPACE);
                }
                switch (part)
                {
                case TexturePart.albedo:
                    this.counter270d.AlbedoPath = path;
                    break;

                case TexturePart.emissive:
                    this.counter270d.EmissivePath = path;
                    break;

                case TexturePart.height:
                    this.counter270d.HeightPath = path;
                    break;

                case TexturePart.normal:
                    this.counter270d.NormalPath = path;
                    break;

                default:
                    break;
                }
                break;
            }
        }