Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.src
Class Vec3

    java.lang.Object
      net.minecraft.src.Vec3

    public class Vec3

extends Object

Field Summary
`double` | `xCoord` X coordinate of Vec3D
`double` | `yCoord` Y coordinate of Vec3D
`double` | `zCoord` Z coordinate of Vec3D

Method Summary
`Vec3` | `addVector(double par1, double par3, double par5)` Adds the specified x,y,z vector components to this vector and returns the resulting vector.
`static Vec3` | `createVectorHelper(double par0, double par2, double par4)` Static method for creating a new Vec3D given the three x,y,z values.
`Vec3` | `crossProduct(Vec3 par1Vec3)`
`double` | `distanceTo(Vec3 par1Vec3)` Euclidean distance between this and the specified vector, returned as double.
`double` | `dotProduct(Vec3 par1Vec3)`
`Vec3` | `getIntermediateWithXValue(Vec3 par1Vec3, double par2)` 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 par1Vec3, double par2)` 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 par1Vec3, double par2)` 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.
`static Vec3Pool` | `getVec3Pool()`
`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 par1)` Rotates the vector around the x axis by the specified angle.
`void` | `rotateAroundY(float par1)` Rotates the vector around the y axis by the specified angle.
`void` | `rotateAroundZ(float par1)`
`double` | `squareDistanceTo(double par1, double par3, double par5)` The square of the Euclidean distance between this and the vector of x,y,z components passed in.
`double` | `squareDistanceTo(Vec3 par1Vec3)` The square of the Euclidean distance between this and the specified vector.
`Vec3` | `subtract(Vec3 par1Vec3)`
`String` | `toString()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### xCoord

    public double xCoord

  X coordinate of Vec3D

### yCoord

    public double yCoord

  Y coordinate of Vec3D

### zCoord

    public double zCoord

  Z coordinate of Vec3D

Method Detail

### createVectorHelper

    public static Vec3 createVectorHelper(double par0,
                                          double par2,
                                          double par4)

  Static method for creating a new Vec3D given the three x,y,z values. This is only called from the other static method which creates and places it in the list.

### getVec3Pool

    public static Vec3Pool getVec3Pool()

### normalize

    public Vec3 normalize()

  Normalizes the vector to a length of 1 (except if it is the zero vector)

### dotProduct

    public double dotProduct(Vec3 par1Vec3)

### subtract

    public Vec3 subtract(Vec3 par1Vec3)

### crossProduct

    public Vec3 crossProduct(Vec3 par1Vec3)

### addVector

    public Vec3 addVector(double par1,
                          double par3,
                          double par5)

  Adds the specified x,y,z vector components to this vector and returns the resulting vector. Does not change this vector.

### distanceTo

    public double distanceTo(Vec3 par1Vec3)

  Euclidean distance between this and the specified vector, returned as double.

### squareDistanceTo

    public double squareDistanceTo(Vec3 par1Vec3)

  The square of the Euclidean distance between this and the specified vector.

### squareDistanceTo

    public double squareDistanceTo(double par1,
                                   double par3,
                                   double par5)

  The square of the Euclidean distance between this and the vector of x,y,z components passed in.

### lengthVector

    public double lengthVector()

  Returns the length of the vector.

### getIntermediateWithXValue

    public Vec3 getIntermediateWithXValue(Vec3 par1Vec3,
                                          double par2)

  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.

### getIntermediateWithYValue

    public Vec3 getIntermediateWithYValue(Vec3 par1Vec3,
                                          double par2)

  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.

### getIntermediateWithZValue

    public Vec3 getIntermediateWithZValue(Vec3 par1Vec3,
                                          double par2)

  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.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### rotateAroundX

    public void rotateAroundX(float par1)

  Rotates the vector around the x axis by the specified angle.

### rotateAroundY

    public void rotateAroundY(float par1)

  Rotates the vector around the y axis by the specified angle.

### rotateAroundZ

    public void rotateAroundZ(float par1)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD