io.qt.gui.QVector2D Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.gui;
import io.qt.*;
/**
* Represents a vector or vertex in 2D space
* Java wrapper for Qt class QVector2D
*/
public class QVector2D extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
*
*/
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.@NonNull 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.@NonNull 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(QVector2D)
*/
public QVector2D(io.qt.gui.@NonNull QVector2D other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QVector2D instance, io.qt.gui.QVector2D other);
/**
* See QVector2D:: QVector2D(QVector3D)
*/
public QVector2D(io.qt.gui.@NonNull 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.@NonNull 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
*/
@QtUninvokable
public final float distanceToLine(io.qt.gui.@NonNull QVector2D point, io.qt.gui.@NonNull QVector2D direction){
return distanceToLine_native_QVector2D_QVector2D_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(point), QtJambi_LibraryUtilities.internal.checkedNativeId(direction));
}
@QtUninvokable
private native float distanceToLine_native_QVector2D_QVector2D_constfct(long __this__nativeId, long point, long direction);
/**
* See QVector2D:: distanceToPoint(QVector2D)const
*/
@QtUninvokable
public final float distanceToPoint(io.qt.gui.@NonNull QVector2D point){
return distanceToPoint_native_QVector2D_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(point));
}
@QtUninvokable
private native float distanceToPoint_native_QVector2D_constfct(long __this__nativeId, long point);
/**
*
*/
@QtUninvokable
public final boolean isNull(){
return isNull_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isNull_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final float length(){
return length_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native float length_native_constfct(long __this__nativeId);
/**
* See QVector2D:: lengthSquared()const
*/
@QtUninvokable
public final float lengthSquared(){
return lengthSquared_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native float lengthSquared_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final void normalize(){
normalize_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native void normalize_native(long __this__nativeId);
/**
* See QVector2D:: normalized()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QVector2D normalized(){
return normalized_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QVector2D normalized_native_constfct(long __this__nativeId);
/**
* See operator*(QVector2D, QVector2D)
*/
@QtUninvokable
public final io.qt.gui.@NonNull QVector2D times(io.qt.gui.@NonNull QVector2D v2){
return times_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(v2));
}
@QtUninvokable
private native io.qt.gui.QVector2D times_native_QVector2D(long __this__nativeId, long v2);
/**
* See operator*(QVector2D, float)
*/
@QtUninvokable
public final io.qt.gui.@NonNull QVector2D times(float factor){
return times_native_float(QtJambi_LibraryUtilities.internal.nativeId(this), factor);
}
@QtUninvokable
private native io.qt.gui.QVector2D times_native_float(long __this__nativeId, float factor);
/**
* See QVector2D:: operator*=(QVector2D)
*/
@QtUninvokable
public final @NonNull QVector2D multiply(io.qt.gui.@NonNull QVector2D vector){
return multiply_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(vector));
}
@QtUninvokable
private native QVector2D multiply_native_QVector2D(long __this__nativeId, long vector);
/**
* See QVector2D:: operator*=(float)
*/
@QtUninvokable
public final @NonNull QVector2D multiply(float factor){
return multiply_native_float(QtJambi_LibraryUtilities.internal.nativeId(this), factor);
}
@QtUninvokable
private native QVector2D multiply_native_float(long __this__nativeId, float factor);
/**
* See operator+(QVector2D, QVector2D)
*/
@QtUninvokable
public final io.qt.gui.@NonNull QVector2D plus(io.qt.gui.@NonNull QVector2D v2){
return plus_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(v2));
}
@QtUninvokable
private native io.qt.gui.QVector2D plus_native_QVector2D(long __this__nativeId, long v2);
/**
* See QVector2D:: operator+=(QVector2D)
*/
@QtUninvokable
public final @NonNull QVector2D add(io.qt.gui.@NonNull QVector2D vector){
return add_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(vector));
}
@QtUninvokable
private native QVector2D add_native_QVector2D(long __this__nativeId, long vector);
/**
* See operator-(QVector2D)
*/
@QtUninvokable
public final io.qt.gui.@NonNull QVector2D unaryMinus(){
return unaryMinus_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QVector2D unaryMinus_native(long __this__nativeId);
/**
* See operator-(QVector2D, QVector2D)
*/
@QtUninvokable
public final io.qt.gui.@NonNull QVector2D minus(io.qt.gui.@NonNull QVector2D v2){
return minus_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(v2));
}
@QtUninvokable
private native io.qt.gui.QVector2D minus_native_QVector2D(long __this__nativeId, long v2);
/**
* See QVector2D:: operator-=(QVector2D)
*/
@QtUninvokable
public final @NonNull QVector2D subtract(io.qt.gui.@NonNull QVector2D vector){
return subtract_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(vector));
}
@QtUninvokable
private native QVector2D subtract_native_QVector2D(long __this__nativeId, long vector);
/**
* See operator/(QVector2D, QVector2D)
*/
@QtUninvokable
public final io.qt.gui.@NonNull QVector2D div(io.qt.gui.@NonNull QVector2D divisor){
return div_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(divisor));
}
@QtUninvokable
private native io.qt.gui.QVector2D div_native_QVector2D(long __this__nativeId, long divisor);
/**
* See operator/(QVector2D, float)
*/
@QtUninvokable
public final io.qt.gui.@NonNull QVector2D div(float divisor){
return div_native_float(QtJambi_LibraryUtilities.internal.nativeId(this), divisor);
}
@QtUninvokable
private native io.qt.gui.QVector2D div_native_float(long __this__nativeId, float divisor);
/**
* See QVector2D:: operator/=(QVector2D)
*/
@QtUninvokable
public final @NonNull QVector2D divide(io.qt.gui.@NonNull QVector2D vector){
return divide_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(vector));
}
@QtUninvokable
private native QVector2D divide_native_QVector2D(long __this__nativeId, long vector);
/**
* See QVector2D:: operator/=(float)
*/
@QtUninvokable
public final @NonNull QVector2D divide(float divisor){
return divide_native_float(QtJambi_LibraryUtilities.internal.nativeId(this), divisor);
}
@QtUninvokable
private native QVector2D divide_native_float(long __this__nativeId, float divisor);
/**
* See operator<<(QDataStream&, QVector2D)
*/
@QtUninvokable
public void writeTo(io.qt.core.@StrictNonNull 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));
}
@QtUninvokable
private native void writeTo_native_ref_QDataStream(long __this__nativeId, long arg__1);
/**
* See operator==(QVector2D, QVector2D)
*/
@QtUninvokable
public final boolean equals(io.qt.gui.@NonNull QVector2D v2){
return equals_native_QVector2D(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(v2));
}
@QtUninvokable
private native boolean equals_native_QVector2D(long __this__nativeId, long v2);
/**
* See operator>>(QDataStream&, QVector2D&)
*/
@QtUninvokable
public void readFrom(io.qt.core.@StrictNonNull 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));
}
@QtUninvokable
private native void readFrom_native_ref_QDataStream(long __this__nativeId, long arg__1);
/**
* See QVector2D:: operator[](int)const
*/
@QtUninvokable
public final float get(int i){
if(i<0 || i>2)
throw new IndexOutOfBoundsException(i);
return get_native_int_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), i);
}
@QtUninvokable
private native float get_native_int_constfct(long __this__nativeId, int i);
/**
* See QVector2D:: operator[](int)
*/
@QtUninvokable
public final void set(int i, float value){
if(i<0 || i>2)
throw new IndexOutOfBoundsException(i);
set_native_int_float(QtJambi_LibraryUtilities.internal.nativeId(this), i, value);
}
@QtUninvokable
private native void set_native_int_float(long __this__nativeId, int i, float value);
/**
*
*/
@QtUninvokable
public final void setX(float x){
setX_native_float(QtJambi_LibraryUtilities.internal.nativeId(this), x);
}
@QtUninvokable
private native void setX_native_float(long __this__nativeId, float x);
/**
*
*/
@QtUninvokable
public final void setY(float y){
setY_native_float(QtJambi_LibraryUtilities.internal.nativeId(this), y);
}
@QtUninvokable
private native void setY_native_float(long __this__nativeId, float y);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QPoint toPoint(){
return toPoint_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QPoint toPoint_native_constfct(long __this__nativeId);
/**
* See QVector2D:: toPointF()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QPointF toPointF(){
return toPointF_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QPointF toPointF_native_constfct(long __this__nativeId);
/**
* See QVector2D:: toVector3D()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QVector3D toVector3D(){
return toVector3D_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QVector3D toVector3D_native_constfct(long __this__nativeId);
/**
* See QVector2D:: toVector4D()const
*/
@QtUninvokable
public final io.qt.gui.@NonNull QVector4D toVector4D(){
return toVector4D_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.gui.QVector4D toVector4D_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final float x(){
return x_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native float x_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final float y(){
return y_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native float y_native_constfct(long __this__nativeId);
/**
* See QVector2D:: dotProduct(QVector2D, QVector2D)
*/
public static float dotProduct(io.qt.gui.@NonNull QVector2D v1, io.qt.gui.@NonNull 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
.
* @hidden
*/
@NativeAccess
protected QVector2D(QPrivateConstructor p) { super(p); }
/**
* See operator==(QVector2D, QVector2D)
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other instanceof io.qt.gui.QVector2D) {
return equals((io.qt.gui.QVector2D) other);
}
return false;
}
/**
* Returns the objects's hash code computed by qHash(QVector2D)
.
*/
@QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native static int hashCode_native(long __this_nativeId);
/**
* See operator<<(QDebug, QVector2D)
*/
@QtUninvokable
@Override
public @NonNull String toString() {
return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private static native String toString_native(long __this_nativeId);
/**
* Creates and returns a copy of this object.
See QVector2D:: QVector2D(QVector2D)
*/
@QtUninvokable
@Override
public QVector2D clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QVector2D clone_native(long __this_nativeId);
}