Vector4

Inheritance: java.lang.Object

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

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

一个具有四个分量的向量。

构造函数

构造函数描述
Vector4(Vector3 vec, double w)初始化 Vector4 结构的新实例。
Vector4(Vector3 vec)初始化 Vector4 结构的新实例。
Vector4(FVector4 vec)初始化 Vector4 结构的新实例。
Vector4(double x, double y, double z)初始化 Vector4 结构的新实例。
Vector4(double x, double y, double z, double w)初始化 Vector4 结构的新实例。
Vector4()

字段

字段描述
ww 分量。
xx 分量。
yy 分量。
zz 分量。

方法

方法描述
add(Vector4 lhs, Vector4 rhs)运算符重载 +
clone()
compareTo(Vector4 other)将当前向量与另一个实例进行比较。
copyFrom(Vector4 src)
create(Vector4 v)显式转换运算符,将 Vector4 转换为 FVector4
equals(Object obj)检查两个向量是否相等
getClass()
hashCode()获取此向量的哈希码。
mul(Vector4 lhs, Vector4 rhs)运算符重载 *
mul(Vector4 lhs, double rhs)运算符重载 *
notify()
notifyAll()
set(double newX, double newY, double newZ)一次性设置向量的 xyz 分量,w 将被设为 1。
set(double newX, double newY, double newZ, double newW)一次性设置向量的所有分量。
sub(Vector4 lhs, Vector4 rhs)针对 -(减号)的运算符重载
toString()返回一个 java.lang.String,表示当前的 Vector4
wait()
wait(long arg0)
wait(long arg0, int arg1)

Vector4(Vector3 vec, double w)

public Vector4(Vector3 vec, double w)

初始化 Vector4 结构的新实例。

Parameters:

参数类型描述
vecVector3向量。
wdouble宽度。

Vector4(Vector3 vec)

public Vector4(Vector3 vec)

初始化 Vector4 结构的新实例。

Parameters:

参数类型描述
vecVector3向量。

Vector4(FVector4 vec)

public Vector4(FVector4 vec)

初始化 Vector4 结构的新实例。

Parameters:

参数类型描述
vecFVector4向量。

Vector4(double x, double y, double z)

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

初始化 Vector4 结构的新实例。

Parameters:

参数类型描述
xdoublex 坐标。
ydoubley 坐标。
zdoublez 坐标。

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

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

初始化 Vector4 结构的新实例。

Parameters:

参数类型描述
xdoublex 坐标。
ydoubley 坐标。
zdoublez 坐标。
wdouble宽度。

Vector4()

public Vector4()

w

public double w

w 分量。

x

public double x

x 分量。

y

public double y

y 分量。

z

public double z

z 分量。

add(Vector4 lhs, Vector4 rhs)

public static Vector4 add(Vector4 lhs, Vector4 rhs)

运算符重载 +

Parameters:

参数类型描述
lhsVector4左向量
rhsVector4右向量

Returns: Vector4 - Result vector

clone()

public Vector4 clone()

克隆当前实例

Returns: Vector4

compareTo(Vector4 other)

public int compareTo(Vector4 other)

将当前向量与另一个实例进行比较。

Parameters:

参数类型描述
otherVector4

Returns: int

copyFrom(Vector4 src)

public void copyFrom(Vector4 src)

Parameters:

参数类型描述
srcVector4

create(Vector4 v)

public static FVector4 create(Vector4 v)

显式转换运算符,将 Vector4 转换为 FVector4

Parameters:

参数类型描述
vVector4

Returns: FVector4

equals(Object obj)

public boolean equals(Object obj)

检查两个向量是否相等

Parameters:

参数类型描述
objjava.lang.Object

Returns: 布尔

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

hashCode()

public int hashCode()

获取此向量的哈希码。

Returns: int

mul(Vector4 lhs, Vector4 rhs)

public static Vector4 mul(Vector4 lhs, Vector4 rhs)

运算符重载 *

Parameters:

参数类型描述
lhsVector4左向量
rhsVector4右向量

Returns: Vector4 - Result vector

mul(Vector4 lhs, double rhs)

public static Vector4 mul(Vector4 lhs, double rhs)

运算符重载 *

Parameters:

参数类型描述
lhsVector4左向量
rhsdouble右侧的 double 值

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)

一次性设置向量的 xyz 分量,w 将被设为 1。

Parameters:

参数类型描述
newXdouble新的 X 分量。
newYdouble新的 Y 分量。
newZdouble新的 Z 分量。

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

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

一次性设置向量的所有分量。

Parameters:

参数类型描述
newXdouble新的 X 分量。
newYdouble新的 Y 分量。
newZdouble新的 Z 分量。
newWdouble新的 W 组件。

sub(Vector4 lhs, Vector4 rhs)

public static Vector4 sub(Vector4 lhs, Vector4 rhs)

针对 -(减号)的运算符重载

Parameters:

参数类型描述
lhsVector4左向量
rhsVector4右向量

Returns: Vector4 - Result vector

toString()

public String toString()

返回一个 java.lang.String,表示当前的 Vector4

Returns: java.lang.String - 一个表示当前 Vector4 的 java.lang.String。

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

参数类型描述
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

参数类型描述
arg0long
arg1int