コード例 #1
0
        public H3D()
        {
            Models               = new H3DDict <H3DModel>();
            Materials            = new H3DDict <H3DMaterialParams>();
            Shaders              = new H3DDict <H3DShader>();
            Textures             = new H3DDict <H3DTexture>();
            LUTs                 = new H3DDict <H3DLUT>();
            Lights               = new H3DDict <H3DLight>();
            Cameras              = new H3DDict <H3DCamera>();
            Fogs                 = new H3DDict <H3DFog>();
            SkeletalAnimations   = new H3DDict <H3DAnimation>();
            MaterialAnimations   = new H3DDict <H3DMaterialAnim>();
            VisibilityAnimations = new H3DDict <H3DAnimation>();
            LightAnimations      = new H3DDict <H3DAnimation>();
            CameraAnimations     = new H3DDict <H3DAnimation>();
            FogAnimations        = new H3DDict <H3DAnimation>();
            Scenes               = new H3DDict <H3DScene>();

            BackwardCompatibility = 0x21;
            ForwardCompatibility  = 0x21;

            ConverterVersion = 42607;

            Flags = H3DFlags.IsFromNewConverter;
        }
コード例 #2
0
ファイル: H3D.cs プロジェクト: HelloOO7/SPICA
        private void AddUnique <T>(H3DDict <T> Src, H3DDict <T> Tgt, bool RenameDupes) where T : INamed
        {
            //We need to make sure that the name isn't already contained on the Tree.
            //Otherwise it would throw an exception due to duplicate Keys.
            foreach (T Value in Src)
            {
                string Name = Value.Name;

                if (RenameDupes)
                {
                    int Index = 0;

                    while (Tgt.Contains(Name))
                    {
                        Name = $"{Value.Name}_{++Index}";
                    }
                }
                else
                {
                    if (Tgt.Contains(Name))
                    {
                        Tgt.Remove(Tgt[Tgt.Find(Name)]);
                    }
                }

                Value.Name = Name;

                Tgt.Add(Value);
            }
        }
コード例 #3
0
 public H3DMetaData()
 {
     Values = new H3DDict <H3DMetaDataValue>();
 }