void InitFilters()
 {
     _transientEntityFilters  = new SharedSveltoDictionaryNative <long, EntityFilterCollection>(0);
     _persistentEntityFilters = new SharedSveltoDictionaryNative <long, EntityFilterCollection>(0);
     _indicesOfPersistentFiltersUsedByThisComponent =
         new SharedSveltoDictionaryNative <NativeRefWrapperType, NativeDynamicArrayCast <int> >(0);
 }
        public GroupFilters(SharedSveltoDictionaryNative <int, FilterGroup> filters, ExclusiveGroupStruct group)
        {
            this.filters = filters;
#if DEBUG && !PROFILE_SVELTO
            _group = @group;
#endif
        }
Example #3
0
 public EntityFilterCollectionsWithContextEnumerator(NativeDynamicArrayCast <int> getDirectValueByRef,
                                                     SharedSveltoDictionaryNative <long, EntityFilterCollection> sharedSveltoDictionaryNative,
                                                     FilterContextID filterContextId) : this()
 {
     _getDirectValueByRef          = getDirectValueByRef;
     _sharedSveltoDictionaryNative = sharedSveltoDictionaryNative;
     _filterContextId = filterContextId;
 }
Example #4
0
        internal EntityFilterCollection(CombinedFilterID combinedFilterId,
                                        Allocator allocatorStrategy = Allocator.Persistent)
        {
            _filtersPerGroup =
                SharedSveltoDictionaryNative <ExclusiveGroupStruct, GroupFilters> .Create(allocatorStrategy);

            combinedFilterID = combinedFilterId;
        }
        internal FilterGroup(ExclusiveGroupStruct exclusiveGroupStruct)
        {
            _denseListOfIndicesToEntityComponentArray =
                new NativeDynamicArrayCast <uint>(NativeDynamicArray.Alloc <uint>(Allocator.Persistent));
            _reverseEGIDs = new NativeDynamicArrayCast <uint>(NativeDynamicArray.Alloc <uint>(Allocator.Persistent));

            _EIDs = new SharedSveltoDictionaryNative <uint, uint>(0, Allocator.Persistent);
            _exclusiveGroupStruct = exclusiveGroupStruct;
        }
Example #6
0
 public SveltoFilters(SharedSveltoDictionaryNative <long, EntityFilterCollection> persistentEntityFilters,
                      SharedSveltoDictionaryNative <NativeRefWrapperType, NativeDynamicArrayCast <int> >
                      indicesOfPersistentFiltersUsedByThisComponent,
                      SharedSveltoDictionaryNative <long, EntityFilterCollection> transientEntityFilters)
 {
     _persistentEntityFilters = persistentEntityFilters;
     _indicesOfPersistentFiltersUsedByThisComponent = indicesOfPersistentFiltersUsedByThisComponent;
     _transientEntityFilters = transientEntityFilters;
 }
Example #7
0
 internal FilterGroup(ExclusiveGroupStruct exclusiveGroupStruct, int ID)
 {
     _denseListOfIndicesToEntityComponentArray =
         new NativeDynamicArrayCast <uint>(NativeDynamicArray.Alloc <uint>(Allocator.Persistent));
     //from the index, find the entityID
     _reverseEIDs = new NativeDynamicArrayCast <uint>(NativeDynamicArray.Alloc <uint>(Allocator.Persistent));
     //from the entityID, find the index
     _indexOfEntityInDenseList = new SharedSveltoDictionaryNative <uint, uint>(0);
     _exclusiveGroupStruct     = exclusiveGroupStruct;
     _ID = ID;
 }
Example #8
0
 internal GroupFilters(SharedSveltoDictionaryNative <int, FilterGroup> filters, ExclusiveGroupStruct group)
 {
     this.filters = filters;
     _group       = @group;
 }
Example #9
0
 public EntityFilterCollectionsEnumerator(NativeDynamicArrayCast <int> getDirectValueByRef,
                                          SharedSveltoDictionaryNative <long, EntityFilterCollection> sharedSveltoDictionaryNative) : this()
 {
     _getDirectValueByRef          = getDirectValueByRef;
     _sharedSveltoDictionaryNative = sharedSveltoDictionaryNative;
 }
 internal NativeEntityFilterCollection(NativeEGIDMultiMapper <T> mmap)
 {
     _mmap            = mmap;
     _filtersPerGroup = new SharedSveltoDictionaryNative <ExclusiveGroupStruct, GroupFilters>();
 }
 internal GroupFilters(uint size, ExclusiveGroupStruct group)
 {
     _entityIDToDenseIndex = new SharedSveltoDictionaryNative <uint, uint>(size);
     _indexToEntityId      = new SharedSveltoDictionaryNative <uint, uint>(size);
     _group = group;
 }
Example #12
0
 internal GroupFilters(ExclusiveGroupStruct group) : this()
 {
     _entityIDToDenseIndex = new SharedSveltoDictionaryNative <uint, uint>(1);
     _group = group;
 }
Example #13
0
 internal LegacyGroupFilters(SharedSveltoDictionaryNative <int, LegacyFilterGroup> legacyFilters, ExclusiveGroupStruct group)
 {
     this._legacyFilters = legacyFilters;
     _group = @group;
 }
 public UnmanagedTypeSafeDictionary(uint size)
 {
     implUnmgd =
         new SharedSveltoDictionaryNative <uint, TValue>(size, Allocator.Persistent);
 }