Добавление базисов как вспомогательной структуры
This commit is contained in:
parent
9d7011e81e
commit
e6a94ab8d9
9 changed files with 345 additions and 14 deletions
|
|
@ -47,7 +47,7 @@ inline void bgc_rotation3_set_values_fp32(const float x1, const float x2, const
|
|||
rotation->axis.x2 = x2;
|
||||
rotation->axis.x3 = x3;
|
||||
|
||||
if (bgc_vector3_normalize_fp32(&rotation->axis, &rotation->axis)) {
|
||||
if (bgc_vector3_normalize_fp32(&rotation->axis)) {
|
||||
rotation->radians = bgc_angle_to_radians_fp32(angle, unit);
|
||||
}
|
||||
else {
|
||||
|
|
@ -62,7 +62,7 @@ inline void bgc_rotation3_set_values_fp64(const double x1, const double x2, cons
|
|||
rotation->axis.x2 = x2;
|
||||
rotation->axis.x3 = x3;
|
||||
|
||||
if (bgc_vector3_normalize_fp64(&rotation->axis, &rotation->axis)) {
|
||||
if (bgc_vector3_normalize_fp64(&rotation->axis)) {
|
||||
rotation->radians = bgc_angle_to_radians_fp64(angle, unit);
|
||||
}
|
||||
else {
|
||||
|
|
@ -72,11 +72,9 @@ inline void bgc_rotation3_set_values_fp64(const double x1, const double x2, cons
|
|||
|
||||
inline void bgc_rotation3_set_with_axis_fp32(const BgcVector3FP32* axis, const float angle, const BgcAngleUnitEnum unit, BgcRotation3FP32* rotation)
|
||||
{
|
||||
rotation->axis.x1 = axis->x1;
|
||||
rotation->axis.x2 = axis->x2;
|
||||
rotation->axis.x3 = axis->x3;
|
||||
bgc_vector3_copy_fp32(axis, &rotation->axis);
|
||||
|
||||
if (bgc_vector3_normalize_fp32(&rotation->axis, &rotation->axis)) {
|
||||
if (bgc_vector3_normalize_fp32(&rotation->axis)) {
|
||||
rotation->radians = bgc_angle_to_radians_fp32(angle, unit);
|
||||
}
|
||||
else {
|
||||
|
|
@ -86,11 +84,9 @@ inline void bgc_rotation3_set_with_axis_fp32(const BgcVector3FP32* axis, const f
|
|||
|
||||
inline void bgc_rotation3_set_with_axis_fp64(const BgcVector3FP64* axis, const double angle, const BgcAngleUnitEnum unit, BgcRotation3FP64* rotation)
|
||||
{
|
||||
rotation->axis.x1 = axis->x1;
|
||||
rotation->axis.x2 = axis->x2;
|
||||
rotation->axis.x3 = axis->x3;
|
||||
bgc_vector3_copy_fp64(axis, &rotation->axis);
|
||||
|
||||
if (bgc_vector3_normalize_fp64(&rotation->axis, &rotation->axis)) {
|
||||
if (bgc_vector3_normalize_fp64(&rotation->axis)) {
|
||||
rotation->radians = bgc_angle_to_radians_fp64(angle, unit);
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue