Isosurf.cpp (pymol-open-source-2.2.0) | : | Isosurf.cpp (pymol-open-source-2.3.0) | ||
---|---|---|---|---|
skipping to change at line 36 | skipping to change at line 36 | |||
#include"Err.h" | #include"Err.h" | |||
#include"Symmetry.h" | #include"Symmetry.h" | |||
#include"Vector.h" | #include"Vector.h" | |||
#include"Feedback.h" | #include"Feedback.h" | |||
#include"PConv.h" | #include"PConv.h" | |||
#include"P.h" | #include"P.h" | |||
#include"Util.h" | #include"Util.h" | |||
#define Trace_OFF | #define Trace_OFF | |||
#ifndef true | ||||
#define true 1 | ||||
#endif | ||||
#ifndef false | ||||
#define false 0 | ||||
#endif | ||||
#define O3(field,P1,P2,P3,offs) Ffloat3(field,(P1)+offs[0],(P2)+offs[1],(P3)+off s[2]) | #define O3(field,P1,P2,P3,offs) Ffloat3(field,(P1)+offs[0],(P2)+offs[1],(P3)+off s[2]) | |||
#define O3Ptr(field,P1,P2,P3,offs) Ffloat3p(field,(P1)+offs[0],(P2)+offs[1],(P3) +offs[2]) | #define O3Ptr(field,P1,P2,P3,offs) Ffloat3p(field,(P1)+offs[0],(P2)+offs[1],(P3) +offs[2]) | |||
#define O4(field,P1,P2,P3,P4,offs) Ffloat4(field,(P1)+offs[0],(P2)+offs[1],(P3)+ offs[2],P4) | #define O4(field,P1,P2,P3,P4,offs) Ffloat4(field,(P1)+offs[0],(P2)+offs[1],(P3)+ offs[2],P4) | |||
#define O4Ptr(field,P1,P2,P3,P4,offs) Ffloat4p(field,(P1)+offs[0],(P2)+offs[1],( P3)+offs[2],P4) | #define O4Ptr(field,P1,P2,P3,P4,offs) Ffloat4p(field,(P1)+offs[0],(P2)+offs[1],( P3)+offs[2],P4) | |||
#define I3(field,P1,P2,P3) Fint3(field,P1,P2,P3) | #define I3(field,P1,P2,P3) Fint3(field,P1,P2,P3) | |||
#define I3Ptr(field,P1,P2,P3) Fint3p(field,P1,P2,P3) | #define I3Ptr(field,P1,P2,P3) Fint3p(field,P1,P2,P3) | |||
#define I4(field,P1,P2,P3,P4) Fint4(field,P1,P2,P3,P4) | #define I4(field,P1,P2,P3,P4) Fint4(field,P1,P2,P3,P4) | |||
#define I4Ptr(field,P1,P2,P3,P4) Fint4p(field,P1,P2,P3,P4) | #define I4Ptr(field,P1,P2,P3,P4) Fint4p(field,P1,P2,P3,P4) | |||
typedef struct PointType { | typedef struct PointType { | |||
float Point[3]; | float Point[3]; | |||
int NLink; | int NLink; | |||
struct PointType *(Link[4]); | struct PointType* Link[4]; | |||
} PointType; | } PointType; | |||
#define EdgePtPtr(field,P2,P3,P4,P5) ((PointType*)Fvoid4p(field,P2,P3,P4,P5)) | #define EdgePtPtr(field,P2,P3,P4,P5) ((PointType*)Fvoid4p(field,P2,P3,P4,P5)) | |||
#define EdgePt(field,P2,P3,P4,P5) (*((PointType*)Fvoid4p(field,P2,P3,P4,P5))) | #define EdgePt(field,P2,P3,P4,P5) (*((PointType*)Fvoid4p(field,P2,P3,P4,P5))) | |||
struct _CIsosurf { | struct _CIsosurf { | |||
PyMOLGlobals *G; | PyMOLGlobals *G; | |||
CField *VertexCodes; | CField *VertexCodes; | |||
CField *ActiveEdges; | CField *ActiveEdges; | |||
skipping to change at line 155 | skipping to change at line 147 | |||
pt[1] = v1[1] + (v2[1] - v1[1]) * ratio; | pt[1] = v1[1] + (v2[1] - v1[1]) * ratio; | |||
pt[2] = v1[2] + (v2[2] - v1[2]) * ratio; | pt[2] = v1[2] + (v2[2] - v1[2]) * ratio; | |||
} | } | |||
/*===========================================================================*/ | /*===========================================================================*/ | |||
Isofield *IsosurfNewFromPyList(PyMOLGlobals * G, PyObject * list) | Isofield *IsosurfNewFromPyList(PyMOLGlobals * G, PyObject * list) | |||
{ | { | |||
int ok = true; | int ok = true; | |||
int dim4[4]; | int dim4[4]; | |||
int a; | int a; | |||
int ll; | ||||
Isofield *result = NULL; | Isofield *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 ENABLE BACKWARDS COMPATIBILITY... | /* TO ENABLE BACKWARDS COMPATIBILITY... | |||
Always check ll when adding new PyList_GetItem's */ | Always check ll when adding new PyList_GetItem's */ | |||
if(ok) | if(ok) | |||
ok = ((result = Alloc(Isofield, 1)) != NULL); | ok = ((result = Alloc(Isofield, 1)) != NULL); | |||
if(ok) { | if(ok) { | |||
result->data = NULL; | result->data = NULL; | |||
result->points = NULL; | result->points = NULL; | |||
result->gradients = NULL; | result->gradients = NULL; | |||
} | } | |||
if(ok) | if(ok) | |||
End of changes. 4 change blocks. | ||||
12 lines changed or deleted | 1 lines changed or added |