"Fossies" - the Fresh Open Source Software Archive  

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

RepWireBond.cpp  (pymol-open-source-2.2.0):RepWireBond.cpp  (pymol-open-source-2.3.0)
skipping to change at line 40 skipping to change at line 40
typedef struct RepWireBond { typedef struct RepWireBond {
Rep R; Rep R;
CGO *shaderCGO; CGO *shaderCGO;
CGO *primitiveCGO; CGO *primitiveCGO;
bool shaderCGO_has_cylinders; bool shaderCGO_has_cylinders;
} RepWireBond; } RepWireBond;
#include"ObjectMolecule.h" #include"ObjectMolecule.h"
void RepWireBondFree(RepWireBond * I);
static int RepLine(CGO *cgo, bool s1, bool s2, bool isRamped, float *v1, float * v2, float *v1color, unsigned int b1, unsigned int b2, int a, float *v2color, boo l b1masked, bool b2masked){ static int RepLine(CGO *cgo, bool s1, bool s2, bool isRamped, float *v1, float * v2, float *v1color, unsigned int b1, unsigned int b2, int a, float *v2color, boo l b1masked, bool b2masked){
int ok = true; int ok = true;
if (s1 && s2){ if (s1 && s2){
CGOColorv(cgo, v1color); CGOColorv(cgo, v1color);
CGOPickColor(cgo, b1, b1masked ? cPickableNoPick : a); CGOPickColor(cgo, b1, b1masked ? cPickableNoPick : a);
{ {
// if not ramped, then insert vertices so colors are not interpolated sinc e lines interpolate by default // if not ramped, then insert vertices so colors are not interpolated sinc e lines interpolate by default
bool eq = equal3f(v1color, v2color); bool eq = equal3f(v1color, v2color);
bool split = !eq || b1 != b2; bool split = !eq || b1 != b2;
if (split){ if (split){
skipping to change at line 230 skipping to change at line 228
subtract3f(pt2, t, p2); subtract3f(pt2, t, p2);
cgo->add<cgo::draw::line>(p1, p2); cgo->add<cgo::draw::line>(p1, p2);
if(double_sided) { if(double_sided) {
add3f(pt1, t, p1); add3f(pt1, t, p1);
add3f(pt2, t, p2); add3f(pt2, t, p2);
cgo->add<cgo::draw::line>(p1, p2); cgo->add<cgo::draw::line>(p1, p2);
} }
} }
} }
static
void RepWireBondFree(RepWireBond * I) void RepWireBondFree(RepWireBond * I)
{ {
CGOFree(I->shaderCGO); CGOFree(I->shaderCGO);
CGOFree(I->primitiveCGO); CGOFree(I->primitiveCGO);
RepPurge(&I->R); RepPurge(&I->R);
OOFreeP(I); OOFreeP(I);
} }
/* lower memory use and higher performance for /* lower memory use and higher performance for
display of large trajectories, etc. */ display of large trajectories, etc. */
skipping to change at line 410 skipping to change at line 409
I->shaderCGO = convertcgo; I->shaderCGO = convertcgo;
CHECKOK(ok, I->shaderCGO); CHECKOK(ok, I->shaderCGO);
} }
return ok; return ok;
} }
static void RepWireBondRender(RepWireBond * I, RenderInfo * info) static void RepWireBondRender(RepWireBond * I, RenderInfo * info)
{ {
PyMOLGlobals *G = I->R.G; PyMOLGlobals *G = I->R.G;
CRay *ray = info->ray; CRay *ray = info->ray;
Picking **pick = info->pick; auto pick = info->pick;
int ok = true; int ok = true;
if(ray) { if(ray) {
#ifndef _PYMOL_NO_RAY #ifndef _PYMOL_NO_RAY
CGORenderRay(I->primitiveCGO, ray, info, NULL, NULL, I->R.cs->Setting, I->R. cs->Obj->Obj.Setting); CGORenderRay(I->primitiveCGO, ray, info, NULL, NULL, I->R.cs->Setting, I->R. cs->Obj->Obj.Setting);
ray->transparentf(0.0); ray->transparentf(0.0);
#endif #endif
} else if(G->HaveGUI && G->ValidContext) { } else if(G->HaveGUI && G->ValidContext) {
bool use_shader = SettingGetGlobal_b(G, cSetting_line_use_shader) && bool use_shader = SettingGetGlobal_b(G, cSetting_line_use_shader) &&
SettingGetGlobal_b(G, cSetting_use_shaders); SettingGetGlobal_b(G, cSetting_use_shaders);
 End of changes. 3 change blocks. 
3 lines changed or deleted 2 lines changed or added

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