Начальная версия проекта
This commit is contained in:
parent
a266b19478
commit
b56deff0b0
13 changed files with 799 additions and 0 deletions
48
butis/screw.h
Normal file
48
butis/screw.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
#ifndef _BUTIS_SCREW_H_INCLUDE_
|
||||
#define _BUTIS_SCREW_H_INCLUDE_
|
||||
|
||||
#include <basic-geometry.h>
|
||||
|
||||
// =================== Types ==================== //
|
||||
|
||||
typedef struct {
|
||||
BgcVector3FP32 point, direction;
|
||||
float value, momentum;
|
||||
} BtScrewFP32;
|
||||
|
||||
typedef struct {
|
||||
BgcVector3FP64 point, direction;
|
||||
double value, momentum;
|
||||
} BtScrewFP64;
|
||||
|
||||
// =================== Reset ==================== //
|
||||
|
||||
inline void bt_screw_reset_fp32(BtScrewFP32* screw)
|
||||
{
|
||||
screw->point.x1 = 0.0f;
|
||||
screw->point.x2 = 0.0f;
|
||||
screw->point.x3 = 0.0f;
|
||||
|
||||
screw->direction.x1 = 1.0f;
|
||||
screw->direction.x2 = 0.0f;
|
||||
screw->direction.x3 = 0.0f;
|
||||
|
||||
screw->value = 0.0f;
|
||||
screw->momentum = 0.0f;
|
||||
}
|
||||
|
||||
inline void bt_screw_reset_fp64(BtScrewFP64* screw)
|
||||
{
|
||||
screw->point.x1 = 0.0;
|
||||
screw->point.x2 = 0.0;
|
||||
screw->point.x3 = 0.0;
|
||||
|
||||
screw->direction.x1 = 1.0;
|
||||
screw->direction.x2 = 0.0;
|
||||
screw->direction.x3 = 0.0;
|
||||
|
||||
screw->value = 0.0f;
|
||||
screw->momentum = 0.0f;
|
||||
}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue