/// <summary> /// Initialize buffers and lists. /// </summary> /// <param name="config"></param> void InitializeData(ConvexHullComputationConfig config) { UnprocessedFaces = new FaceList(); ConvexFaces = new IndexBuffer(); FacePool = new ConvexFaceInternal[(Dimension + 1) * 10]; // must be initialized before object manager AffectedFaceFlags = new bool[(Dimension + 1) * 10]; ObjectManager = new MIConvexHull.ObjectManager(this); Center = new double[Dimension]; TraverseStack = new IndexBuffer(); UpdateBuffer = new int[Dimension]; UpdateIndices = new int[Dimension]; EmptyBuffer = new IndexBuffer(); AffectedFaceBuffer = new IndexBuffer(); ConeFaceBuffer = new SimpleList<DeferredFace>(); SingularVertices = new HashSet<int>(); BeyondBuffer = new IndexBuffer(); ConnectorTable = new ConnectorList[ConnectorTableSize]; for (int i = 0; i < ConnectorTableSize; i++) ConnectorTable[i] = new ConnectorList(); VertexMarks = new bool[Vertices.Length]; InitializePositions(config); MathHelper = new MIConvexHull.MathHelper(Dimension, Positions); }