I have the following (part of a notebook)
TIN.GetBounds()
(529264.5625,
533399.6875,
0.6866056323051453,
268.851806640625,
4385078.0,
4389888.0)
cell_locator = vtkCellLocator()
cell_locator.SetDataSet(TIN)
cell_locator.BuildLocator()
pos = np.array(camera.GetPosition())
cdir = np.array(camera.GetDirectionOfProjection())
pos, cdir
(array([5.335190e+05, 3.000000e+02, 4.387387e+06]),
array([-0.98070103, -0.13256555, 0.14370755]))
npos = pos + cdir*10.0
npos
array([5.33509193e+05, 2.98674345e+02, 4.38738844e+06])
t = reference(0)
iden = reference(0)
x = [0.0, 0.0, 0.0]
pcoords = [0.0, 0.0, 0.0]flag = cell_locator.IntersectWithLine((npos[0], -100.0, npos[2]), (npos[0], 5000.0, npos[2]), 0.0001, t, x,pcoords, iden)
x
[0.0, 0.0, 0.0]
I am trying to figure out what am I doing wrong? why am I not getting the interpolated value at x?