// Job execution method public void Execute(int i) { var info = new Interop.DetectionInfo(ref _input[i].Ref, _tagSize, _focalLength, _focalLength, _focalCenter.x, _focalCenter.y); using var pose = new Interop.Pose(ref info); var pos = pose.t.AsFloat3() * math.float3(1, -1, 1); var rot = math.quaternion(pose.R.AsFloat3x3()); rot = rot.value * math.float4(-1, 1, -1, 1); _output[i] = new TagPose(_input[i].Ref.ID, pos, rot); }
static extern double _Estimate(ref DetectionInfo info, ref Pose pose);
public Pose(ref DetectionInfo info) { matd_r = matd_t = IntPtr.Zero; _Estimate(ref info, ref this); }