46 double* Tinv_ptr = Tinv.GetDataPtr<
double>();
49 Tinv_ptr[0 * 4 + 0] = T_ptr[0 * 4 + 0];
50 Tinv_ptr[0 * 4 + 1] = T_ptr[1 * 4 + 0];
51 Tinv_ptr[0 * 4 + 2] = T_ptr[2 * 4 + 0];
53 Tinv_ptr[1 * 4 + 0] = T_ptr[0 * 4 + 1];
54 Tinv_ptr[1 * 4 + 1] = T_ptr[1 * 4 + 1];
55 Tinv_ptr[1 * 4 + 2] = T_ptr[2 * 4 + 1];
57 Tinv_ptr[2 * 4 + 0] = T_ptr[0 * 4 + 2];
58 Tinv_ptr[2 * 4 + 1] = T_ptr[1 * 4 + 2];
59 Tinv_ptr[2 * 4 + 2] = T_ptr[2 * 4 + 2];
62 Tinv_ptr[0 * 4 + 3] = -(Tinv_ptr[0 * 4 + 0] * T_ptr[0 * 4 + 3] +
63 Tinv_ptr[0 * 4 + 1] * T_ptr[1 * 4 + 3] +
64 Tinv_ptr[0 * 4 + 2] * T_ptr[2 * 4 + 3]);
65 Tinv_ptr[1 * 4 + 3] = -(Tinv_ptr[1 * 4 + 0] * T_ptr[0 * 4 + 3] +
66 Tinv_ptr[1 * 4 + 1] * T_ptr[1 * 4 + 3] +
67 Tinv_ptr[1 * 4 + 2] * T_ptr[2 * 4 + 3]);
68 Tinv_ptr[2 * 4 + 3] = -(Tinv_ptr[2 * 4 + 0] * T_ptr[0 * 4 + 3] +
69 Tinv_ptr[2 * 4 + 1] * T_ptr[1 * 4 + 3] +
70 Tinv_ptr[2 * 4 + 2] * T_ptr[2 * 4 + 3]);
73 Tinv_ptr[3 * 4 + 0] = 0;
74 Tinv_ptr[3 * 4 + 1] = 0;
75 Tinv_ptr[3 * 4 + 2] = 0;
76 Tinv_ptr[3 * 4 + 3] = 1;
#define LogError(...)
Definition: Console.h:79
core::Tensor InverseTransformation(const core::Tensor &T)
TODO(wei): find a proper place for such functionalities.
Definition: Utility.h:36
bool IsContiguous() const
Definition: Tensor.h:897
void AssertDtype(const Dtype &expected_dtype, const std::string &error_msg="") const
Assert that the Tensor has the specified dtype.
Definition: Tensor.cpp:1534
Definition: PinholeCameraIntrinsic.cpp:35
T * GetDataPtr()
Definition: Tensor.h:1005
void AssertDevice(const Device &expected_device, const std::string &error_msg="") const
Assert that the Tensor has the specified device.
Definition: Tensor.cpp:1518
static const Dtype Float64
Definition: Dtype.h:43
void AssertShape(const SizeVector &expected_shape, const std::string &error_msg="") const
Assert that the Tensor has the specified shape.
Definition: Tensor.cpp:1498