#include #include #include #include #include #include #include #include #include #include #include "qmatrix4x4.h" #include "gen_qmatrix4x4.h" extern "C" { extern void miqt_exec_callback(void* cb, int argc, void* argv); } QMatrix4x4* QMatrix4x4_new() { return new QMatrix4x4(); } QMatrix4x4* QMatrix4x4_new2(uintptr_t param1) { return new QMatrix4x4(static_cast(param1)); } QMatrix4x4* QMatrix4x4_new3(const float* values) { return new QMatrix4x4(static_cast(values)); } QMatrix4x4* QMatrix4x4_new4(float m11, float m12, float m13, float m14, float m21, float m22, float m23, float m24, float m31, float m32, float m33, float m34, float m41, float m42, float m43, float m44) { return new QMatrix4x4(static_cast(m11), static_cast(m12), static_cast(m13), static_cast(m14), static_cast(m21), static_cast(m22), static_cast(m23), static_cast(m24), static_cast(m31), static_cast(m32), static_cast(m33), static_cast(m34), static_cast(m41), static_cast(m42), static_cast(m43), static_cast(m44)); } QMatrix4x4* QMatrix4x4_new5(const float* values, int cols, int rows) { return new QMatrix4x4(static_cast(values), static_cast(cols), static_cast(rows)); } QMatrix4x4* QMatrix4x4_new6(QTransform* transform) { return new QMatrix4x4(*transform); } QMatrix4x4* QMatrix4x4_new7(QMatrix* matrix) { return new QMatrix4x4(*matrix); } QMatrix4x4* QMatrix4x4_new8(QMatrix4x4* param1) { return new QMatrix4x4(*param1); } QVector4D* QMatrix4x4_Column(QMatrix4x4* self, int index) { QVector4D ret = const_cast(self)->column(static_cast(index)); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVector4D(ret)); } void QMatrix4x4_SetColumn(QMatrix4x4* self, int index, QVector4D* value) { self->setColumn(static_cast(index), *value); } QVector4D* QMatrix4x4_Row(QMatrix4x4* self, int index) { QVector4D ret = const_cast(self)->row(static_cast(index)); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVector4D(ret)); } void QMatrix4x4_SetRow(QMatrix4x4* self, int index, QVector4D* value) { self->setRow(static_cast(index), *value); } bool QMatrix4x4_IsAffine(QMatrix4x4* self) { return const_cast(self)->isAffine(); } bool QMatrix4x4_IsIdentity(QMatrix4x4* self) { return const_cast(self)->isIdentity(); } void QMatrix4x4_SetToIdentity(QMatrix4x4* self) { self->setToIdentity(); } void QMatrix4x4_Fill(QMatrix4x4* self, float value) { self->fill(static_cast(value)); } double QMatrix4x4_Determinant(QMatrix4x4* self) { return const_cast(self)->determinant(); } QMatrix4x4* QMatrix4x4_Inverted(QMatrix4x4* self) { QMatrix4x4 ret = const_cast(self)->inverted(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QMatrix4x4(ret)); } QMatrix4x4* QMatrix4x4_Transposed(QMatrix4x4* self) { QMatrix4x4 ret = const_cast(self)->transposed(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QMatrix4x4(ret)); } QMatrix4x4* QMatrix4x4_OperatorPlusAssign(QMatrix4x4* self, QMatrix4x4* other) { QMatrix4x4& ret = self->operator+=(*other); // Cast returned reference into pointer return &ret; } QMatrix4x4* QMatrix4x4_OperatorMinusAssign(QMatrix4x4* self, QMatrix4x4* other) { QMatrix4x4& ret = self->operator-=(*other); // Cast returned reference into pointer return &ret; } QMatrix4x4* QMatrix4x4_OperatorMultiplyAssign(QMatrix4x4* self, QMatrix4x4* other) { QMatrix4x4& ret = self->operator*=(*other); // Cast returned reference into pointer return &ret; } QMatrix4x4* QMatrix4x4_OperatorMultiplyAssignWithFactor(QMatrix4x4* self, float factor) { QMatrix4x4& ret = self->operator*=(static_cast(factor)); // Cast returned reference into pointer return &ret; } QMatrix4x4* QMatrix4x4_OperatorDivideAssign(QMatrix4x4* self, float divisor) { QMatrix4x4& ret = self->operator/=(static_cast(divisor)); // Cast returned reference into pointer return &ret; } bool QMatrix4x4_OperatorEqual(QMatrix4x4* self, QMatrix4x4* other) { return const_cast(self)->operator==(*other); } bool QMatrix4x4_OperatorNotEqual(QMatrix4x4* self, QMatrix4x4* other) { return const_cast(self)->operator!=(*other); } void QMatrix4x4_Scale(QMatrix4x4* self, QVector3D* vector) { self->scale(*vector); } void QMatrix4x4_Translate(QMatrix4x4* self, QVector3D* vector) { self->translate(*vector); } void QMatrix4x4_Rotate(QMatrix4x4* self, float angle, QVector3D* vector) { self->rotate(static_cast(angle), *vector); } void QMatrix4x4_Scale2(QMatrix4x4* self, float x, float y) { self->scale(static_cast(x), static_cast(y)); } void QMatrix4x4_Scale3(QMatrix4x4* self, float x, float y, float z) { self->scale(static_cast(x), static_cast(y), static_cast(z)); } void QMatrix4x4_ScaleWithFactor(QMatrix4x4* self, float factor) { self->scale(static_cast(factor)); } void QMatrix4x4_Translate2(QMatrix4x4* self, float x, float y) { self->translate(static_cast(x), static_cast(y)); } void QMatrix4x4_Translate3(QMatrix4x4* self, float x, float y, float z) { self->translate(static_cast(x), static_cast(y), static_cast(z)); } void QMatrix4x4_Rotate2(QMatrix4x4* self, float angle, float x, float y) { self->rotate(static_cast(angle), static_cast(x), static_cast(y)); } void QMatrix4x4_RotateWithQuaternion(QMatrix4x4* self, QQuaternion* quaternion) { self->rotate(*quaternion); } void QMatrix4x4_Ortho(QMatrix4x4* self, QRect* rect) { self->ortho(*rect); } void QMatrix4x4_OrthoWithRect(QMatrix4x4* self, QRectF* rect) { self->ortho(*rect); } void QMatrix4x4_Ortho2(QMatrix4x4* self, float left, float right, float bottom, float top, float nearPlane, float farPlane) { self->ortho(static_cast(left), static_cast(right), static_cast(bottom), static_cast(top), static_cast(nearPlane), static_cast(farPlane)); } void QMatrix4x4_Frustum(QMatrix4x4* self, float left, float right, float bottom, float top, float nearPlane, float farPlane) { self->frustum(static_cast(left), static_cast(right), static_cast(bottom), static_cast(top), static_cast(nearPlane), static_cast(farPlane)); } void QMatrix4x4_Perspective(QMatrix4x4* self, float verticalAngle, float aspectRatio, float nearPlane, float farPlane) { self->perspective(static_cast(verticalAngle), static_cast(aspectRatio), static_cast(nearPlane), static_cast(farPlane)); } void QMatrix4x4_LookAt(QMatrix4x4* self, QVector3D* eye, QVector3D* center, QVector3D* up) { self->lookAt(*eye, *center, *up); } void QMatrix4x4_Viewport(QMatrix4x4* self, QRectF* rect) { self->viewport(*rect); } void QMatrix4x4_Viewport2(QMatrix4x4* self, float left, float bottom, float width, float height) { self->viewport(static_cast(left), static_cast(bottom), static_cast(width), static_cast(height)); } void QMatrix4x4_FlipCoordinates(QMatrix4x4* self) { self->flipCoordinates(); } void QMatrix4x4_CopyDataTo(QMatrix4x4* self, float* values) { const_cast(self)->copyDataTo(static_cast(values)); } QMatrix* QMatrix4x4_ToAffine(QMatrix4x4* self) { QMatrix ret = const_cast(self)->toAffine(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QMatrix(ret)); } QTransform* QMatrix4x4_ToTransform(QMatrix4x4* self) { QTransform ret = const_cast(self)->toTransform(); // Copy-construct value returned type into heap-allocated copy return static_cast(new QTransform(ret)); } QTransform* QMatrix4x4_ToTransformWithDistanceToPlane(QMatrix4x4* self, float distanceToPlane) { QTransform ret = const_cast(self)->toTransform(static_cast(distanceToPlane)); // Copy-construct value returned type into heap-allocated copy return static_cast(new QTransform(ret)); } QPoint* QMatrix4x4_Map(QMatrix4x4* self, QPoint* point) { QPoint ret = const_cast(self)->map(*point); // Copy-construct value returned type into heap-allocated copy return static_cast(new QPoint(ret)); } QPointF* QMatrix4x4_MapWithPoint(QMatrix4x4* self, QPointF* point) { QPointF ret = const_cast(self)->map(*point); // Copy-construct value returned type into heap-allocated copy return static_cast(new QPointF(ret)); } QVector3D* QMatrix4x4_Map2(QMatrix4x4* self, QVector3D* point) { QVector3D ret = const_cast(self)->map(*point); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVector3D(ret)); } QVector3D* QMatrix4x4_MapVector(QMatrix4x4* self, QVector3D* vector) { QVector3D ret = const_cast(self)->mapVector(*vector); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVector3D(ret)); } QVector4D* QMatrix4x4_Map3(QMatrix4x4* self, QVector4D* point) { QVector4D ret = const_cast(self)->map(*point); // Copy-construct value returned type into heap-allocated copy return static_cast(new QVector4D(ret)); } QRect* QMatrix4x4_MapRect(QMatrix4x4* self, QRect* rect) { QRect ret = const_cast(self)->mapRect(*rect); // Copy-construct value returned type into heap-allocated copy return static_cast(new QRect(ret)); } QRectF* QMatrix4x4_MapRectWithRect(QMatrix4x4* self, QRectF* rect) { QRectF ret = const_cast(self)->mapRect(*rect); // Copy-construct value returned type into heap-allocated copy return static_cast(new QRectF(ret)); } float* QMatrix4x4_Data(QMatrix4x4* self) { return self->data(); } const float* QMatrix4x4_Data2(QMatrix4x4* self) { return (const float*) const_cast(self)->data(); } const float* QMatrix4x4_ConstData(QMatrix4x4* self) { return (const float*) const_cast(self)->constData(); } void QMatrix4x4_Optimize(QMatrix4x4* self) { self->optimize(); } QMatrix4x4* QMatrix4x4_Inverted1(QMatrix4x4* self, bool* invertible) { QMatrix4x4 ret = const_cast(self)->inverted(invertible); // Copy-construct value returned type into heap-allocated copy return static_cast(new QMatrix4x4(ret)); } void QMatrix4x4_Rotate4(QMatrix4x4* self, float angle, float x, float y, float z) { self->rotate(static_cast(angle), static_cast(x), static_cast(y), static_cast(z)); } void QMatrix4x4_Viewport5(QMatrix4x4* self, float left, float bottom, float width, float height, float nearPlane) { self->viewport(static_cast(left), static_cast(bottom), static_cast(width), static_cast(height), static_cast(nearPlane)); } void QMatrix4x4_Viewport6(QMatrix4x4* self, float left, float bottom, float width, float height, float nearPlane, float farPlane) { self->viewport(static_cast(left), static_cast(bottom), static_cast(width), static_cast(height), static_cast(nearPlane), static_cast(farPlane)); } void QMatrix4x4_Delete(QMatrix4x4* self) { delete self; }