Добавление структур для описания положения через дуальный кватернион
This commit is contained in:
parent
bba8a65c1a
commit
0c27a6e59b
5 changed files with 76 additions and 0 deletions
39
basic-geometry/posture3.h
Normal file
39
basic-geometry/posture3.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#ifndef _BGC_POSTURE3_H_INCLUDED_
|
||||
#define _BGC_POSTURE3_H_INCLUDED_
|
||||
|
||||
#include "types.h"
|
||||
#include "quaternion.h"
|
||||
#include "dual-quaternion.h"
|
||||
|
||||
// ==================== Reset =================== //
|
||||
|
||||
inline void bgc_fp32_posture3_reset(BGC_FP32_Posture3* posture)
|
||||
{
|
||||
posture->_dual_versor.real_part.s0 = 1.0f;
|
||||
posture->_dual_versor.real_part.x1 = 0.0f;
|
||||
posture->_dual_versor.real_part.x2 = 0.0f;
|
||||
posture->_dual_versor.real_part.x3 = 0.0f;
|
||||
|
||||
posture->_dual_versor.dual_part.s0 = 0.0f;
|
||||
posture->_dual_versor.dual_part.x1 = 0.0f;
|
||||
posture->_dual_versor.dual_part.x2 = 0.0f;
|
||||
posture->_dual_versor.dual_part.x3 = 0.0f;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_posture3_reset(BGC_FP64_Posture3* posture)
|
||||
{
|
||||
posture->_dual_versor.real_part.s0 = 1.0;
|
||||
posture->_dual_versor.real_part.x1 = 0.0;
|
||||
posture->_dual_versor.real_part.x2 = 0.0;
|
||||
posture->_dual_versor.real_part.x3 = 0.0;
|
||||
|
||||
posture->_dual_versor.dual_part.s0 = 0.0;
|
||||
posture->_dual_versor.dual_part.x1 = 0.0;
|
||||
posture->_dual_versor.dual_part.x2 = 0.0;
|
||||
posture->_dual_versor.dual_part.x3 = 0.0;
|
||||
}
|
||||
|
||||
void _bgc_fp32_posture3_normalize(BGC_FP32_Posture3* posture);
|
||||
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue