private LabelEntryMatchCache(LabelEntryMatchCache labelEntryMatchCache, Allocator allocator)
 {
     m_IdLabelConfig = labelEntryMatchCache.m_IdLabelConfig;
     m_InstanceIdToLabelEntryIndexLookup = new NativeList <ushort>(labelEntryMatchCache.m_InstanceIdToLabelEntryIndexLookup.Length, allocator);
     m_InstanceIdToLabelEntryIndexLookup.AddRange(labelEntryMatchCache.m_InstanceIdToLabelEntryIndexLookup.AsArray());
     m_ReceiveUpdates = false;
 }
Пример #2
0
        /// <summary>
        /// Creates a new ObjectCountLabeler with the given <see cref="IdLabelConfig"/>.
        /// </summary>
        /// <param name="labelConfig">The label config for resolving the label for each object.</param>
        public ObjectCountLabeler(IdLabelConfig labelConfig)
        {
            if (labelConfig == null)
            {
                throw new ArgumentNullException(nameof(labelConfig));
            }

            m_LabelConfig = labelConfig;
        }
 internal LabelEntryMatchCache(IdLabelConfig idLabelConfig, Allocator allocator = Allocator.Persistent, bool receiveUpdates = true)
 {
     m_IdLabelConfig = idLabelConfig;
     m_InstanceIdToLabelEntryIndexLookup = new NativeList <ushort>(k_StartingObjectCount, allocator);
     m_ReceiveUpdates = receiveUpdates;
     if (receiveUpdates)
     {
         LabelManager.singleton.Activate(this);
     }
 }
Пример #4
0
 public LabelEntryMatchCache(IdLabelConfig idLabelConfig)
 {
     m_IdLabelConfig = idLabelConfig;
     m_InstanceIdToLabelEntryIndexLookup = new NativeList <ushort>(k_StartingObjectCount, Allocator.Persistent);
     World.DefaultGameObjectInjectionWorld.GetOrCreateSystem <GroundTruthLabelSetupSystem>().Activate(this);
 }
 /// <summary>
 /// Creates a new BoundingBox2DLabeler with the given <see cref="IdLabelConfig"/>.
 /// </summary>
 /// <param name="labelConfig">The label config for resolving the label for each object.</param>
 public BoundingBox2DLabeler(IdLabelConfig labelConfig)
 {
     this.idLabelConfig = labelConfig;
 }
 /// <summary>
 /// Creates a new RenderedObjectInfoLabeler with an <see cref="IdLabelConfig"/>.
 /// </summary>
 /// <param name="idLabelConfig">The <see cref="IdLabelConfig"/> which associates objects with labels. </param>
 public RenderedObjectInfoLabeler(IdLabelConfig idLabelConfig)
 {
     this.idLabelConfig = idLabelConfig;
 }