"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "layer2/ObjectMesh.cpp" between
pymol-open-source-2.2.0.tar.gz and pymol-open-source-2.3.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.

ObjectMesh.cpp  (pymol-open-source-2.2.0):ObjectMesh.cpp  (pymol-open-source-2.3.0)
skipping to change at line 44 skipping to change at line 44
#include"Scene.h" #include"Scene.h"
#include"Setting.h" #include"Setting.h"
#include"Executive.h" #include"Executive.h"
#include"PConv.h" #include"PConv.h"
#include"P.h" #include"P.h"
#include"Matrix.h" #include"Matrix.h"
#include"ShaderMgr.h" #include"ShaderMgr.h"
#include"CGO.h" #include"CGO.h"
#include"ObjectCGO.h" #include"ObjectCGO.h"
static
ObjectMesh *ObjectMeshNew(PyMOLGlobals * G); ObjectMesh *ObjectMeshNew(PyMOLGlobals * G);
static void ObjectMeshFree(ObjectMesh * I); static void ObjectMeshFree(ObjectMesh * I);
static void ObjectMeshInvalidate(ObjectMesh * I, int rep, int level, int state); static void ObjectMeshInvalidate(ObjectMesh * I, int rep, int level, int state);
void ObjectMeshStateInit(PyMOLGlobals * G, ObjectMeshState * ms); static void ObjectMeshStateInit(PyMOLGlobals * G, ObjectMeshState * ms);
void ObjectMeshRecomputeExtent(ObjectMesh * I); static void ObjectMeshRecomputeExtent(ObjectMesh * I);
static PyObject *ObjectMeshStateAsPyList(ObjectMeshState * I) static PyObject *ObjectMeshStateAsPyList(ObjectMeshState * I)
{ {
PyObject *result = NULL; PyObject *result = NULL;
result = PyList_New(17); result = PyList_New(17);
PyList_SetItem(result, 0, PyInt_FromLong(I->Active)); PyList_SetItem(result, 0, PyInt_FromLong(I->Active));
PyList_SetItem(result, 1, PyString_FromString(I->MapName)); PyList_SetItem(result, 1, PyString_FromString(I->MapName));
PyList_SetItem(result, 2, PyInt_FromLong(I->MapState)); PyList_SetItem(result, 2, PyInt_FromLong(I->MapState));
skipping to change at line 220 skipping to change at line 221
if(!ok) if(!ok)
break; break;
} }
} }
return (ok); return (ok);
} }
int ObjectMeshNewFromPyList(PyMOLGlobals * G, PyObject * list, ObjectMesh ** res ult) int ObjectMeshNewFromPyList(PyMOLGlobals * G, PyObject * list, ObjectMesh ** res ult)
{ {
int ok = true; int ok = true;
int ll;
ObjectMesh *I = NULL; ObjectMesh *I = NULL;
(*result) = NULL; (*result) = NULL;
if(ok) if(ok)
ok = (list != NULL); ok = (list != NULL);
if(ok) if(ok)
ok = PyList_Check(list); ok = PyList_Check(list);
if(ok)
ll = PyList_Size(list);
/* TO SUPPORT BACKWARDS COMPATIBILITY... /* TO SUPPORT BACKWARDS COMPATIBILITY...
Always check ll when adding new PyList_GetItem's */ Always check ll when adding new PyList_GetItem's */
I = ObjectMeshNew(G); I = ObjectMeshNew(G);
if(ok) if(ok)
ok = (I != NULL); ok = (I != NULL);
if(ok) if(ok)
ok = ObjectFromPyList(G, PyList_GetItem(list, 0), &I->Obj); ok = ObjectFromPyList(G, PyList_GetItem(list, 0), &I->Obj);
if(ok) if(ok)
skipping to change at line 818 skipping to change at line 816
static CGO *ObjectMeshRenderImpl(ObjectMesh * I, RenderInfo * info, int returnCG O, int stateArg) static CGO *ObjectMeshRenderImpl(ObjectMesh * I, RenderInfo * info, int returnCG O, int stateArg)
{ {
PyMOLGlobals *G = I->Obj.G; PyMOLGlobals *G = I->Obj.G;
float *v = NULL; float *v = NULL;
float *vc; float *vc;
int *rc; int *rc;
float radius; float radius;
int state = 0; int state = 0;
CRay *ray = 0; CRay *ray = 0;
Picking **pick = 0; std::vector<Picking>* pick = nullptr;
int pass = 0; int pass = 0;
int *n = NULL; int *n = NULL;
int c; int c;
float line_width, mesh_width = SettingGet_f(I->Obj.G, I->Obj.Setting, NULL, cS etting_mesh_width); float line_width, mesh_width = SettingGet_f(I->Obj.G, I->Obj.Setting, NULL, cS etting_mesh_width);
ObjectMeshState *ms = NULL; ObjectMeshState *ms = NULL;
int ok = true; int ok = true;
if (info){ if (info){
state = info->state; state = info->state;
ray = info->ray; ray = info->ray;
skipping to change at line 1138 skipping to change at line 1136
if(!ok) break; if(!ok) break;
ok &= ObjectMeshStateRenderShader(ms, I, info, mesh_as_cylinders , mesh_width); ok &= ObjectMeshStateRenderShader(ms, I, info, mesh_as_cylinders , mesh_width);
} }
} }
} }
} }
} }
if (!ok){ if (!ok){
I->Obj.fInvalidate(&I->Obj, cRepMesh, cRepInvPurge, -1); I->Obj.invalidate(cRepMesh, cRepInvPurge, -1);
I->Obj.fInvalidate(&I->Obj, cRepCGO, cRepInvPurge, -1); I->Obj.invalidate(cRepCGO, cRepInvPurge, -1);
ObjectSetRepVisMask(&I->Obj, 0, cVis_AS); ObjectSetRepVisMask(&I->Obj, 0, cVis_AS);
} }
return NULL; return NULL;
} }
/*========================================================================*/ /*========================================================================*/
static int ObjectMeshGetNStates(ObjectMesh * I) static int ObjectMeshGetNStates(ObjectMesh * I)
{ {
 End of changes. 6 change blocks. 
8 lines changed or deleted 6 lines changed or added

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