Commit e221911e authored by Marek Dvoroznak's avatar Marek Dvoroznak Committed by Mikael Magnusson

libs: npd: add alpha parameter to MLS weights

parent 520af4d2
......@@ -34,6 +34,7 @@ npd_init_model (NPDModel *model)
model->hidden_model = hidden_model;
hidden_model->ASAP = FALSE;
hidden_model->MLS_weights = FALSE;
hidden_model->MLS_weights_alpha = 1;
hidden_model->num_of_bones = 0;
hidden_model->num_of_overlapping_points = 0;
......@@ -400,7 +401,7 @@ npd_compute_MLS_weights (NPDModel *model)
}
if (npd_equal_floats (min, 0.0)) min = 0.0000001;
MLS_weight = 1 / min;
MLS_weight = 1 / pow (min, hm->MLS_weights_alpha);
npd_set_overlapping_points_weight (op, MLS_weight);
}
}
......
......@@ -67,6 +67,7 @@ typedef struct
* use npd_set_deformation_type function */
gboolean MLS_weights; /* don't change directly!
* use npd_set_deformation_type function */
gfloat MLS_weights_alpha;
NPDBone *current_bones; /* array of current bones */
NPDBone *reference_bones; /* array of reference bones */
NPDOverlappingPoints *list_of_overlapping_points; /* array of overlapping points */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment