2024-08-25 04:08:24 +00:00
|
|
|
#include <QPoint>
|
|
|
|
#include <QPointF>
|
|
|
|
#include <QVector2D>
|
|
|
|
#include <QVector3D>
|
|
|
|
#include <QVector4D>
|
2024-08-29 07:01:51 +00:00
|
|
|
#include "qvector4d.h"
|
|
|
|
#include "gen_qvector4d.h"
|
2024-09-14 22:29:05 +00:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 04:08:24 +00:00
|
|
|
|
|
|
|
QVector4D* QVector4D_new() {
|
|
|
|
return new QVector4D();
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QVector4D* QVector4D_new2(uintptr_t param1) {
|
|
|
|
return new QVector4D(static_cast<Qt::Initialization>(param1));
|
|
|
|
}
|
|
|
|
|
|
|
|
QVector4D* QVector4D_new3(float xpos, float ypos, float zpos, float wpos) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QVector4D(static_cast<float>(xpos), static_cast<float>(ypos), static_cast<float>(zpos), static_cast<float>(wpos));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QVector4D* QVector4D_new4(QPoint* point) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QVector4D(*point);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QVector4D* QVector4D_new5(QPointF* point) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QVector4D(*point);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QVector4D* QVector4D_new6(QVector2D* vector) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QVector4D(*vector);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QVector4D* QVector4D_new7(QVector2D* vector, float zpos, float wpos) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QVector4D(*vector, static_cast<float>(zpos), static_cast<float>(wpos));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QVector4D* QVector4D_new8(QVector3D* vector) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QVector4D(*vector);
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QVector4D* QVector4D_new9(QVector3D* vector, float wpos) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QVector4D(*vector, static_cast<float>(wpos));
|
|
|
|
}
|
|
|
|
|
2024-08-29 07:01:51 +00:00
|
|
|
QVector4D* QVector4D_new10(QVector4D* param1) {
|
2024-08-25 04:08:24 +00:00
|
|
|
return new QVector4D(*param1);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
bool QVector4D_IsNull(const QVector4D* self) {
|
|
|
|
return self->isNull();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
float QVector4D_X(const QVector4D* self) {
|
|
|
|
return self->x();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
float QVector4D_Y(const QVector4D* self) {
|
|
|
|
return self->y();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
float QVector4D_Z(const QVector4D* self) {
|
|
|
|
return self->z();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
float QVector4D_W(const QVector4D* self) {
|
|
|
|
return self->w();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QVector4D_SetX(QVector4D* self, float x) {
|
|
|
|
self->setX(static_cast<float>(x));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QVector4D_SetY(QVector4D* self, float y) {
|
|
|
|
self->setY(static_cast<float>(y));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QVector4D_SetZ(QVector4D* self, float z) {
|
|
|
|
self->setZ(static_cast<float>(z));
|
|
|
|
}
|
|
|
|
|
|
|
|
void QVector4D_SetW(QVector4D* self, float w) {
|
|
|
|
self->setW(static_cast<float>(w));
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
float QVector4D_OperatorSubscript(const QVector4D* self, int i) {
|
|
|
|
return self->operator[](static_cast<int>(i));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
float QVector4D_Length(const QVector4D* self) {
|
|
|
|
return self->length();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
float QVector4D_LengthSquared(const QVector4D* self) {
|
|
|
|
return self->lengthSquared();
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QVector4D* QVector4D_Normalized(const QVector4D* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QVector4D _ret = self->normalized();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QVector4D*>(new QVector4D(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QVector4D_Normalize(QVector4D* self) {
|
|
|
|
self->normalize();
|
|
|
|
}
|
|
|
|
|
|
|
|
QVector4D* QVector4D_OperatorPlusAssign(QVector4D* self, QVector4D* vector) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QVector4D& _ret = self->operator+=(*vector);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QVector4D* QVector4D_OperatorMinusAssign(QVector4D* self, QVector4D* vector) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QVector4D& _ret = self->operator-=(*vector);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QVector4D* QVector4D_OperatorMultiplyAssign(QVector4D* self, float factor) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QVector4D& _ret = self->operator*=(static_cast<float>(factor));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QVector4D* QVector4D_OperatorMultiplyAssignWithVector(QVector4D* self, QVector4D* vector) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QVector4D& _ret = self->operator*=(*vector);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QVector4D* QVector4D_OperatorDivideAssign(QVector4D* self, float divisor) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QVector4D& _ret = self->operator/=(static_cast<float>(divisor));
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QVector4D* QVector4D_OperatorDivideAssignWithVector(QVector4D* self, QVector4D* vector) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QVector4D& _ret = self->operator/=(*vector);
|
2024-08-25 04:08:24 +00:00
|
|
|
// Cast returned reference into pointer
|
2024-09-14 22:29:05 +00:00
|
|
|
return &_ret;
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
float QVector4D_DotProduct(QVector4D* v1, QVector4D* v2) {
|
|
|
|
return QVector4D::dotProduct(*v1, *v2);
|
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QVector2D* QVector4D_ToVector2D(const QVector4D* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QVector2D _ret = self->toVector2D();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QVector2D*>(new QVector2D(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QVector2D* QVector4D_ToVector2DAffine(const QVector4D* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QVector2D _ret = self->toVector2DAffine();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QVector2D*>(new QVector2D(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QVector3D* QVector4D_ToVector3D(const QVector4D* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QVector3D _ret = self->toVector3D();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QVector3D*>(new QVector3D(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QVector3D* QVector4D_ToVector3DAffine(const QVector4D* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QVector3D _ret = self->toVector3DAffine();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QVector3D*>(new QVector3D(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPoint* QVector4D_ToPoint(const QVector4D* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPoint _ret = self->toPoint();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QPoint*>(new QPoint(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
2024-09-11 05:41:09 +00:00
|
|
|
QPointF* QVector4D_ToPointF(const QVector4D* self) {
|
2024-09-14 22:29:05 +00:00
|
|
|
QPointF _ret = self->toPointF();
|
2024-08-25 04:08:24 +00:00
|
|
|
// Copy-construct value returned type into heap-allocated copy
|
2024-09-14 22:29:05 +00:00
|
|
|
return static_cast<QPointF*>(new QPointF(_ret));
|
2024-08-25 04:08:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void QVector4D_Delete(QVector4D* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|