Обновление makefile, переименования параметров функций комбинирования аффинных преобразований

This commit is contained in:
Andrey Pokidov 2026-01-28 17:04:48 +07:00
parent 0258f0a283
commit d33daf4e2d
5 changed files with 27 additions and 26 deletions

View file

@ -128,20 +128,20 @@ inline int bgc_affine2_get_inverse_fp64(const BgcAffine2FP64 * source, BgcAffine
// =================== Combine =================== //
inline void bgc_affine2_combine_fp32(const BgcAffine2FP32 * parent, const BgcAffine2FP32 * child, BgcAffine2FP32 * combination)
inline void bgc_affine2_combine_fp32(const BgcAffine2FP32 * first, const BgcAffine2FP32 * second, BgcAffine2FP32 * combination)
{
BgcVector2FP32 child_shift;
bgc_matrix2x2_get_right_product_fp32(&parent->distortion, &child->shift, &child_shift);
bgc_matrix_product_2x2_at_2x2_fp32(&parent->distortion, &child->distortion, &combination->distortion);
bgc_vector2_add_fp32(&parent->shift, &child_shift, &combination->shift);
BgcVector2FP32 first_shift;
bgc_matrix2x2_get_right_product_fp32(&second->distortion, &first->shift, &first_shift);
bgc_matrix_product_2x2_at_2x2_fp32(&second->distortion, &first->distortion, &combination->distortion);
bgc_vector2_add_fp32(&first_shift, &second->shift, &combination->shift);
}
inline void bgc_affine2_combine_fp64(const BgcAffine2FP64 * parent, const BgcAffine2FP64 * child, BgcAffine2FP64 * combination)
inline void bgc_affine2_combine_fp64(const BgcAffine2FP64 * first, const BgcAffine2FP64 * second, BgcAffine2FP64 * combination)
{
BgcVector2FP64 child_shift;
bgc_matrix2x2_get_right_product_fp64(&parent->distortion, &child->shift, &child_shift);
bgc_matrix_product_2x2_at_2x2_fp64(&parent->distortion, &child->distortion, &combination->distortion);
bgc_vector2_add_fp64(&parent->shift, &child_shift, &combination->shift);
BgcVector2FP64 first_shift;
bgc_matrix2x2_get_right_product_fp64(&second->distortion, &first->shift, &first_shift);
bgc_matrix_product_2x2_at_2x2_fp64(&second->distortion, &first->distortion, &combination->distortion);
bgc_vector2_add_fp64(&first_shift, &second->shift, &combination->shift);
}
// =============== Transform Point =============== //