|
|
|
|
|
|
namespace UnityEngine.Perception.Randomization.Scenarios.Serialization |
|
|
|
{ |
|
|
|
#region Interfaces
|
|
|
|
public interface IGroupItem { } |
|
|
|
interface IGroupItem { } |
|
|
|
public interface IParameterItem { } |
|
|
|
interface IParameterItem { } |
|
|
|
public interface ISamplerOption { } |
|
|
|
interface ISamplerOption { } |
|
|
|
public interface IScalarValue { } |
|
|
|
interface IScalarValue { } |
|
|
|
public class TemplateConfigurationOptions |
|
|
|
class TemplateConfigurationOptions |
|
|
|
public class StandardMetadata |
|
|
|
class StandardMetadata |
|
|
|
public class Group |
|
|
|
class Group |
|
|
|
{ |
|
|
|
public StandardMetadata metadata = new StandardMetadata(); |
|
|
|
[JsonConverter(typeof(GroupItemsConverter))] |
|
|
|
|
|
|
public class Parameter : IGroupItem |
|
|
|
class Parameter : IGroupItem |
|
|
|
{ |
|
|
|
public StandardMetadata metadata = new StandardMetadata(); |
|
|
|
[JsonConverter(typeof(ParameterItemsConverter))] |
|
|
|
|
|
|
|
|
|
|
#region SamplerOptions
|
|
|
|
[JsonConverter(typeof(SamplerOptionsConverter))] |
|
|
|
public class SamplerOptions : IParameterItem |
|
|
|
class SamplerOptions : IParameterItem |
|
|
|
public class UniformSampler : ISamplerOption |
|
|
|
class UniformSampler : ISamplerOption |
|
|
|
public class NormalSampler : ISamplerOption |
|
|
|
class NormalSampler : ISamplerOption |
|
|
|
{ |
|
|
|
public double min; |
|
|
|
public double max; |
|
|
|
|
|
|
|
|
|
|
public class ConstantSampler : ISamplerOption |
|
|
|
class ConstantSampler : ISamplerOption |
|
|
|
{ |
|
|
|
public double value; |
|
|
|
} |
|
|
|
|
|
|
[JsonConverter(typeof(ScalarConverter))] |
|
|
|
public class Scalar : IGroupItem, IParameterItem |
|
|
|
class Scalar : IGroupItem, IParameterItem |
|
|
|
public class StringScalarValue : IScalarValue |
|
|
|
class StringScalarValue : IScalarValue |
|
|
|
public class DoubleScalarValue : IScalarValue |
|
|
|
class DoubleScalarValue : IScalarValue |
|
|
|
public class BooleanScalarValue : IScalarValue |
|
|
|
class BooleanScalarValue : IScalarValue |
|
|
|
{ |
|
|
|
public bool boolean; |
|
|
|
} |