"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "layer0/Vector.cpp" between
pymol-v2.1.0.tar.bz2 and pymol-open-source-2.2.0.tar.gz

About: PyMOL is a Python-enhanced molecular graphics tool. It excels at 3D visualization of proteins, small molecules, density, surfaces, and trajectories. It also includes molecular editing, ray tracing, and movies. Open Source version.

Vector.cpp  (pymol-v2.1.0.tar.bz2):Vector.cpp  (pymol-open-source-2.2.0)
skipping to change at line 416 skipping to change at line 416
*/ */
double determinant33f(const float *m, int ncol) double determinant33f(const float *m, int ncol)
{ {
int &a = ncol, b = ncol * 2; int &a = ncol, b = ncol * 2;
return return
m[0] * (m[a + 1] * (double) m[b + 2] - m[a + 2] * (double) m[b + 1]) - m[0] * (m[a + 1] * (double) m[b + 2] - m[a + 2] * (double) m[b + 1]) -
m[1] * (m[a + 0] * (double) m[b + 2] - m[a + 2] * (double) m[b + 0]) + m[1] * (m[a + 0] * (double) m[b + 2] - m[a + 2] * (double) m[b + 0]) +
m[2] * (m[a + 0] * (double) m[b + 1] - m[a + 1] * (double) m[b + 0]); m[2] * (m[a + 0] * (double) m[b + 1] - m[a + 1] * (double) m[b + 0]);
} }
#ifdef PURE_OPENGL_ES_2 void glOrtho44f(float *m1,
#endif GLfloat left, GLfloat right,
GLfloat bottom, GLfloat top,
GLfloat nearVal, GLfloat farVal){
int a;
/* this is set in column major order */
for(a = 0; a < 16; a++)
m1[a] = _0;
m1[0] = 2.f / (right-left);
m1[5] = 2.f / (top-bottom);
m1[10] = -2.f/(farVal-nearVal);
m1[12] = - (right+left) / (right-left);
m1[13] = - (top+bottom) / (top-bottom);
m1[14] = - (farVal+nearVal) / (farVal-nearVal);
m1[15] = _1;
}
void glFrustum44f(float *m1,
GLfloat left, GLfloat right,
GLfloat bottom, GLfloat top,
GLfloat nearVal, GLfloat farVal){
int a;
/* this is set in column major order */
for(a = 0; a < 16; a++)
m1[a] = _0;
m1[0] = 2.f * nearVal / (right-left);
m1[5] = 2.f * nearVal / (top-bottom);
m1[8] = (right+left) / (right-left);
m1[9] = (top+bottom) / (top-bottom);
m1[10] = -(farVal+nearVal) / (farVal-nearVal);
m1[11] = -1.f;
m1[14] = -2.f * (farVal * nearVal) / (farVal - nearVal);
}
void copy44f(const float *src, float *dst) void copy44f(const float *src, float *dst)
{ {
*(dst++) = *(src++); *(dst++) = *(src++);
*(dst++) = *(src++); *(dst++) = *(src++);
*(dst++) = *(src++); *(dst++) = *(src++);
*(dst++) = *(src++); *(dst++) = *(src++);
*(dst++) = *(src++); *(dst++) = *(src++);
*(dst++) = *(src++); *(dst++) = *(src++);
skipping to change at line 1690 skipping to change at line 1721
v1[0] /= vlen; v1[0] /= vlen;
v1[1] /= vlen; v1[1] /= vlen;
v1[2] /= vlen; v1[2] /= vlen;
} else { } else {
v1[0] = _0; v1[0] = _0;
v1[1] = _0; v1[1] = _0;
v1[2] = _0; v1[2] = _0;
} }
} }
void normalize2f(float *v1)
{
double vlen;
vlen = length2f(v1);
if(vlen > R_SMALL) {
v1[0] /= vlen;
v1[1] /= vlen;
} else {
v1[0] = _0;
v1[1] = _0;
}
}
void normalize4f(float *v1)
{
v1[0] /= v1[3];
v1[1] /= v1[3];
v1[2] /= v1[3];
v1[3] = 1.f;
}
double length3d(const double *v1) double length3d(const double *v1)
{ {
return (sqrt1d((v1[0] * v1[0]) + (v1[1] * v1[1]) + (v1[2] * v1[2]))); return (sqrt1d((v1[0] * v1[0]) + (v1[1] * v1[1]) + (v1[2] * v1[2])));
} }
double distance_line2point3f(const float *base, const float *normal, const float *point, double distance_line2point3f(const float *base, const float *normal, const float *point,
float *alongNormalSq) float *alongNormalSq)
{ {
float hyp[3], adj[3]; float hyp[3], adj[3];
double result; double result;
 End of changes. 2 change blocks. 
2 lines changed or deleted 54 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)