-
Notifications
You must be signed in to change notification settings - Fork 0
Cluster
Namespace: Syadeu.Presentation.Proxy
File: Cluster.cs
[BurstCompile(CompileSynchronously = true)]
[NativeContainer]
internal unsafe struct Cluster<T> : IDisposableTranslation 값을 기준으로 그룹을 정의하는 새로운 방법의 Cluster Data Structure입니다.
Inheritance: System.Object -> Cluster<T>
Implements: IDisposable
- 키 값으로 Translation 를 사용하여 데이터 분산 정렬을 합니다.
- float3(25, 25, 25) 단위로 데이터를 그룹으로 묶어 (Partitioning) 검색시 더 빠르게 검색하도록 개발되었습니다.
unsafe 로 구현되었기에 딜리버리에는 포함하지 않는 구조체입니다. 안전을 위해 내부 시스템에서만 사용합니다. GameObjectProxySystem 을 참조하세요.
Cluster<T> (이하 클러스터)는 외부에서 이미 생성된 배열을 기반으로 해당 배열을 수정하지않고 자체적으로 해당 배열을 인덱스로만 데이터를 정렬하도록 설계되었습니다. 이는 데이터의 중복 메모리 할당을 피하고, 다차원 포인터 배열 구조를 피함으로서 유지보수 및 해석이 간단하도록 설계되었습니다.
Translation 값을 추가하면, 클러스터는 ClusterID 라는 구조체를 반환합니다. 이 구조체는 해당 Translation 값이 위치한, ClusterGroup<T> 인덱스 값과 그룹내 ClusterItem<T> 배열의 인덱스 값을 포함합니다. 이후 사용자는 해당 ID 값을 통해 새로운 Translation 값으로 ID를 업데이트하거나 제거할 수 있습니다.
아래는 클러스터의 구조에 대해 다이어그램으로 설명합니다.

클러스터는 Cluster analysis 중, Partitioning 으로 데이터 배열을 정렬합니다. 해당 값과 가장 그룹의 해시 값이 충돌할 경우, Linear-hashing (선형 해싱) 알고리듬을 사용합니다.
| Name | Description |
|---|---|
| c_ClusterRange | partitioning 할 최소 translation bounds size 입니다. |
| Name | Description |
|---|---|
unsafe [NativeDisableUnsafePtrRestriction] m_Buffer |
|
| m_Length |
| Name | Description |
|---|---|
EditorOnly m_Safety |
|
EditorOnly[NativeSetClassTypeToNullOnSchedule] m_DisposeSentinel |
| Name | Description |
|---|---|
| this[int] | |
| UsedCount | |
| Length |
| Name | Description |
|---|---|
| Dispose() | |
| [WriteAccessRequired] AsParallelWriter() | |
| GetClusterIndex(in float3, out float3) | |
| GetGroups(CameraFrustum, Allocator) | |
| GetGroup(in ClusterID) | |
| [WriteAccessRequired] Update(in ClusterID, in float3) | |
| [WriteAccessRequired] Add(in float3, in int) | |
| [WriteAccessRequired] Remove(in ClusterID) |
- Interfaces
- Enums
- SystemFlag
- CoreSystemExceptionFlag
- UserTagFlag
- CustomTagFlag
- ObValueDetection
- ConsoleFlag
- CommandSetting
- Attributes
- Abstract Classes
- Classes
- CoreSystem
- CoreSystemSettings
- PrefabManager
- PrefabList
- RenderManager
- RenderController
-
ConsoleWindow
- CommandDefinition
- CommandField
- CommandRequires
- FMODSystem
- UserTagNameModule
- CustomTagNameModule
- Timer
- BackgroundJob
- ForegroundJob
- WaitForBackgroundJob
- WaitForBackgroundJobWorker
- WaitForForegroundJob
- WaitForTimer
- BackgroundJobWorker
- ObArray
- ObClass
- ObDictionary
- ObList
- ObQueue
- ObValue
- ExtensionMethods
- ThreadSafe
- Structs
- CoreRoutine
- SQLiteDatabase
- SQLiteTable
- SQLiteColumn
- SQLiteVersionInfoTableData
- Bound
- Pole
- Vector2
- Vector3
- Exceptions
- Syadeu.Presentation
- PresentationManager
- SceneList
- EntityDataList
- CustomLoadingScene
- DefaultPresentationGroup
- PresentationGroupEntity
- IPresentationSystemGroup
- PresentationSystemGroup<T>
- PresentationSystem<T>
- PresentationSystem<TGroup, TSystem>
- PresentationSystemEntity<T>
- PresentationSystemModule<TSystem>
- PresentationSystemID
- INotifySystemModule<TModule>
- IExecutable<T>
- PresentationLoop
- PresentationResult
- IReference
- Reference
- SubSystemAttribute
- LoadingSceneSetupEntity
- SceneReference
- SceneSystem
- EntitySystem
- EntityBoundSystem
- EntityRaycastSystem
- EntityExtensionMethods
- AttributeAcceptOnlyAttribute
- EntityAcceptOnlyAttribute
- CoroutineSystem
- CoroutineJob
- ICoroutineJob
- UpdateLoop
- RaycastInfo
- ObjectBase
- ProcessorBase
- WaitForPresentationSystem<T>
- WaitForProxy<T>
- Syadeu.Collections
- AABB
- Plane
- PropertyBlockBase
- PropertyBlock<T>
- ActionWrapper
- BinaryGrid
- CLRContainer
- CLRSingleTone
- CLSTypedDictionary<TValue>
- CLSTypedDictionary<TKey, TValue>
- Direction
- EntityID
- EntityShortID
- IEntityDataID
- IInstance
- IInstance<T>
- Instance
- Instance<T>
- InstanceID
- FixedInstanceList16<T>
- FixedInstanceList64<T>
- IFixedReference
- IFixedReference<T>
- FixedReference
- FixedReference<T>
- FixedReferenceList16<T>
- FixedReferenceList64<T>
- IFixedReferenceList<T>
- FixedListExtensionMethods
- IEntity
- IEntityData
- IAttribute
- IObject
- IEntityComponent
- IPrefabReference
- IPrefabResource
- IEmpty
- IValidation
- FNV1a32
- FNV1a64
- Hash
- Syadeu.Collections.Converters
- Syadeu.Collections.Proxy
- Syadeu.Presentation.Proxy
- Syadeu.Presentation.Internal
- Syadeu.Presentation.Entities
- Syadeu.Presentation.Attributes
- Syadeu.Presentation.Components
- Syadeu.Presentation.Actions
- Syadeu.Presentation.Render
- CameraData
- CameraFrustum
- IntersectionType
- RenderSystem
- WorldCanvasSystem
- Syadeu.Presentation.Data
- DataContainerSystem
- DataObjectBase
- EntityAnimationClipEventData