-- Used to initialize new barrierPartInfos

local function getBarrierPartInfo(part, startDeg, endDeg, splitLevel, isSecondPartInPair, isSecondPartBySplitLevel)
	local barrierPartInfo = {}
	barrierPartInfo.part = part
	barrierPartInfo.startDeg = startDeg
	barrierPartInfo.endDeg = endDeg
	barrierPartInfo.splitLevel = splitLevel -- increases by 1 each time the part is split
	barrierPartInfo.isSecondPartBySplitLevel = {}  -- will hold bool values for whether itself and its ancestors were second parts in pairs
	for i = 1, splitLevel - 1 do
		barrierPartInfo.isSecondPartBySplitLevel[i] = isSecondPartBySplitLevel[i]
	end
	barrierPartInfo.isSecondPartBySplitLevel[splitLevel] = isSecondPartInPair
	return barrierPartInfo
end

local function getVertexListFromRadians(startRad, endRad, stormRadius, stormPos)
	local x1 = stormRadius * math.cos(startRad)
	local z1 = stormRadius * math.sin(startRad)
	local x2 = stormRadius * math.cos(endRad)
	local z2 = stormRadius * math.sin(endRad)
	local vertexList = { stormPos + Vector3.new(x1, 0, z1), -- bot1
						 stormPos + Vector3.new(x1, BARRIER_HEIGHT, z1), -- top1
						 stormPos + Vector3.new(x2, BARRIER_HEIGHT, z2), -- top2
						 stormPos + Vector3.new(x2, 0, z2) } -- bot2
	return vertexList
end
