50 target[1] = pv4[1] / uci->
camsize;
66 target[0] = (pv4[0] / uci->
camsize);
67 target[1] = (pv4[1] / uci->
camsize);
70 target[0] = (-pv4[0] * ((1.0f / uci->
camsize) / pv4[2])) / 2.0f;
71 target[1] = (-pv4[1] * ((1.0f / uci->
camsize) / pv4[2])) / 2.0f;
75 target[0] *= uci->
xasp;
76 target[1] *= uci->
yasp;
90 float pv4[4], x = 0.0, y = 0.0;
100 if (
fabsf(pv4[3]) > 0.00001f) {
101 target[0] = winx / 2.0f + (winx / 2.0f) * pv4[0] / pv4[3];
102 target[1] = winy / 2.0f + (winy / 2.0f) * pv4[1] / pv4[3];
106 target[0] = winx / 2.0f + (winx / 2.0f) * pv4[0];
107 target[1] = winy / 2.0f + (winy / 2.0f) * pv4[1];
112 y = (winx - winy) / 2.0f;
116 x = (winy - winx) / 2.0f;
120 target[0] = (x + target[0]) / winx;
121 target[1] = (y + target[1]) / winy;
125 const float rotmat[4][4],
157 uci.
yasp = winx / winy;
160 uci.
xasp = winy / winx;
165 uci.
shiftx = 0.5f - (camera->shiftx * uci.
xasp);
166 uci.
shifty = 0.5f - (camera->shifty * uci.
yasp);
189 uci->
xasp *= scale_x;
190 uci->
yasp *= scale_y;
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
void mul_m4_v4(const float mat[4][4], float r[4])
bool invert_m4(float mat[4][4])
void normalize_m4(float R[4][4]) ATTR_NONNULL()
float focallength_to_fov(float focal_length, float sensor)
MINLINE float len_v2(const float v[2]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3_v3(float r[3], const float a[3])
Object is a sort of wrapper for general info.
static double angle(const Eigen::Vector3d &v1, const Eigen::Vector3d &v2)
Read Guarded memory(de)allocation.
draw_view in_light_buf[] float
GREAL2 vec2d[2]
Double vector 2D.
void *(* MEM_mallocN)(size_t len, const char *str)
void BLI_uvproject_from_view(float target[2], float source[3], float persmat[4][4], float rotmat[4][4], float winx, float winy)
void BLI_uvproject_from_camera(float target[2], float source[3], ProjCameraInfo *uci)
void BLI_uvproject_camera_info_scale(ProjCameraInfo *uci, float scale_x, float scale_y)
void BLI_uvproject_from_view_ortho(float target[2], float source[3], const float rotmat[4][4])
ProjCameraInfo * BLI_uvproject_camera_info(const Object *ob, const float rotmat[4][4], float winx, float winy)