This repository has been archived on 2026-04-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
bhlib/doc/Manual/ru/BH_Plane.pod

67 lines
2.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
=encoding UTF-8
=head1 НАИМЕНОВАНИЕ
BH_Plane - Плоскость в пространстве
=head1 СИНТАКСИС
#include <BH/Math.h>
cc prog.c -o prog -lbh
=head1 ОПИСАНИЕ
Модуль BH_Plane предоставляет функции для работы с плоскостями в трёхмерном
пространстве. Он позволяет вычислять коэффициенты плоскости по трём точкам,
определять расстояние от точки до плоскости и находить ближайшую точку на
плоскости к заданной точке.
=head1 API ВЫЗОВЫ
=head2 BH_PlaneFromPoints
int BH_PlaneFromPoints(const float a[3],
const float b[3],
const float c[3],
float out[4]);
Вычисляет коэффициенты плоскости по трём точкам I<a>, I<b>, I<c>.
Предполагается, что точки расположены в порядке по часовой стрелке.
Если точки образуют вырожденный треугольник, функция вернёт ошибку.
Параметр I<out> определяет результирующую плоскость.
В случае успеха функция возвращает 0, в противном случае - код ошибки.
=head2 BH_PlaneDistance
float BH_PlaneDistance(const float plane[4],
const float point[3]);
Вычисляет расстояние от точки I<point> до плоскости I<plane>.
=head2 BH_PlaneClosestPoint
void BH_PlaneClosestPoint(const float plane[4],
const float point[3],
float out[3]);
Вычисляет ближайшую точку на плоскости I<plane> к другой точке I<point>.
Параметр I<out> описывает результирующую точку.
=head1 СМ. ТАКЖЕ
L<BH>