All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.qt.gui.QVector2D Maven / Gradle / Ivy

There is a newer version: 6.8.1
Show newest version
package io.qt.gui;


/**
 * 

Represents a vector or vertex in 2D space

*

Java wrapper for Qt class QVector2D

*/ public class QVector2D extends io.qt.QtObject implements java.lang.Cloneable { static { QtJambi_LibraryUtilities.initialize(); } /** *

See QVector2D::QVector2D()

*/ public QVector2D(){ super((QPrivateConstructor)null); initialize_native(this); } private native static void initialize_native(QVector2D instance); /** *

See QVector2D::QVector2D(QPoint)

*/ public QVector2D(io.qt.core.QPoint point){ super((QPrivateConstructor)null); initialize_native(this, point); } private native static void initialize_native(QVector2D instance, io.qt.core.QPoint point); /** *

See QVector2D::QVector2D(QPointF)

*/ public QVector2D(io.qt.core.QPointF point){ super((QPrivateConstructor)null); initialize_native(this, point); } private native static void initialize_native(QVector2D instance, io.qt.core.QPointF point); /** *

See QVector2D::QVector2D(QVector3D)

*/ public QVector2D(io.qt.gui.QVector3D vector){ super((QPrivateConstructor)null); initialize_native(this, vector); } private native static void initialize_native(QVector2D instance, io.qt.gui.QVector3D vector); /** *

See QVector2D::QVector2D(QVector4D)

*/ public QVector2D(io.qt.gui.QVector4D vector){ super((QPrivateConstructor)null); initialize_native(this, vector); } private native static void initialize_native(QVector2D instance, io.qt.gui.QVector4D vector); /** *

See QVector2D::QVector2D(float,float)

*/ public QVector2D(float xpos, float ypos){ super((QPrivateConstructor)null); initialize_native(this, xpos, ypos); } private native static void initialize_native(QVector2D instance, float xpos, float ypos); /** *

See QVector2D::distanceToLine(QVector2D,QVector2D)const

*/ @io.qt.QtUninvokable public final float distanceToLine(io.qt.gui.QVector2D point, io.qt.gui.QVector2D direction){ return distanceToLine_native_QVector2D_QVector2D_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(point), QtJambi_LibraryUtilities.internal.checkedNativeId(direction)); } @io.qt.QtUninvokable private native float distanceToLine_native_QVector2D_QVector2D_constfct(long __this__nativeId, long point, long direction); /** *

See QVector2D::distanceToPoint(QVector2D)const

*/ @io.qt.QtUninvokable public final float distanceToPoint(io.qt.gui.QVector2D point){ return distanceToPoint_native_QVector2D_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(point)); } @io.qt.QtUninvokable private native float distanceToPoint_native_QVector2D_constfct(long __this__nativeId, long point); /** *

See QVector2D::isNull()const

*/ @io.qt.QtUninvokable public final boolean isNull(){ return isNull_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native boolean isNull_native_constfct(long __this__nativeId); /** *

See QVector2D::length()const

*/ @io.qt.QtUninvokable public final float length(){ return length_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native float length_native_constfct(long __this__nativeId); /** *

See QVector2D::lengthSquared()const

*/ @io.qt.QtUninvokable public final float lengthSquared(){ return lengthSquared_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native float lengthSquared_native_constfct(long __this__nativeId); /** *

See QVector2D::normalize()

*/ @io.qt.QtUninvokable public final void normalize(){ normalize_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native void normalize_native(long __this__nativeId); /** *

See QVector2D::normalized()const

*/ @io.qt.QtUninvokable public final io.qt.gui.QVector2D normalized(){ return normalized_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.gui.QVector2D normalized_native_constfct(long __this__nativeId); /** *

See QVector2D::operator*=(QVector2D)

*/ @io.qt.QtUninvokable public final io.qt.gui.QVector2D multiply(io.qt.gui.QVector2D vector){ multiply_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(vector)); return this; } @io.qt.QtUninvokable private native io.qt.gui.QVector2D multiply_native_QVector2D(long __this__nativeId, long vector); /** *

See QVector2D::operator*=(float)

*/ @io.qt.QtUninvokable public final io.qt.gui.QVector2D multiply(float factor){ multiply_native_float(QtJambi_LibraryUtilities.internal.nativeId(this), factor); return this; } @io.qt.QtUninvokable private native io.qt.gui.QVector2D multiply_native_float(long __this__nativeId, float factor); /** *

See QVector2D::operator+=(QVector2D)

*/ @io.qt.QtUninvokable public final io.qt.gui.QVector2D add(io.qt.gui.QVector2D vector){ add_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(vector)); return this; } @io.qt.QtUninvokable private native io.qt.gui.QVector2D add_native_QVector2D(long __this__nativeId, long vector); /** *

See QVector2D::operator-=(QVector2D)

*/ @io.qt.QtUninvokable public final io.qt.gui.QVector2D subtract(io.qt.gui.QVector2D vector){ subtract_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(vector)); return this; } @io.qt.QtUninvokable private native io.qt.gui.QVector2D subtract_native_QVector2D(long __this__nativeId, long vector); /** *

See QVector2D::operator/=(QVector2D)

*/ @io.qt.QtUninvokable public final io.qt.gui.QVector2D divide(io.qt.gui.QVector2D vector){ divide_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(vector)); return this; } @io.qt.QtUninvokable private native io.qt.gui.QVector2D divide_native_QVector2D(long __this__nativeId, long vector); /** *

See QVector2D::operator/=(float)

*/ @io.qt.QtUninvokable public final io.qt.gui.QVector2D divide(float divisor){ divide_native_float(QtJambi_LibraryUtilities.internal.nativeId(this), divisor); return this; } @io.qt.QtUninvokable private native io.qt.gui.QVector2D divide_native_float(long __this__nativeId, float divisor); @io.qt.QtUninvokable public void writeTo(io.qt.core.QDataStream arg__1){ java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected."); writeTo_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } @io.qt.QtUninvokable private native void writeTo_native_ref_QDataStream(long __this__nativeId, long arg__1); @io.qt.QtUninvokable private final boolean operator_equal(io.qt.gui.QVector2D v2){ return operator_equal_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(v2)); } @io.qt.QtUninvokable private native boolean operator_equal_native_QVector2D(long __this__nativeId, long v2); @io.qt.QtUninvokable public void readFrom(io.qt.core.QDataStream arg__1){ java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected."); readFrom_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1)); } @io.qt.QtUninvokable private native void readFrom_native_ref_QDataStream(long __this__nativeId, long arg__1); /** *

See QVector2D::setX(float)

*/ @io.qt.QtUninvokable public final void setX(float x){ setX_native_float(QtJambi_LibraryUtilities.internal.nativeId(this), x); } @io.qt.QtUninvokable private native void setX_native_float(long __this__nativeId, float x); /** *

See QVector2D::setY(float)

*/ @io.qt.QtUninvokable public final void setY(float y){ setY_native_float(QtJambi_LibraryUtilities.internal.nativeId(this), y); } @io.qt.QtUninvokable private native void setY_native_float(long __this__nativeId, float y); /** *

See QVector2D::toPoint()const

*/ @io.qt.QtUninvokable public final io.qt.core.QPoint toPoint(){ return toPoint_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.core.QPoint toPoint_native_constfct(long __this__nativeId); /** *

See QVector2D::toPointF()const

*/ @io.qt.QtUninvokable public final io.qt.core.QPointF toPointF(){ return toPointF_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.core.QPointF toPointF_native_constfct(long __this__nativeId); /** *

See QVector2D::toVector3D()const

*/ @io.qt.QtUninvokable public final io.qt.gui.QVector3D toVector3D(){ return toVector3D_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.gui.QVector3D toVector3D_native_constfct(long __this__nativeId); /** *

See QVector2D::toVector4D()const

*/ @io.qt.QtUninvokable public final io.qt.gui.QVector4D toVector4D(){ return toVector4D_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native io.qt.gui.QVector4D toVector4D_native_constfct(long __this__nativeId); /** *

See QVector2D::x()const

*/ @io.qt.QtUninvokable public final float x(){ return x_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native float x_native_constfct(long __this__nativeId); /** *

See QVector2D::y()const

*/ @io.qt.QtUninvokable public final float y(){ return y_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native float y_native_constfct(long __this__nativeId); /** *

See QVector2D::dotProduct(QVector2D,QVector2D)

*/ public static float dotProduct(io.qt.gui.QVector2D v1, io.qt.gui.QVector2D v2){ return dotProduct_native_QVector2D_QVector2D(QtJambi_LibraryUtilities.internal.checkedNativeId(v1), QtJambi_LibraryUtilities.internal.checkedNativeId(v2)); } private native static float dotProduct_native_QVector2D_QVector2D(long v1, long v2); /** * Constructor for internal use only. * @param p expected to be null. */ @io.qt.NativeAccess protected QVector2D(QPrivateConstructor p) { super(p); } @Override @io.qt.QtUninvokable public boolean equals(Object other) { if (other instanceof io.qt.gui.QVector2D) { return operator_equal((io.qt.gui.QVector2D) other); } return false; } @io.qt.QtUninvokable @Override public int hashCode() { return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private native static int hashCode_native(long __this_nativeId); @Override @io.qt.QtUninvokable public String toString() { return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } @io.qt.QtUninvokable private static native String toString_native(long __this_nativeId); @Override public QVector2D clone() { return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this)); } private native QVector2D clone_native(long __this_nativeId); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy