浏览代码

made integration samples public

/main
Mohsen Kamalzadeh 4 年前
当前提交
3ee0dd99
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 11
      com.unity.perception/Runtime/Randomization/Samplers/SamplerTypes/AnimationCurveSampler.cs

11
com.unity.perception/Runtime/Randomization/Samplers/SamplerTypes/AnimationCurveSampler.cs


[Tooltip("Probability distribution curve used for this sampler. The X axis corresponds to the values this sampler will pick from, and the Y axis corresponds to the relative probability of the values. The relative probabilities (Y axis) do not need to max out at 1 as only the shape of the curve matters. The Y values cannot however be negative.")]
public AnimationCurve distributionCurve;
/// <summary>
/// Number of samples used for integrating over the provided AnimationCurve. The larger the number of samples, the more accurate the resulting probability distribution will be.
/// </summary>
[Tooltip("Number of internal samples used for integrating over the provided AnimationCurve. The larger the number of samples, the more accurately the resulting probability distribution will follow the provided AnimationCurve. Increase this if the default value proves insufficient.")]
public int numOfSamplesForIntegration = 1000;
int m_NumOfSamples = 100;
/// <summary>
/// Constructs an Animation Curve Sampler

if (m_IntegratedCurve == null)
{
m_IntegratedCurve = new float[m_NumOfSamples];
m_IntegratedCurve = new float[numOfSamplesForIntegration];
m_Interval = (m_EndTime - m_StartTime) / (m_NumOfSamples - 1);
m_Interval = (m_EndTime - m_StartTime) / (numOfSamplesForIntegration - 1);
}
}
}
正在加载...
取消
保存