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
Constructor | Description |
---|---|
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
Field | Description |
---|---|
w | The w component. |
x | The x component. |
y | The y component. |
z | The z component. |
Methods
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
vec | Vector3 | Vec. |
w | double | The width. |
Vector4(Vector3 vec)
public Vector4(Vector3 vec)
Initializes a new instance of the Vector4 struct.
Parameters:
Parameter | Type | Description |
---|---|---|
vec | Vector3 | Vec. |
Vector4(FVector4 vec)
public Vector4(FVector4 vec)
Initializes a new instance of the Vector4 struct.
Parameters:
Parameter | Type | Description |
---|---|---|
vec | FVector4 | Vec. |
Vector4(double x, double y, double z)
public Vector4(double x, double y, double z)
Initializes a new instance of the Vector4 struct.
Parameters:
Parameter | Type | Description |
---|---|---|
x | double | The x coordinate. |
y | double | The y coordinate. |
z | double | The 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:
Parameter | Type | Description |
---|---|---|
x | double | The x coordinate. |
y | double | The y coordinate. |
z | double | The z coordinate. |
w | double | The 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:
Parameter | Type | Description |
---|---|---|
lhs | Vector4 | The left vector |
rhs | Vector4 | The 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:
Parameter | Type | Description |
---|---|---|
other | Vector4 |
Returns: int
copyFrom(Vector4 src)
public void copyFrom(Vector4 src)
Parameters:
Parameter | Type | Description |
---|---|---|
src | Vector4 |
create(Vector4 v)
public static FVector4 create(Vector4 v)
Explicit conversion operator to cast Vector4 to FVector4
Parameters:
Parameter | Type | Description |
---|---|---|
v | Vector4 |
Returns: FVector4
equals(Object obj)
public boolean equals(Object obj)
Check if two vectors are equal
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.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:
Parameter | Type | Description |
---|---|---|
lhs | Vector4 | The left vector |
rhs | Vector4 | The right vector |
Returns: Vector4 - Result vector
mul(Vector4 lhs, double rhs)
public static Vector4 mul(Vector4 lhs, double rhs)
Operator overloading for *
Parameters:
Parameter | Type | Description |
---|---|---|
lhs | Vector4 | The left vector |
rhs | double | The 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:
Parameter | Type | Description |
---|---|---|
newX | double | New X component. |
newY | double | New Y component. |
newZ | double | New 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:
Parameter | Type | Description |
---|---|---|
newX | double | New X component. |
newY | double | New Y component. |
newZ | double | New Z component. |
newW | double | New W component. |
sub(Vector4 lhs, Vector4 rhs)
public static Vector4 sub(Vector4 lhs, Vector4 rhs)
Operator overloading for - (minus)
Parameters:
Parameter | Type | Description |
---|---|---|
lhs | Vector4 | The left vector |
rhs | Vector4 | The 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:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |