浏览代码

updated xml docs

/main
Steven Leal 4 年前
当前提交
dbf33623
共有 5 个文件被更改,包括 54 次插入7 次删除
  1. 4
      com.unity.perception/Editor/Randomization/Editors/RunInUSimWindow.cs
  2. 11
      com.unity.perception/Runtime/Randomization/Randomizers/SampleRandomizers/Randomizers/SunAngleRandomizer.cs
  3. 3
      com.unity.perception/Runtime/Randomization/Scenarios/Scenario.cs
  4. 5
      com.unity.perception/Runtime/Randomization/Scenarios/ScenarioBase.cs
  5. 38
      com.unity.perception/Runtime/Randomization/Scenarios/USimScenario.cs

4
com.unity.perception/Editor/Randomization/Editors/RunInUSimWindow.cs


namespace UnityEngine.Perception.Randomization.Editor
{
public class RunInUSimWindow : EditorWindow
class RunInUSimWindow : EditorWindow
{
string m_BuildZipPath;
SysParamDefinition m_SysParam;

Button m_RunButton;
[MenuItem("Window/Run in USim")]
public static void ShowWindow()
static void ShowWindow()
{
var window = GetWindow<RunInUSimWindow>();
window.titleContent = new GUIContent("Run In Unity Simulation");

11
com.unity.perception/Runtime/Randomization/Randomizers/SampleRandomizers/Randomizers/SunAngleRandomizer.cs


[AddRandomizerMenu("Perception/Sun Angle Randomizer")]
public class SunAngleRandomizer : Randomizer
{
/// <summary>
/// The hour of the day (0 to 24)
/// </summary>
/// <summary>
/// The time of the year (0 being Jan 1st and 1 being December 31st)
/// </summary>
/// <summary>
/// The earth's latitude (-90 is the south pole, 0 is the equator, and +90 is the north pole)
/// </summary>
public FloatParameter latitude = new FloatParameter { value = new UniformSampler(-90, 90)};
/// <summary>

3
com.unity.perception/Runtime/Randomization/Scenarios/Scenario.cs


/// </summary>
public T constants = new T();
/// <summary>
/// Returns this scenario's non-typed serialized constants
/// </summary>
public override object genericConstants => constants;
/// <summary>

5
com.unity.perception/Runtime/Randomization/Scenarios/ScenarioBase.cs


public string serializedConstantsFilePath =>
Application.dataPath + "/StreamingAssets/" + serializedConstantsFileName + ".json";
/// <summary>
/// Returns this scenario's non-typed serialized constants
/// </summary>
public abstract object genericConstants { get; }
/// <summary>

public abstract bool isScenarioComplete { get; }
/// <summary>
/// Progresses the current scenario iteration.
/// Progresses the current scenario iteration
/// </summary>
protected virtual void IncrementIteration()
{

38
com.unity.perception/Runtime/Randomization/Scenarios/USimScenario.cs


namespace UnityEngine.Experimental.Perception.Randomization.Scenarios
{
/// <summary>
/// Defines a scenario that is compatible with the Run in USim window
/// </summary>
/// <typeparam name="T">The type of constants to serialize</typeparam>
public override bool isScenarioComplete => currentIteration >= constants.totalIterations;
/// <summary>
/// Returns whether the entire scenario has completed
/// </summary>
public sealed override bool isScenarioComplete => currentIteration >= constants.totalIterations;
protected override void OnAwake()
/// <summary>
/// OnAwake is executed directly after this scenario has been registered and initialized
/// </summary>
protected sealed override void OnAwake()
protected override void IncrementIteration()
/// <summary>
/// Progresses the current scenario iteration
/// </summary>
protected sealed override void IncrementIteration()
public override void Deserialize()
/// <summary>
/// Deserializes this scenario's constants from the USim AppParams Json file
/// </summary>
public sealed override void Deserialize()
{
if (string.IsNullOrEmpty(Unity.Simulation.Configuration.Instance.SimulationConfig.app_param_uri))
base.Deserialize();

}
/// <summary>
/// A class encapsulating the scenario constants fields required for USim cloud execution
/// </summary>
/// <summary>
/// The total number of iterations to run a scenario for
/// </summary>
/// <summary>
/// The number of USim instances assigned to executed this scenario
/// </summary>
/// <summary>
/// The USim instance index of the currently executing worker
/// </summary>
public int instanceIndex;
}
}
正在加载...
取消
保存