public class BlockVector extends Vector
原文:A vector with a hash function that floors the X, Y, Z components, a la BlockVector in WorldEdit. BlockVectors can be used in hash sets and hash maps. Be aware that BlockVectors are mutable, but it is important that BlockVectors are never changed once put into a hash set or hash map.
构造器和说明 |
---|
BlockVector()
使用原点坐标来创建向量.
|
BlockVector(double x,
double y,
double z)
使用给定双精度浮点数坐标来创建向量.
|
BlockVector(float x,
float y,
float z)
使用给定单精度浮点数坐标来创建向量.
|
BlockVector(int x,
int y,
int z)
使用给定整数坐标来创建向量.
|
BlockVector(Vector vec)
使用另一个向量来创建向量.
|
限定符和类型 | 方法和说明 |
---|---|
BlockVector |
clone()
克隆生成新的方块向量.
|
static BlockVector |
deserialize(java.util.Map<java.lang.String,java.lang.Object> args) |
boolean |
equals(java.lang.Object obj)
检查是否同另一个对象相等.
|
int |
hashCode()
返回这个向量的哈希码.
|
add, angle, checkFinite, copy, crossProduct, distance, distanceSquared, divide, dot, getBlockX, getBlockY, getBlockZ, getCrossProduct, getEpsilon, getMaximum, getMidpoint, getMinimum, getRandom, getX, getY, getZ, isInAABB, isInSphere, length, lengthSquared, midpoint, multiply, multiply, multiply, multiply, normalize, serialize, setX, setX, setX, setY, setY, setY, setZ, setZ, setZ, subtract, toBlockVector, toLocation, toLocation, toString, zero
public BlockVector()
原文:Construct the vector with all components as 0.
public BlockVector(Vector vec)
原文:Construct the vector with another vector.
vec
- 另一个向量。public BlockVector(int x, int y, int z)
原文:Construct the vector with provided integer components.
x
- X坐标y
- Y坐标z
- Z坐标public BlockVector(double x, double y, double z)
原文:Construct the vector with provided double components.
x
- X坐标y
- Y坐标z
- Z坐标public BlockVector(float x, float y, float z)
原文:Construct the vector with provided float components.
x
- X坐标y
- Y坐标z
- Z坐标public boolean equals(java.lang.Object obj)
原文:Checks if another object is equivalent.
public int hashCode()
原文:Returns a hash code for this vector.
public BlockVector clone()
原文:Get a new block vector.
public static BlockVector deserialize(java.util.Map<java.lang.String,java.lang.Object> args)