ObjectSurface.cpp (pymol-open-source-2.2.0) | : | ObjectSurface.cpp (pymol-open-source-2.3.0) | ||
---|---|---|---|---|
skipping to change at line 45 | skipping to change at line 45 | |||
#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"Util.h" | #include"Util.h" | |||
#include"PyMOLGlobals.h" | #include"PyMOLGlobals.h" | |||
#include"Matrix.h" | #include"Matrix.h" | |||
#include"ShaderMgr.h" | #include"ShaderMgr.h" | |||
#include"CGO.h" | #include"CGO.h" | |||
ObjectSurface *ObjectSurfaceNew(PyMOLGlobals * G); | static ObjectSurface *ObjectSurfaceNew(PyMOLGlobals * G); | |||
static void ObjectSurfaceFree(ObjectSurface * I); | static void ObjectSurfaceFree(ObjectSurface * I); | |||
void ObjectSurfaceStateInit(PyMOLGlobals * G, ObjectSurfaceState * ms); | static void ObjectSurfaceStateInit(PyMOLGlobals * G, ObjectSurfaceState * ms); | |||
void ObjectSurfaceRecomputeExtent(ObjectSurface * I); | static void ObjectSurfaceRecomputeExtent(ObjectSurface * I); | |||
static PyObject *ObjectSurfaceStateAsPyList(ObjectSurfaceState * I) | static PyObject *ObjectSurfaceStateAsPyList(ObjectSurfaceState * 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 950 | skipping to change at line 949 | |||
} | } | |||
CGORenderGL(ms->UnitCellCGO, color, | CGORenderGL(ms->UnitCellCGO, color, | |||
I->Obj.Setting, NULL, info, NULL); | I->Obj.Setting, NULL, info, NULL); | |||
} | } | |||
static void ObjectSurfaceRender(ObjectSurface * I, RenderInfo * info) | static void ObjectSurfaceRender(ObjectSurface * I, RenderInfo * info) | |||
{ | { | |||
PyMOLGlobals *G = I->Obj.G; | PyMOLGlobals *G = I->Obj.G; | |||
int state = info->state; | int state = info->state; | |||
CRay *ray = info->ray; | CRay *ray = info->ray; | |||
Picking **pick = info->pick; | auto pick = info->pick; | |||
int pass = info->pass; | int pass = info->pass; | |||
const float *col; | const float *col; | |||
ObjectSurfaceState *ms = NULL; | ObjectSurfaceState *ms = NULL; | |||
float alpha; | float alpha; | |||
ObjectPrepareContext(&I->Obj, info); | ObjectPrepareContext(&I->Obj, info); | |||
alpha = 1.0F - SettingGet_f(G, NULL, I->Obj.Setting, cSetting_transparency); | alpha = 1.0F - SettingGet_f(G, NULL, I->Obj.Setting, cSetting_transparency); | |||
if(fabs(alpha - 1.0) < R_SMALL4) | if(fabs(alpha - 1.0) < R_SMALL4) | |||
alpha = 1.0F; | alpha = 1.0F; | |||
End of changes. 3 change blocks. | ||||
5 lines changed or deleted | 4 lines changed or added |