COLLADA.cpp (pymol-v2.1.0.tar.bz2) | : | COLLADA.cpp (pymol-open-source-2.2.0) | ||
---|---|---|---|---|
skipping to change at line 57 | skipping to change at line 57 | |||
#define COLLADA_GEOM_MODE_COUNT 2 | #define COLLADA_GEOM_MODE_COUNT 2 | |||
/* Returns a standard XML-formatted timestamp */ | /* Returns a standard XML-formatted timestamp */ | |||
static char *GetTimestamp(){ | static char *GetTimestamp(){ | |||
time_t now; | time_t now; | |||
struct tm *local; | struct tm *local; | |||
char buffer[20]; | char buffer[20]; | |||
time(&now); | time(&now); | |||
local = localtime(&now); | local = localtime(&now); | |||
strftime(buffer, 20, "%Y-%m-%dT%T", local); | strftime(buffer, 20, "%Y-%m-%dT%H:%M:%S", local); | |||
return strdup(buffer); | return strdup(buffer); | |||
} | } | |||
/* | /* | |||
* Returns index of the first float in an array matching the given value to | * Returns index of the first float in an array matching the given value to | |||
* the given precision. | * the given precision. | |||
*/ | */ | |||
static int GetFloatPositionInArray(float val, float *arr, int len, | static int GetFloatPositionInArray(float val, float *arr, int len, | |||
float precision) | float precision) | |||
{ | { | |||
skipping to change at line 931 | skipping to change at line 931 | |||
UtilConcatVLA(&positions_str, &pos_str_cc, next); | UtilConcatVLA(&positions_str, &pos_str_cc, next); | |||
} | } | |||
/* normals */ | /* normals */ | |||
for(i = 0; i < 24; i++){ | for(i = 0; i < 24; i++){ | |||
sprintf(next, "%i ", -cube_coords[i]); | sprintf(next, "%i ", -cube_coords[i]); | |||
UtilConcatVLA(&normals_str, &norm_str_cc, next); | UtilConcatVLA(&normals_str, &norm_str_cc, next); | |||
} | } | |||
/* color */ | /* color */ | |||
float *bg_color; | const float *bg_color; | |||
bg_color = ColorGet(G, SettingGet_color(G, NULL, NULL, cSetting_bg_r gb)); | bg_color = ColorGet(G, SettingGet_color(G, NULL, NULL, cSetting_bg_r gb)); | |||
sprintf(next, "%6.4f %6.4f %6.4f", bg_color[0], bg_color[1], bg_colo r[2]); | sprintf(next, "%6.4f %6.4f %6.4f", bg_color[0], bg_color[1], bg_colo r[2]); | |||
UtilConcatVLA(&colors_str, &col_str_cc, next); | UtilConcatVLA(&colors_str, &col_str_cc, next); | |||
/* p */ | /* p */ | |||
for(i = 0; i < 6; i++){ | for(i = 0; i < 6; i++){ | |||
sprintf(next, "%i %i 0 %i %i 0 %i %i 0 %i %i 0 ", | sprintf(next, "%i %i 0 %i %i 0 %i %i 0 %i %i 0 ", | |||
cube_face_verts[4 * i], cube_face_verts[4 * i], | cube_face_verts[4 * i], cube_face_verts[4 * i], | |||
cube_face_verts[4 * i + 1], cube_face_verts[4 * i + 1], | cube_face_verts[4 * i + 1], cube_face_verts[4 * i + 1], | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |