1234567891011121314151617181920 |
- #ifndef CORE_QUATERNION_H
- #define CORE_QUATERNION_H
- #include "core/Vector.h"
- typedef struct {
- Vector4 v;
- } Quaternion;
- #define UNIT_QUATERNION ((Quaternion){{{0.0f, 0.0f, 0.0f, 1.0f}}})
- Quaternion* axisAngleQ(Quaternion* q, const Vector3* axis, float angle);
- Quaternion* lerpQ(Quaternion* q, const Quaternion* a, float f,
- const Quaternion* b);
- Quaternion* mulSetQ(Quaternion* q, const Quaternion* other);
- Quaternion* mulQ(Quaternion* q, const Quaternion* a, const Quaternion* b);
- Vector3* mulQV3(Vector3* r, const Quaternion* q, const Vector3* v);
- size_t toStringQ(const Quaternion* q, char* buffer, size_t n);
- #endif
|