Hi,
have you found the reason for my problems?
By the way, I now turned to loading hmp's from files. There is a code segment in the LoadHMP.cpp example file, which is executed in a case, which I don't understand:
int numv_x = (int) head->fnumverts_x;
int numv_y = head->numverts / numv_x;
...
float x_size = head->ftrisize_x * (numv_x - 1);
float y_size = head->ftrisize_y * (numv_y - 1);
float x_step = x_size / (numv_x-1);
float y_step = y_size / (numv_y-1);
...
//'hmp.fr' == current frame data
if ( x_step == 0 || y_step == 0)
{
float min_x = (float) hmp.fr->min.p_pos[0] * head->scale[0] + head->scale_origin[0];
float min_y = (float) hmp.fr->min.p_pos[1] * head->scale[1] + head->scale_origin[1];
float max_x = (float) hmp.fr->max.p_pos[0] * head->scale[0] + head->scale_origin[0];
float max_y = (float) hmp.fr->max.p_pos[1] * head->scale[1] + head->scale_origin[1];
x_size = (max_x-min_x);
y_size = (max_y-min_y);
x_step = x_size / (numv_x - 1);
y_step = y_size / (numv_y - 1);
}
The if-block is executed if and only if the header indicates no triangle size for x or y direction - but when is that the case? Is this code segment just a workaround for hmp files which were written in a wrong way by a user? Is it possible that the MDL7 SDK can do this also?