2024-08-25 04:08:24 +00:00
|
|
|
#ifndef GEN_QQUATERNION_H
|
|
|
|
#define GEN_QQUATERNION_H
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
|
|
|
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "binding.h"
|
|
|
|
|
2024-08-25 04:08:24 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
class QQuaternion;
|
|
|
|
class QVector3D;
|
|
|
|
class QVector4D;
|
|
|
|
#else
|
|
|
|
typedef struct QQuaternion QQuaternion;
|
|
|
|
typedef struct QVector3D QVector3D;
|
|
|
|
typedef struct QVector4D QVector4D;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
QQuaternion* QQuaternion_new();
|
2024-08-29 07:01:51 +00:00
|
|
|
QQuaternion* QQuaternion_new2(uintptr_t param1);
|
|
|
|
QQuaternion* QQuaternion_new3(float scalar, float xpos, float ypos, float zpos);
|
|
|
|
QQuaternion* QQuaternion_new4(float scalar, QVector3D* vector);
|
|
|
|
QQuaternion* QQuaternion_new5(QVector4D* vector);
|
|
|
|
QQuaternion* QQuaternion_new6(QQuaternion* param1);
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QQuaternion_IsNull(const QQuaternion* self);
|
|
|
|
bool QQuaternion_IsIdentity(const QQuaternion* self);
|
|
|
|
QVector3D* QQuaternion_Vector(const QQuaternion* self);
|
2024-08-25 04:08:24 +00:00
|
|
|
void QQuaternion_SetVector(QQuaternion* self, QVector3D* vector);
|
|
|
|
void QQuaternion_SetVector2(QQuaternion* self, float x, float y, float z);
|
2024-09-11 05:41:09 +00:00
|
|
|
float QQuaternion_X(const QQuaternion* self);
|
|
|
|
float QQuaternion_Y(const QQuaternion* self);
|
|
|
|
float QQuaternion_Z(const QQuaternion* self);
|
|
|
|
float QQuaternion_Scalar(const QQuaternion* self);
|
2024-08-25 04:08:24 +00:00
|
|
|
void QQuaternion_SetX(QQuaternion* self, float x);
|
|
|
|
void QQuaternion_SetY(QQuaternion* self, float y);
|
|
|
|
void QQuaternion_SetZ(QQuaternion* self, float z);
|
|
|
|
void QQuaternion_SetScalar(QQuaternion* self, float scalar);
|
|
|
|
float QQuaternion_DotProduct(QQuaternion* q1, QQuaternion* q2);
|
2024-09-11 05:41:09 +00:00
|
|
|
float QQuaternion_Length(const QQuaternion* self);
|
|
|
|
float QQuaternion_LengthSquared(const QQuaternion* self);
|
|
|
|
QQuaternion* QQuaternion_Normalized(const QQuaternion* self);
|
2024-08-25 04:08:24 +00:00
|
|
|
void QQuaternion_Normalize(QQuaternion* self);
|
2024-09-11 05:41:09 +00:00
|
|
|
QQuaternion* QQuaternion_Inverted(const QQuaternion* self);
|
|
|
|
QQuaternion* QQuaternion_Conjugated(const QQuaternion* self);
|
|
|
|
QQuaternion* QQuaternion_Conjugate(const QQuaternion* self);
|
|
|
|
QVector3D* QQuaternion_RotatedVector(const QQuaternion* self, QVector3D* vector);
|
2024-08-25 04:08:24 +00:00
|
|
|
QQuaternion* QQuaternion_OperatorPlusAssign(QQuaternion* self, QQuaternion* quaternion);
|
|
|
|
QQuaternion* QQuaternion_OperatorMinusAssign(QQuaternion* self, QQuaternion* quaternion);
|
|
|
|
QQuaternion* QQuaternion_OperatorMultiplyAssign(QQuaternion* self, float factor);
|
|
|
|
QQuaternion* QQuaternion_OperatorMultiplyAssignWithQuaternion(QQuaternion* self, QQuaternion* quaternion);
|
|
|
|
QQuaternion* QQuaternion_OperatorDivideAssign(QQuaternion* self, float divisor);
|
2024-09-11 05:41:09 +00:00
|
|
|
QVector4D* QQuaternion_ToVector4D(const QQuaternion* self);
|
|
|
|
void QQuaternion_GetAxisAndAngle(const QQuaternion* self, QVector3D* axis, float* angle);
|
2024-08-25 04:08:24 +00:00
|
|
|
QQuaternion* QQuaternion_FromAxisAndAngle(QVector3D* axis, float angle);
|
2024-09-11 05:41:09 +00:00
|
|
|
void QQuaternion_GetAxisAndAngle2(const QQuaternion* self, float* x, float* y, float* z, float* angle);
|
2024-08-25 04:08:24 +00:00
|
|
|
QQuaternion* QQuaternion_FromAxisAndAngle2(float x, float y, float z, float angle);
|
2024-09-11 05:41:09 +00:00
|
|
|
QVector3D* QQuaternion_ToEulerAngles(const QQuaternion* self);
|
2024-08-25 04:08:24 +00:00
|
|
|
QQuaternion* QQuaternion_FromEulerAngles(QVector3D* eulerAngles);
|
2024-09-11 05:41:09 +00:00
|
|
|
void QQuaternion_GetEulerAngles(const QQuaternion* self, float* pitch, float* yaw, float* roll);
|
2024-08-25 04:08:24 +00:00
|
|
|
QQuaternion* QQuaternion_FromEulerAngles2(float pitch, float yaw, float roll);
|
2024-09-11 05:41:09 +00:00
|
|
|
void QQuaternion_GetAxes(const QQuaternion* self, QVector3D* xAxis, QVector3D* yAxis, QVector3D* zAxis);
|
2024-08-25 04:08:24 +00:00
|
|
|
QQuaternion* QQuaternion_FromAxes(QVector3D* xAxis, QVector3D* yAxis, QVector3D* zAxis);
|
|
|
|
QQuaternion* QQuaternion_FromDirection(QVector3D* direction, QVector3D* up);
|
|
|
|
QQuaternion* QQuaternion_RotationTo(QVector3D* from, QVector3D* to);
|
|
|
|
QQuaternion* QQuaternion_Slerp(QQuaternion* q1, QQuaternion* q2, float t);
|
|
|
|
QQuaternion* QQuaternion_Nlerp(QQuaternion* q1, QQuaternion* q2, float t);
|
|
|
|
void QQuaternion_Delete(QQuaternion* self);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* extern C */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|