public class Vec3
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
double |
xCoord
X coordinate of Vec3D
|
double |
yCoord
Y coordinate of Vec3D
|
double |
zCoord
Z coordinate of Vec3D
|
| Modifier | Constructor and Description |
|---|---|
protected |
Vec3(double p_i1108_1_,
double p_i1108_3_,
double p_i1108_5_) |
| Modifier and Type | Method and Description |
|---|---|
Vec3 |
addVector(double p_72441_1_,
double p_72441_3_,
double p_72441_5_)
Adds the specified x,y,z vector components to this vector and returns the resulting vector.
|
static Vec3 |
createVectorHelper(double p_72443_0_,
double p_72443_2_,
double p_72443_4_)
Static method for creating a new Vec3D given the three x,y,z values.
|
Vec3 |
crossProduct(Vec3 p_72431_1_)
Returns a new vector with the result of this vector x the specified vector.
|
double |
distanceTo(Vec3 p_72438_1_)
Euclidean distance between this and the specified vector, returned as double.
|
double |
dotProduct(Vec3 p_72430_1_) |
Vec3 |
getIntermediateWithXValue(Vec3 p_72429_1_,
double p_72429_2_)
Returns a new vector with x value equal to the second parameter, along the line between this vector and the
passed in vector, or null if not possible.
|
Vec3 |
getIntermediateWithYValue(Vec3 p_72435_1_,
double p_72435_2_)
Returns a new vector with y value equal to the second parameter, along the line between this vector and the
passed in vector, or null if not possible.
|
Vec3 |
getIntermediateWithZValue(Vec3 p_72434_1_,
double p_72434_2_)
Returns a new vector with z value equal to the second parameter, along the line between this vector and the
passed in vector, or null if not possible.
|
double |
lengthVector()
Returns the length of the vector.
|
Vec3 |
normalize()
Normalizes the vector to a length of 1 (except if it is the zero vector)
|
void |
rotateAroundX(float p_72440_1_)
Rotates the vector around the x axis by the specified angle.
|
void |
rotateAroundY(float p_72442_1_)
Rotates the vector around the y axis by the specified angle.
|
void |
rotateAroundZ(float p_72446_1_)
Rotates the vector around the z axis by the specified angle.
|
protected Vec3 |
setComponents(double p_72439_1_,
double p_72439_3_,
double p_72439_5_)
Sets the x,y,z components of the vector as specified.
|
double |
squareDistanceTo(double p_72445_1_,
double p_72445_3_,
double p_72445_5_)
The square of the Euclidean distance between this and the vector of x,y,z components passed in.
|
double |
squareDistanceTo(Vec3 p_72436_1_)
The square of the Euclidean distance between this and the specified vector.
|
Vec3 |
subtract(Vec3 p_72444_1_)
Returns a new vector with the result of the specified vector minus this.
|
java.lang.String |
toString() |
public double xCoord
public double yCoord
public double zCoord
public static Vec3 createVectorHelper(double p_72443_0_, double p_72443_2_, double p_72443_4_)
protected Vec3 setComponents(double p_72439_1_, double p_72439_3_, double p_72439_5_)
public Vec3 subtract(Vec3 p_72444_1_)
public Vec3 normalize()
public double dotProduct(Vec3 p_72430_1_)
public Vec3 crossProduct(Vec3 p_72431_1_)
public Vec3 addVector(double p_72441_1_, double p_72441_3_, double p_72441_5_)
public double distanceTo(Vec3 p_72438_1_)
public double squareDistanceTo(Vec3 p_72436_1_)
public double squareDistanceTo(double p_72445_1_,
double p_72445_3_,
double p_72445_5_)
public double lengthVector()
public Vec3 getIntermediateWithXValue(Vec3 p_72429_1_, double p_72429_2_)
public Vec3 getIntermediateWithYValue(Vec3 p_72435_1_, double p_72435_2_)
public Vec3 getIntermediateWithZValue(Vec3 p_72434_1_, double p_72434_2_)
public java.lang.String toString()
toString in class java.lang.Objectpublic void rotateAroundX(float p_72440_1_)
public void rotateAroundY(float p_72442_1_)
public void rotateAroundZ(float p_72446_1_)