getMarkerIds
Definition
-- @/lua/ge/extensions/core/paths.lua:42
local function getMarkerIds(path, idx)
local markerCount = #path.markers
local index1 = math.max(idx - 1, 1)
local index2 = idx
local index3 = math.min(idx + 1, markerCount)
local index4 = math.min(idx + 2, markerCount)
if path.looped then
index1 = ((idx - 2) % markerCount) + 1
index2 = ((idx - 1) % markerCount) + 1
index3 = ((idx) % markerCount) + 1
index4 = ((idx + 1) % markerCount) + 1
end
if path.markers[index1].cut then index1 = index2 end
if path.markers[index3].cut then index4 = index3 end
return index1, index2, index3, index4
end
Callers
@/lua/ge/extensions/editor/camPathEditor.lua
end
local n1, n2, n3, n4 = core_paths.getMarkerIds(path, ctrlPoints[i])
if linkedReplay then
ctrlPoints[i] = (ctrlPoints[i] % #markers) + 1
n1, n2, n3, n4 = core_paths.getMarkerIds(path, ctrlPoints[i])
nextTime = getGlobalTime(path, n3, path.looped)
for i = 1, core_paths.getEndIdx(path) do
local n1, n2, n3, n4 = core_paths.getMarkerIds(path, i)
local stepSize = getSplineResolution((markers[n2].pos - camPos):length())
@/lua/ge/extensions/core/cameraModes/path.lua
-- simulate interpolated camera
local n1, n2, n3, n4 = core_paths.getMarkerIds(path, self.ctrlPoint)
self.ctrlPoint = self.ctrlPoint + 1
n1, n2, n3, n4 = core_paths.getMarkerIds(path, self.ctrlPoint)
nextTime = self:getGlobalTime(path, n3, path.looped)