Package org.sunflow.math
Class Vector3
- java.lang.Object
-
- org.sunflow.math.Vector3
-
public final class Vector3 extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Vector3add(Vector3 v1, Vector3 v2, Vector3 dest)static Vector3cross(Vector3 v1, Vector3 v2, Vector3 dest)static Vector3decode(short n)static Vector3decode(short n, Vector3 dest)Vector3div(float d)Vector3div(float d, Vector3 dest)floatdot(float vx, float vy, float vz)static floatdot(Vector3 v1, Vector3 v2)shortencode()floatget(int i)floatlength()floatlengthSquared()Vector3mul(float s)Vector3mul(float s, Vector3 dest)Vector3negate()Vector3negate(Vector3 dest)Vector3normalize()Vector3normalize(Vector3 dest)floatnormalizeLength()Vector3set(float x, float y, float z)Vector3set(Vector3 v)static Vector3sub(Vector3 v1, Vector3 v2, Vector3 dest)java.lang.StringtoString()
-
-
-
Constructor Detail
-
Vector3
public Vector3()
-
Vector3
public Vector3(float x, float y, float z)
-
Vector3
public Vector3(Vector3 v)
-
-
Method Detail
-
decode
public static final Vector3 decode(short n)
-
encode
public final short encode()
-
get
public float get(int i)
-
length
public final float length()
-
lengthSquared
public final float lengthSquared()
-
negate
public final Vector3 negate()
-
mul
public final Vector3 mul(float s)
-
div
public final Vector3 div(float d)
-
normalizeLength
public final float normalizeLength()
-
normalize
public final Vector3 normalize()
-
set
public final Vector3 set(float x, float y, float z)
-
dot
public final float dot(float vx, float vy, float vz)
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-