Hello developers!
Thank you very much for the active developments!
Since the camera parameters (position & rotation) are float, I think these lines are buggy,
|
py::array_t<int> pyflex_get_camera_params() { |
|
// Right now only returns width and height for the default screen camera |
|
// yf: add the camera position and camera angle |
|
auto default_camera_param = py::array_t<float>(8); |
|
auto default_camera_param_ptr = (float *) default_camera_param.request().ptr; |
|
default_camera_param_ptr[0] = g_screenWidth; |
|
default_camera_param_ptr[1] = g_screenHeight; |
|
default_camera_param_ptr[2] = g_camPos.x; |
|
default_camera_param_ptr[3] = g_camPos.y; |
|
default_camera_param_ptr[4] = g_camPos.z; |
|
default_camera_param_ptr[5] = g_camAngle.x; |
|
default_camera_param_ptr[6] = g_camAngle.y; |
|
default_camera_param_ptr[7] = g_camAngle.z; |
|
return default_camera_param; |
|
} |
So, the return should be py::array_t<float>
instead of py::array_t<int>
?
Thanks!