Esempio n. 1
0
        /// <inheritdoc/>
        public void ConvertToData(SiliconStudio.Core.Serialization.Converters.ConverterContext context, ref SiliconStudio.Paradox.Effects.Cubemap.Data.CubemapSourceComponentData target, SiliconStudio.Paradox.Effects.Cubemap.CubemapSourceComponent source)
        {
            if (target == null)
            {
                target = new SiliconStudio.Paradox.Effects.Cubemap.Data.CubemapSourceComponentData();
            }

            {
                var targetBase = (SiliconStudio.Paradox.EntityModel.Data.EntityComponentData)target;
                var sourceBase = (SiliconStudio.Paradox.EntityModel.EntityComponent)source;
                ConvertToData(context, ref targetBase, sourceBase);
            }

            target.Enabled         = source.Enabled;
            target.IsDynamic       = source.IsDynamic;
            target.Size            = source.Size;
            target.InfinityCubemap = source.InfinityCubemap;
            target.InfluenceRadius = source.InfluenceRadius;
            target.NearPlane       = source.NearPlane;
            target.FarPlane        = source.FarPlane;
            context.ConvertToData(ref target.Texture, source.Texture);
        }
Esempio n. 2
0
 /// <inheritdoc/>
 public void ConvertFromData(SiliconStudio.Core.Serialization.Converters.ConverterContext context, SiliconStudio.Paradox.Effects.Cubemap.Data.CubemapSourceComponentData target, ref SiliconStudio.Paradox.Effects.Cubemap.CubemapSourceComponent source)
 {
     source.Enabled         = target.Enabled;
     source.IsDynamic       = target.IsDynamic;
     source.Size            = target.Size;
     source.InfinityCubemap = target.InfinityCubemap;
     source.InfluenceRadius = target.InfluenceRadius;
     source.NearPlane       = target.NearPlane;
     source.FarPlane        = target.FarPlane;
     {
         var temp = source.Texture;
         context.ConvertFromData(target.Texture, ref temp);
         source.Texture = temp;
     }
 }
Esempio n. 3
0
 /// <inheritdoc/>
 public void ConstructFromData(SiliconStudio.Core.Serialization.Converters.ConverterContext context, SiliconStudio.Paradox.Effects.Cubemap.Data.CubemapSourceComponentData target, ref SiliconStudio.Paradox.Effects.Cubemap.CubemapSourceComponent source)
 {
     source = new SiliconStudio.Paradox.Effects.Cubemap.CubemapSourceComponent();
 }