48 lines
982 B
C
48 lines
982 B
C
#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
|