浏览代码

renamed LabeledObjectManager to LabelManager

/main
sleal-unity 4 年前
当前提交
fb8acf68
共有 10 个文件被更改,包括 15 次插入15 次删除
  1. 4
      com.unity.perception/Runtime/GroundTruth/IGroundTruthGenerator.cs
  2. 2
      com.unity.perception/Runtime/GroundTruth/Labelers/BoundingBox3DLabeler.cs
  3. 2
      com.unity.perception/Runtime/GroundTruth/Labelers/KeypointLabeler.cs
  4. 4
      com.unity.perception/Runtime/GroundTruth/Labeling/LabelEntryMatchCache.cs
  5. 8
      com.unity.perception/Runtime/GroundTruth/Labeling/Labeling.cs
  6. 2
      com.unity.perception/Runtime/GroundTruth/PerceptionUpdater.cs
  7. 4
      com.unity.perception/Runtime/GroundTruth/RenderPasses/CrossPipelinePasses/GroundTruthCrossPipelinePass.cs
  8. 4
      com.unity.perception/Runtime/GroundTruth/Labeling/LabelManager.cs
  9. 0
      /com.unity.perception/Runtime/GroundTruth/Labeling/LabelManager.cs
  10. 0
      /com.unity.perception/Runtime/GroundTruth/Labeling/LabelManager.cs.meta

4
com.unity.perception/Runtime/GroundTruth/IGroundTruthGenerator.cs


namespace UnityEngine.Perception.GroundTruth
{
/// <summary>
/// Interface for setting up Renderers for ground truth generation via <see cref="LabeledObjectsManager"/>.
/// Interface for setting up Renderers for ground truth generation via <see cref="LabelManager"/>.
/// Called by <see cref="LabeledObjectsManager"/> when first registered or when a Labeling is created at runtime.
/// Called by <see cref="LabelManager"/> when first registered or when a Labeling is created at runtime.
/// </summary>
/// <param name="mpb">The MaterialPropertyBlock for the given meshRenderer. Can be used to set properties for custom rendering.</param>
/// <param name="renderer">The Renderer under the given Labeling.</param>

2
com.unity.perception/Runtime/GroundTruth/Labelers/BoundingBox3DLabeler.cs


m_AsyncAnnotations[m_CurrentFrame] = perceptionCamera.SensorHandle.ReportAnnotationAsync(m_AnnotationDefinition);
foreach (var label in LabeledObjectsManager.singleton.registeredLabels)
foreach (var label in LabelManager.singleton.registeredLabels)
ProcessLabel(label);
}

2
com.unity.perception/Runtime/GroundTruth/Labelers/KeypointLabeler.cs


m_AsyncAnnotations[m_CurrentFrame] = (annotation, keypoints);
foreach (var label in LabeledObjectsManager.singleton.registeredLabels)
foreach (var label in LabelManager.singleton.registeredLabels)
ProcessLabel(label);
}

4
com.unity.perception/Runtime/GroundTruth/Labeling/LabelEntryMatchCache.cs


{
m_IdLabelConfig = idLabelConfig;
m_InstanceIdToLabelEntryIndexLookup = new NativeList<ushort>(k_StartingObjectCount, Allocator.Persistent);
LabeledObjectsManager.singleton.Activate(this);
LabelManager.singleton.Activate(this);
}
public bool TryGetLabelEntryFromInstanceId(uint instanceId, out IdLabelEntry labelEntry, out int index)

public void Dispose()
{
LabeledObjectsManager.singleton.Deactivate(this);
LabelManager.singleton.Deactivate(this);
m_InstanceIdToLabelEntryIndexLookup.Dispose();
}
}

8
com.unity.perception/Runtime/GroundTruth/Labeling/Labeling.cs


[AddComponentMenu("Perception/Labeling/Labeling")]
public class Labeling : MonoBehaviour
{
static LabeledObjectsManager labeledObjectManager => LabeledObjectsManager.singleton;
static LabelManager labelManager => LabelManager.singleton;
/// <summary>
/// The label names to associate with the GameObject. Modifications to this list after the Update() step of the frame the object is created in are

void Awake()
{
labeledObjectManager.Register(this);
labelManager.Register(this);
labeledObjectManager.Unregister(this);
labelManager.Unregister(this);
}
void Reset()

/// </summary>
public void RefreshLabeling()
{
labeledObjectManager.RefreshLabeling(this);
labelManager.RefreshLabeling(this);
}
internal void SetInstanceId(uint id)

2
com.unity.perception/Runtime/GroundTruth/PerceptionUpdater.cs


void LateUpdate()
{
LabeledObjectsManager.singleton.RegisterPendingLabels();
LabelManager.singleton.RegisterPendingLabels();
DatasetCapture.SimulationState?.Update();
}
}

4
com.unity.perception/Runtime/GroundTruth/RenderPasses/CrossPipelinePasses/GroundTruthCrossPipelinePass.cs


{
if (!m_IsActivated)
{
LabeledObjectsManager.singleton.Activate(this);
LabelManager.singleton.Activate(this);
m_IsActivated = true;
}
}

LabeledObjectsManager.singleton.Deactivate(this);
LabelManager.singleton.Deactivate(this);
}
protected RendererListDesc CreateRendererListDesc(

4
com.unity.perception/Runtime/GroundTruth/Labeling/LabelManager.cs


/// <summary>
/// Manages the registration of <see cref="Labeling"/> components
/// </summary>
public class LabeledObjectsManager
public class LabelManager
public static LabeledObjectsManager singleton { get; } = new LabeledObjectsManager();
public static LabelManager singleton { get; } = new LabelManager();
const uint k_StartingIndex = 1;
uint m_CurrentObjectIndex = k_StartingIndex;

/com.unity.perception/Runtime/GroundTruth/LabeledObjectsManager.cs → /com.unity.perception/Runtime/GroundTruth/Labeling/LabelManager.cs

/com.unity.perception/Runtime/GroundTruth/LabeledObjectsManager.cs.meta → /com.unity.perception/Runtime/GroundTruth/Labeling/LabelManager.cs.meta

正在加载...
取消
保存