35 lines
932 B
C
35 lines
932 B
C
#ifndef _BGC_BASIS3_H_
|
|
#define _BGC_BASIS3_H_
|
|
|
|
#include "./vector3.h"
|
|
|
|
#define BGC_ERROR_BASIS3_PRIMARY_DIRECTION_UNKNOWN -3001
|
|
#define BGC_ERROR_BASIS3_PRIMARY_VECTOR_IS_ZERO -3002
|
|
|
|
#define BGC_ERROR_BASIS3_AUXILIARY_DIRECTION_UNKNOWN -3011
|
|
#define BGC_ERROR_BASIS3_AUXILIARY_VECTOR_IS_ZERO -3012
|
|
|
|
#define BGC_ERROR_BASIS3_PRIMARY_AUXILIARY_PARALLEL -3021
|
|
|
|
|
|
typedef struct {
|
|
BgcVector3FP32 e1, e2, e3;
|
|
} BgcBasis3FP32;
|
|
|
|
typedef struct {
|
|
BgcVector3FP64 e1, e2, e3;
|
|
} BgcBasis3FP64;
|
|
|
|
int bgc_basis3_make_from_directions_fp32(
|
|
const int primary_direction, const BgcVector3FP32* primary_vector,
|
|
const int auxiliary_direction, const BgcVector3FP32* auxiliary_vector,
|
|
BgcBasis3FP32* basis
|
|
);
|
|
|
|
int bgc_basis3_make_from_directions_fp64(
|
|
const int primary_direction, const BgcVector3FP64* primary_vector,
|
|
const int auxiliary_direction, const BgcVector3FP64* auxiliary_vector,
|
|
BgcBasis3FP64* basis
|
|
);
|
|
|
|
#endif
|