22 template <
typename scalar_t>
24 scalar_t *transformation_ptr,
const scalar_t *pose_ptr) {
25 transformation_ptr[0] = cos(pose_ptr[2]) * cos(pose_ptr[1]);
26 transformation_ptr[1] =
27 -1 * sin(pose_ptr[2]) * cos(pose_ptr[0]) +
28 cos(pose_ptr[2]) * sin(pose_ptr[1]) * sin(pose_ptr[0]);
29 transformation_ptr[2] =
30 sin(pose_ptr[2]) * sin(pose_ptr[0]) +
31 cos(pose_ptr[2]) * sin(pose_ptr[1]) * cos(pose_ptr[0]);
32 transformation_ptr[4] = sin(pose_ptr[2]) * cos(pose_ptr[1]);
33 transformation_ptr[5] =
34 cos(pose_ptr[2]) * cos(pose_ptr[0]) +
35 sin(pose_ptr[2]) * sin(pose_ptr[1]) * sin(pose_ptr[0]);
36 transformation_ptr[6] =
37 -1 * cos(pose_ptr[2]) * sin(pose_ptr[0]) +
38 sin(pose_ptr[2]) * sin(pose_ptr[1]) * cos(pose_ptr[0]);
39 transformation_ptr[8] = -1 * sin(pose_ptr[1]);
40 transformation_ptr[9] = cos(pose_ptr[1]) * sin(pose_ptr[0]);
41 transformation_ptr[10] = cos(pose_ptr[1]) * cos(pose_ptr[0]);
44 #ifdef BUILD_CUDA_MODULE
49 template <
typename scalar_t>
50 void PoseToTransformationCUDA(scalar_t *transformation_ptr,
51 const scalar_t *pose_ptr);
#define OPEN3D_HOST_DEVICE
Definition: CUDAUtils.h:44
OPEN3D_HOST_DEVICE void PoseToTransformationImpl(scalar_t *transformation_ptr, const scalar_t *pose_ptr)
Shared implementation for PoseToTransformation function.
Definition: TransformationConverterImpl.h:23
Definition: PinholeCameraIntrinsic.cpp:16