Class Vec3Impl
- java.lang.Object
-
- com.gtnewhorizon.structurelib.util.Vec3Impl
-
-
Field Summary
Fields Modifier and Type Field Description static Vec3ImplNULL_VECTOR
-
Constructor Summary
Constructors Constructor Description Vec3Impl(int in0, int in1, int in2)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Vec3Implabs()Vec3Impladd(int pos0, int pos1, int pos2)Vec3Impladd(Vec3Impl pos)intcompareTo(Vec3Impl o)Vec3ImplcrossProduct(Vec3Impl vec)doubledistanceSq(double x, double y, double z, boolean useCenter)doubledistanceSq(Vec3Impl to)doubledistanceSq(IPosition to, boolean useCenter)booleanequals(java.lang.Object o)intget(int index)Gets the coordinate.intget0()Gets the X coordinate.intget1()Gets the Y coordinate.intget2()Gets the Z coordinate.static Vec3ImplgetFromPool(int in0, int in1, int in2)THIS WILL CAUSE THIS VECTOR TO PERMANENTLY RESIDE IN STATIC MEMORY.inthashCode()intmanhattanDistance(Vec3Impl to)Vec3Imploffset(net.minecraftforge.common.util.ForgeDirection facing, int n)Vec3Implsub(int pos0, int pos1, int pos2)Vec3Implsub(Vec3Impl pos)java.lang.StringtoString()booleanwithinDistance(Vec3Impl to, double distance)booleanwithinDistance(IPosition to, double distance)
-
-
-
Field Detail
-
NULL_VECTOR
public static final Vec3Impl NULL_VECTOR
-
-
Method Detail
-
getFromPool
public static Vec3Impl getFromPool(int in0, int in1, int in2)
THIS WILL CAUSE THIS VECTOR TO PERMANENTLY RESIDE IN STATIC MEMORY. DO NOT USE THIS UNLESS YOU KNOW WHAT YOU ARE DOING!!!
-
compareTo
public int compareTo(Vec3Impl o)
- Specified by:
compareToin interfacejava.lang.Comparable<Vec3Impl>
-
get
public int get(int index)
Gets the coordinate.
-
get0
public int get0()
Gets the X coordinate.
-
get1
public int get1()
Gets the Y coordinate.
-
get2
public int get2()
Gets the Z coordinate.
-
offset
public Vec3Impl offset(net.minecraftforge.common.util.ForgeDirection facing, int n)
-
add
public Vec3Impl add(int pos0, int pos1, int pos2)
-
sub
public Vec3Impl sub(int pos0, int pos1, int pos2)
-
withinDistance
public boolean withinDistance(Vec3Impl to, double distance)
-
withinDistance
public boolean withinDistance(IPosition to, double distance)
-
distanceSq
public double distanceSq(Vec3Impl to)
-
distanceSq
public double distanceSq(IPosition to, boolean useCenter)
-
distanceSq
public double distanceSq(double x, double y, double z, boolean useCenter)
-
manhattanDistance
public int manhattanDistance(Vec3Impl to)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
abs
public Vec3Impl abs()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-