Beispiel #1
0
        public static void Serialize_vci_lightmap_texture(JsonFormatter f, glTFLightmapTextureInfo value)
        {
            f.BeginMap();


            if (value.index >= 0)
            {
                f.Key("index");
                f.Value(value.index);
            }

            if (value.texCoord >= 0)
            {
                f.Key("texCoord");
                f.Value(value.texCoord);
            }

            if (value.extensions != null)
            {
                f.Key("extensions");
                value.extensions.Serialize(f);
            }

            if (value.extras != null)
            {
                f.Key("extras");
                value.extras.Serialize(f);
            }

            f.EndMap();
        }
Beispiel #2
0
        public static glTFLightmapTextureInfo glTF_VCAST_vci_lightmap_Deserializevci_lightmap_texture(JsonNode parsed)
        {
            var value = new glTFLightmapTextureInfo();

            foreach (var kv in parsed.ObjectItems())
            {
                var key = kv.Key.GetString();

                if (key == "index")
                {
                    value.index = kv.Value.GetInt32();
                    continue;
                }

                if (key == "texCoord")
                {
                    value.texCoord = kv.Value.GetInt32();
                    continue;
                }

                if (key == "extensions")
                {
                    value.extensions = new glTFExtensionImport(kv.Value);
                    continue;
                }

                if (key == "extras")
                {
                    value.extras = new glTFExtensionImport(kv.Value);
                    continue;
                }
            }
            return(value);
        }
Beispiel #3
0
        public static glTFLightmapTextureInfo[] glTF_VCAST_vci_location_lighting_Deserializevci_locationLighting_lightmapTextures(JsonNode parsed)
        {
            var value = new glTFLightmapTextureInfo[parsed.GetArrayCount()];
            int i     = 0;

            foreach (var x in parsed.ArrayItems())
            {
                value[i++] = glTF_VCAST_vci_location_lighting_Deserializevci_locationLighting_lightmapTextures_ITEM(x);
            }
            return(value);
        }