internal static CompactHierarchy CreateHierarchy(CompactHierarchyID hierarchyID, NodeID nodeID, Int32 userID, Allocator allocator) { var compactHierarchy = new CompactHierarchy { brushMeshToBrush = new UnsafeMultiHashMap <int, CompactNodeID>(16384, allocator), compactNodes = new UnsafeList <CompactChildNode>(1024, allocator), brushOutlines = new UnsafeList <BrushOutline>(1024, allocator), idManager = IDManager.Create(allocator), HierarchyID = hierarchyID, isCreated = true }; compactHierarchy.RootID = compactHierarchy.CreateNode(nodeID, new CompactNode { userID = userID, operation = CSGOperationType.Additive, transformation = float4x4.identity, brushMeshHash = Int32.MaxValue }); return(compactHierarchy); }
internal CompactNodeID(CompactHierarchyID hierarchyID, Int32 value, Int32 generation = 0) { this.hierarchyID = hierarchyID; this.value = value; this.generation = generation; }