public class Vector
extends java.lang.Object
构造器和说明 |
---|
Vector(float x,
float y,
float z)
构造AR向量
|
限定符和类型 | 方法和说明 |
---|---|
static Vector |
add(Vector lhs,
Vector rhs)
添加两个向量
|
static Vector |
cross(Vector lhs,
Vector rhs)
获取两个向量的外积
|
static float |
dot(Vector lhs,
Vector rhs)
获取两个向量的点积
|
float |
getX()
获取X坐标
|
float |
getY()
获取Y坐标
|
float |
getZ()
获取Z坐标
|
float |
length() |
float |
lengthSquared() |
Vector |
negated()
反方向向量
|
Vector |
scaled(float a)
统一缩放向量
|
void |
setX(float x)
设置x坐标
|
void |
setY(float y)
设置y坐标
|
void |
setZ(float z)
设置z坐标
|
static Vector |
subtract(Vector lhs,
Vector rhs)
减去两个向量
|
public void setX(float x)
x
- public float getX()
public void setY(float y)
y
- public float getY()
public float getZ()
public void setZ(float z)
z
- public Vector scaled(float a)
public Vector negated()
public float length()
public float lengthSquared()