"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "layer1/PyMOLObject.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.

PyMOLObject.cpp  (pymol-v2.1.0.tar.bz2):PyMOLObject.cpp  (pymol-open-source-2.2.0)
skipping to change at line 992 skipping to change at line 992
result = true; result = true;
} }
} }
} }
} }
} }
return result; return result;
} }
/*========================================================================*/ /*========================================================================*/
void ObjectPrepareContext(CObject * I, CRay * ray) void ObjectPrepareContext(CObject * I, RenderInfo * info)
{ {
CRay * ray = info ? info->ray : NULL;
if(I->ViewElem) { if(I->ViewElem) {
int frame = SceneGetFrame(I->G); int frame = SceneGetFrame(I->G);
if(frame >= 0) { if(frame >= 0) {
VLACheck(I->ViewElem, CViewElem, frame); VLACheck(I->ViewElem, CViewElem, frame);
if(I->Grabbed) { if(I->Grabbed) {
TTTToViewElem(I->TTT, I->ViewElem + frame); TTTToViewElem(I->TTT, I->ViewElem + frame);
I->ViewElem[frame].specification_level = 2; I->ViewElem[frame].specification_level = 2;
} else { } else {
if(I->ViewElem[frame].specification_level) { if(I->ViewElem[frame].specification_level) {
skipping to change at line 1046 skipping to change at line 1048
gl[13] = ttt[7]; gl[13] = ttt[7];
gl[2] = ttt[8]; gl[2] = ttt[8];
gl[6] = ttt[9]; gl[6] = ttt[9];
gl[10] = ttt[10]; gl[10] = ttt[10];
gl[14] = ttt[11]; gl[14] = ttt[11];
gl[3] = 0.0; gl[3] = 0.0;
gl[7] = 0.0; gl[7] = 0.0;
gl[11] = 0.0; gl[11] = 0.0;
gl[15] = 1.0; gl[15] = 1.0;
glMultMatrixf(gl); auto mvm = SceneGetModelViewMatrix(G);
MatrixMultiplyC44f(gl, mvm);
/* include the pre-translation */ MatrixTranslateC44f(mvm, ttt[12], ttt[13], ttt[14]);
glTranslatef(ttt[12], ttt[13], ttt[14]);
#ifndef PURE_OPENGL_ES_2
if (ALWAYS_IMMEDIATE_OR(!info->use_shaders)) {
glLoadMatrixf(mvm);
}
#endif
} }
} }
} }
} }
/*========================================================================*/ /*========================================================================*/
void ObjectSetTTTOrigin(CObject * I, float *origin) void ObjectSetTTTOrigin(CObject * I, float *origin)
{ {
float homo[16]; float homo[16];
float *dst; float *dst;
skipping to change at line 1147 skipping to change at line 1154
/*========================================================================*/ /*========================================================================*/
void ObjectUpdate(CObject * I) void ObjectUpdate(CObject * I)
{ {
} }
/*========================================================================*/ /*========================================================================*/
void ObjectPurge(CObject * I) void ObjectPurge(CObject * I)
{ {
if(I) { if(I) {
SceneObjectDel(I->G, I, false);
SettingFreeP(I->Setting); SettingFreeP(I->Setting);
VLAFreeP(I->ViewElem); VLAFreeP(I->ViewElem);
} }
} }
/*========================================================================*/ /*========================================================================*/
void ObjectFree(CObject * I) void ObjectFree(CObject * I)
{ {
if(I) if(I)
ObjectPurge(I); ObjectPurge(I);
skipping to change at line 1393 skipping to change at line 1401
if(info->ray) { if(info->ray) {
float ttt[16], matrix[16], i_matrixf[16]; float ttt[16], matrix[16], i_matrixf[16];
RayPushTTT(info->ray); RayPushTTT(info->ray);
RayGetTTT(info->ray, ttt); RayGetTTT(info->ray, ttt);
convertTTTfR44f(ttt, matrix); convertTTTfR44f(ttt, matrix);
copy44d44f(i_matrix, i_matrixf); copy44d44f(i_matrix, i_matrixf);
right_multiply44f44f(matrix, i_matrixf); right_multiply44f44f(matrix, i_matrixf);
RaySetTTT(info->ray, true, matrix); RaySetTTT(info->ray, true, matrix);
result = true; result = true;
} else if(G->HaveGUI && G->ValidContext) { } else if(G->HaveGUI && G->ValidContext) {
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
matrix[0] = i_matrix[0]; matrix[0] = i_matrix[0];
matrix[1] = i_matrix[4]; matrix[1] = i_matrix[4];
matrix[2] = i_matrix[8]; matrix[2] = i_matrix[8];
matrix[3] = i_matrix[12]; matrix[3] = i_matrix[12];
matrix[4] = i_matrix[1]; matrix[4] = i_matrix[1];
matrix[5] = i_matrix[5]; matrix[5] = i_matrix[5];
matrix[6] = i_matrix[9]; matrix[6] = i_matrix[9];
matrix[7] = i_matrix[13]; matrix[7] = i_matrix[13];
matrix[8] = i_matrix[2]; matrix[8] = i_matrix[2];
matrix[9] = i_matrix[6]; matrix[9] = i_matrix[6];
matrix[10] = i_matrix[10]; matrix[10] = i_matrix[10];
matrix[11] = i_matrix[14]; matrix[11] = i_matrix[14];
matrix[12] = i_matrix[3]; matrix[12] = i_matrix[3];
matrix[13] = i_matrix[7]; matrix[13] = i_matrix[7];
matrix[14] = i_matrix[11]; matrix[14] = i_matrix[11];
matrix[15] = i_matrix[15]; matrix[15] = i_matrix[15];
glMultMatrixf(matrix);
ScenePushModelViewMatrix(G);
auto mvm = SceneGetModelViewMatrix(G);
MatrixMultiplyC44f(matrix, mvm);
#ifndef PURE_OPENGL_ES_2
if (ALWAYS_IMMEDIATE_OR(!info->use_shaders)) {
glLoadMatrixf(mvm);
}
#endif
result = true; result = true;
} }
} }
return result; return result;
} }
void ObjectStatePopMatrix(CObjectState * I, RenderInfo * info) void ObjectStatePopMatrix(CObjectState * I, RenderInfo * info)
{ {
PyMOLGlobals *G = I->G; PyMOLGlobals *G = I->G;
if(info->ray) { if(info->ray) {
RayPopTTT(info->ray); RayPopTTT(info->ray);
} else if(G->HaveGUI && G->ValidContext) { } else if(G->HaveGUI && G->ValidContext) {
glMatrixMode(GL_MODELVIEW); ScenePopModelViewMatrix(G, !info->use_shaders);
glPopMatrix();
} }
} }
void ObjectStateResetMatrix(CObjectState * I) void ObjectStateResetMatrix(CObjectState * I)
{ {
FreeP(I->Matrix); FreeP(I->Matrix);
FreeP(I->InvMatrix); FreeP(I->InvMatrix);
} }
PyObject *ObjectStateAsPyList(CObjectState * I) PyObject *ObjectStateAsPyList(CObjectState * I)
 End of changes. 7 change blocks. 
10 lines changed or deleted 25 lines changed or added

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