@@ -37,31 +37,31 @@ pcall(ffi.cdef, [[
3737 double x, y, z;
3838 double rw, rx, ry, rz;
3939 unsigned int rot_mode;
40- } Param ;
40+ } CAMTFKParam ;
4141
4242 typedef struct {
4343 int type;
4444 double x, y, z;
4545 double rw, rx, ry, rz;
4646 unsigned int rot_mode;
4747 double scale;
48- } Parent ;
48+ } CAMTFKParent ;
4949
5050 typedef struct {
5151 double x, y, z;
5252 double tx, ty, tz;
5353 double ux, uy, uz;
54- } Cam ;
54+ } CAMTFKCam ;
5555
56- int transform_cam (const Param *param, const Parent *parent, const Cam *input, Cam *output);
56+ int CameraTransform_K (const CAMTFKParam *param, const CAMTFKParent *parent, const CAMTFKCam *input, CAMTFKCam *output);
5757]])
5858
5959---@class Param : ffi.cdata*
60- local Param = ffi.typeof("Param ")
60+ local Param = ffi.typeof("CAMTFKParam ")
6161---@class Parent : ffi.cdata*
62- local Parent = ffi.typeof("Parent ")
62+ local Parent = ffi.typeof("CAMTFKParent ")
6363---@class Cam : ffi.cdata*
64- local Cam = ffi.typeof("Cam ")
64+ local Cam = ffi.typeof("CAMTFKCam ")
6565
6666local dll_path = obj.getinfo("script_path") .. "CameraTransform_K.dll"
6767local lib = ffi.load(dll_path)
@@ -89,7 +89,7 @@ local param = Param(x, y, z, rw, rx, ry, rz, rot_mode)
8989local input = Cam(cam.x, cam.y, cam.z, cam.tx, cam.ty, cam.tz, cam.ux, cam.uy, cam.uz)
9090local output = Cam()
9191
92- if (lib.transform_cam (param, parent, input, output) ~= 0) then
92+ if (lib.CameraTransform_K (param, parent, input, output) ~= 0) then
9393 error("Camera transformation failed.")
9494end
9595
0 commit comments