Vector4

Inheritance: java.lang.Object

All Implemented Interfaces: java.lang.Comparable, com.aspose.csporter.helpers.Struct, java.io.Serializable

public final class Vector4 implements Comparable<Vector4>, Struct<Vector4>, Serializable

A vector with four components.

Constructors

ConstructorDescription
Vector4(Vector3 vec, double w)Initializes a new instance of the Vector4 struct.
Vector4(Vector3 vec)Initializes a new instance of the Vector4 struct.
Vector4(FVector4 vec)Initializes a new instance of the Vector4 struct.
Vector4(double x, double y, double z)Initializes a new instance of the Vector4 struct.
Vector4(double x, double y, double z, double w)Initializes a new instance of the Vector4 struct.
Vector4()

Fields

FieldDescription
wThe w component.
xThe x component.
yThe y component.
zThe z component.

Methods

MethodDescription
add(Vector4 lhs, Vector4 rhs)Operator overloading for +
clone()
compareTo(Vector4 other)Compare current vector to another instance.
copyFrom(Vector4 src)
create(Vector4 v)Explicit conversion operator to cast Vector4 to FVector4
equals(Object obj)Check if two vectors are equal
getClass()
hashCode()Gets the hash code of this vector
mul(Vector4 lhs, Vector4 rhs)Operator overloading for *
mul(Vector4 lhs, double rhs)Operator overloading for *
notify()
notifyAll()
set(double newX, double newY, double newZ)Sets vector’s xyz components at a time, w will be set to 1
set(double newX, double newY, double newZ, double newW)Sets vector’s all components at a time
sub(Vector4 lhs, Vector4 rhs)Operator overloading for - (minus)
toString()Returns a java.lang.String that represents the current Vector4.
wait()
wait(long arg0)
wait(long arg0, int arg1)

Vector4(Vector3 vec, double w)

public Vector4(Vector3 vec, double w)

Initializes a new instance of the Vector4 struct.

Parameters:

ParameterTypeDescription
vecVector3Vec.
wdoubleThe width.

Vector4(Vector3 vec)

public Vector4(Vector3 vec)

Initializes a new instance of the Vector4 struct.

Parameters:

ParameterTypeDescription
vecVector3Vec.

Vector4(FVector4 vec)

public Vector4(FVector4 vec)

Initializes a new instance of the Vector4 struct.

Parameters:

ParameterTypeDescription
vecFVector4Vec.

Vector4(double x, double y, double z)

public Vector4(double x, double y, double z)

Initializes a new instance of the Vector4 struct.

Parameters:

ParameterTypeDescription
xdoubleThe x coordinate.
ydoubleThe y coordinate.
zdoubleThe z coordinate.

Vector4(double x, double y, double z, double w)

public Vector4(double x, double y, double z, double w)

Initializes a new instance of the Vector4 struct.

Parameters:

ParameterTypeDescription
xdoubleThe x coordinate.
ydoubleThe y coordinate.
zdoubleThe z coordinate.
wdoubleThe width.

Vector4()

public Vector4()

w

public double w

The w component.

x

public double x

The x component.

y

public double y

The y component.

z

public double z

The z component.

add(Vector4 lhs, Vector4 rhs)

public static Vector4 add(Vector4 lhs, Vector4 rhs)

Operator overloading for +

Parameters:

ParameterTypeDescription
lhsVector4The left vector
rhsVector4The right vector

Returns: Vector4 - Result vector

clone()

public Vector4 clone()

Returns: Vector4

compareTo(Vector4 other)

public int compareTo(Vector4 other)

Compare current vector to another instance.

Parameters:

ParameterTypeDescription
otherVector4

Returns: int

copyFrom(Vector4 src)

public void copyFrom(Vector4 src)

Parameters:

ParameterTypeDescription
srcVector4

create(Vector4 v)

public static FVector4 create(Vector4 v)

Explicit conversion operator to cast Vector4 to FVector4

Parameters:

ParameterTypeDescription
vVector4

Returns: FVector4

equals(Object obj)

public boolean equals(Object obj)

Check if two vectors are equal

Parameters:

ParameterTypeDescription
objjava.lang.Object

Returns: boolean

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

hashCode()

public int hashCode()

Gets the hash code of this vector

Returns: int

mul(Vector4 lhs, Vector4 rhs)

public static Vector4 mul(Vector4 lhs, Vector4 rhs)

Operator overloading for *

Parameters:

ParameterTypeDescription
lhsVector4The left vector
rhsVector4The right vector

Returns: Vector4 - Result vector

mul(Vector4 lhs, double rhs)

public static Vector4 mul(Vector4 lhs, double rhs)

Operator overloading for *

Parameters:

ParameterTypeDescription
lhsVector4The left vector
rhsdoubleThe right double value

Returns: Vector4 - Result vector

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

set(double newX, double newY, double newZ)

public void set(double newX, double newY, double newZ)

Sets vector’s xyz components at a time, w will be set to 1

Parameters:

ParameterTypeDescription
newXdoubleNew X component.
newYdoubleNew Y component.
newZdoubleNew Z component.

set(double newX, double newY, double newZ, double newW)

public void set(double newX, double newY, double newZ, double newW)

Sets vector’s all components at a time

Parameters:

ParameterTypeDescription
newXdoubleNew X component.
newYdoubleNew Y component.
newZdoubleNew Z component.
newWdoubleNew W component.

sub(Vector4 lhs, Vector4 rhs)

public static Vector4 sub(Vector4 lhs, Vector4 rhs)

Operator overloading for - (minus)

Parameters:

ParameterTypeDescription
lhsVector4The left vector
rhsVector4The right vector

Returns: Vector4 - Result vector

toString()

public String toString()

Returns a java.lang.String that represents the current Vector4.

Returns: java.lang.String - A java.lang.String that represents the current Vector4.

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int