60 target[1] = pv4[1] / uci->
camsize;
76 target[0] = (pv4[0] / uci->
camsize);
77 target[1] = (pv4[1] / uci->
camsize);
80 target[0] = (-pv4[0] * ((1.0f / uci->
camsize) / pv4[2])) / 2.0f;
81 target[1] = (-pv4[1] * ((1.0f / uci->
camsize) / pv4[2])) / 2.0f;
85 target[0] *= uci->
xasp;
86 target[1] *= uci->
yasp;
101 float pv4[4],
x = 0.0,
y = 0.0;
111 if (
fabsf(pv4[3]) > 0.00001f) {
112 target[0] = winx / 2.0f + (winx / 2.0f) * pv4[0] / pv4[3];
113 target[1] = winy / 2.0f + (winy / 2.0f) * pv4[1] / pv4[3];
117 target[0] = winx / 2.0f + (winx / 2.0f) * pv4[0];
118 target[1] = winy / 2.0f + (winy / 2.0f) * pv4[1];
123 y = (winx - winy) / 2.0f;
127 x = (winy - winx) / 2.0f;
131 target[0] = (
x + target[0]) / winx;
132 target[1] = (
y + target[1]) / winy;
167 uci.
yasp = winx / winy;
170 uci.
xasp = winy / winx;
199 uci->
xasp *= scale_x;
200 uci->
yasp *= scale_y;
typedef float(TangentPoint)[2]
bool invert_m4(float R[4][4])
void mul_m4_v4(const float M[4][4], float r[4])
void copy_m4_m4(float m1[4][4], const float m2[4][4])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
void normalize_m4(float R[4][4]) ATTR_NONNULL()
float focallength_to_fov(float focal_length, float sensor)
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE float len_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT
Object is a sort of wrapper for general info.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
Read Guarded memory(de)allocation.
SIMD_FORCE_INLINE btScalar angle(const btVector3 &v) const
Return the angle between this and another vector.
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)
struct ProjCameraInfo ProjCameraInfo
void BLI_uvproject_from_view_ortho(float target[2], float source[3], const float rotmat[4][4])
ProjCameraInfo * BLI_uvproject_camera_info(Object *ob, float(*rotmat)[4], float winx, float winy)