In the function PATHLINE:GetPointFromIndex(n) it must be self.points[n] instead of self.point[n]
function PATHLINE:GetPointFromIndex(n)
local N=self:GetNumberOfPoints()
n=n or 1
local point=nil --#PATHLINE.Point
if n>=1 and n<=N then
point=self.points[n] -- must be points not point
else
self:E(self.lid..string.format("ERROR: No point in pathline for N=%s", tostring(n)))
end
return point
end
in the function PATHLINE:GetCoordinats() is the table.insert misssing.
function PATHLINE:GetCoordinats()
local vecs={}
for _,_point in pairs(self.points) do
local point=_point --#PATHLINE.Point
local coord=COORDINATE:NewFromVec3(point.vec3)
table.insert(vecs, coord) -- this line was missing
end
return vecs
end
Hi, I found two bugs in PATHLINE.
In the function PATHLINE:GetPointFromIndex(n) it must be self.points[n] instead of self.point[n]
in the function PATHLINE:GetCoordinats() is the table.insert misssing.