Завершение большого переименования
This commit is contained in:
parent
120e651517
commit
3805354611
31 changed files with 1213 additions and 1255 deletions
|
|
@ -1,27 +1,27 @@
|
|||
#ifndef _BASIC_GEOMETRY_ROTATION3_H_
|
||||
#define _BASIC_GEOMETRY_ROTATION3_H_
|
||||
#ifndef _BGC_ROTATION3_H_
|
||||
#define _BGC_ROTATION3_H_
|
||||
|
||||
#include "basis.h"
|
||||
#include "utilities.h"
|
||||
#include "angle.h"
|
||||
#include "vector3.h"
|
||||
|
||||
typedef struct {
|
||||
vector3_fp32_t axis;
|
||||
bgc_vector3_fp32_t axis;
|
||||
float radians;
|
||||
} rotation3_fp32_t;
|
||||
} bgc_rotation3_fp32_t;
|
||||
|
||||
typedef struct {
|
||||
vector3_fp64_t axis;
|
||||
bgc_vector3_fp64_t axis;
|
||||
double radians;
|
||||
} rotation3_fp64_t;
|
||||
} bgc_rotation3_fp64_t;
|
||||
|
||||
extern const rotation3_fp32_t FP32_IDLE_ROTATION3;
|
||||
extern const bgc_rotation3_fp32_t BGC_IDLE_ROTATION3_FP32;
|
||||
|
||||
extern const rotation3_fp64_t FP64_IDLE_ROTATION3;
|
||||
extern const bgc_rotation3_fp64_t BGC_IDLE_ROTATION3_FP64;
|
||||
|
||||
// =================== Reset ==================== //
|
||||
|
||||
inline void fp32_rotation_reset(rotation3_fp32_t* rotation)
|
||||
inline void bgc_rotation3_reset_fp32(bgc_rotation3_fp32_t* rotation)
|
||||
{
|
||||
rotation->axis.x1 = 0.0f;
|
||||
rotation->axis.x2 = 0.0f;
|
||||
|
|
@ -30,7 +30,7 @@ inline void fp32_rotation_reset(rotation3_fp32_t* rotation)
|
|||
rotation->radians = 0.0f;
|
||||
}
|
||||
|
||||
inline void fp64_rotation_reset(rotation3_fp64_t* rotation)
|
||||
inline void bgc_rotation3_reset_fp64(bgc_rotation3_fp64_t* rotation)
|
||||
{
|
||||
rotation->axis.x1 = 0.0;
|
||||
rotation->axis.x2 = 0.0;
|
||||
|
|
@ -41,14 +41,14 @@ inline void fp64_rotation_reset(rotation3_fp64_t* rotation)
|
|||
|
||||
// ==================== Make ==================== //
|
||||
|
||||
inline void fp32_rotation_set_values(const float x1, const float x2, const float x3, const float angle, const angle_unit_t unit, rotation3_fp32_t* rotation)
|
||||
inline void bgc_rotation3_set_values_fp32(const float x1, const float x2, const float x3, const float angle, const bgc_angle_unit_t unit, bgc_rotation3_fp32_t* rotation)
|
||||
{
|
||||
rotation->axis.x1 = x1;
|
||||
rotation->axis.x2 = x2;
|
||||
rotation->axis.x3 = x3;
|
||||
|
||||
if (vector3_normalize_fp32(&rotation->axis)) {
|
||||
rotation->radians = fp32_angle_to_radians(angle, unit);
|
||||
if (bgc_vector3_normalize_fp32(&rotation->axis)) {
|
||||
rotation->radians = bgc_angle_to_radians_fp32(angle, unit);
|
||||
}
|
||||
else {
|
||||
rotation->radians = 0.0f;
|
||||
|
|
@ -56,42 +56,42 @@ inline void fp32_rotation_set_values(const float x1, const float x2, const float
|
|||
}
|
||||
|
||||
|
||||
inline void fp64_rotation_set_values(const double x1, const double x2, const double x3, const double angle, const angle_unit_t unit, rotation3_fp64_t* rotation)
|
||||
inline void bgc_rotation3_set_values_fp64(const double x1, const double x2, const double x3, const double angle, const bgc_angle_unit_t unit, bgc_rotation3_fp64_t* rotation)
|
||||
{
|
||||
rotation->axis.x1 = x1;
|
||||
rotation->axis.x2 = x2;
|
||||
rotation->axis.x3 = x3;
|
||||
|
||||
if (vector3_normalize_fp64(&rotation->axis)) {
|
||||
rotation->radians = fp64_angle_to_radians(angle, unit);
|
||||
if (bgc_vector3_normalize_fp64(&rotation->axis)) {
|
||||
rotation->radians = bgc_angle_to_radians_fp64(angle, unit);
|
||||
}
|
||||
else {
|
||||
rotation->radians = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
inline void fp32_rotation_set_with_axis(const vector3_fp32_t* axis, const float angle, const angle_unit_t unit, rotation3_fp32_t* rotation)
|
||||
inline void bgc_rotation3_set_with_axis_fp32(const bgc_vector3_fp32_t* axis, const float angle, const bgc_angle_unit_t unit, bgc_rotation3_fp32_t* rotation)
|
||||
{
|
||||
rotation->axis.x1 = axis->x1;
|
||||
rotation->axis.x2 = axis->x2;
|
||||
rotation->axis.x3 = axis->x3;
|
||||
|
||||
if (vector3_normalize_fp32(&rotation->axis)) {
|
||||
rotation->radians = fp32_angle_to_radians(angle, unit);
|
||||
if (bgc_vector3_normalize_fp32(&rotation->axis)) {
|
||||
rotation->radians = bgc_angle_to_radians_fp32(angle, unit);
|
||||
}
|
||||
else {
|
||||
rotation->radians = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
inline void fp64_rotation_set_with_axis(const vector3_fp64_t* axis, const double angle, const angle_unit_t unit, rotation3_fp64_t* rotation)
|
||||
inline void bgc_rotation3_set_with_axis_fp64(const bgc_vector3_fp64_t* axis, const double angle, const bgc_angle_unit_t unit, bgc_rotation3_fp64_t* rotation)
|
||||
{
|
||||
rotation->axis.x1 = axis->x1;
|
||||
rotation->axis.x2 = axis->x2;
|
||||
rotation->axis.x3 = axis->x3;
|
||||
|
||||
if (vector3_normalize_fp64(&rotation->axis)) {
|
||||
rotation->radians = fp64_angle_to_radians(angle, unit);
|
||||
if (bgc_vector3_normalize_fp64(&rotation->axis)) {
|
||||
rotation->radians = bgc_angle_to_radians_fp64(angle, unit);
|
||||
}
|
||||
else {
|
||||
rotation->radians = 0.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue