com.bulletphysics.linearmath
Class VectorUtil

java.lang.Object
  extended by com.bulletphysics.linearmath.VectorUtil

public class VectorUtil
extends Object

Utility functions for vectors.


Constructor Summary
VectorUtil()
           
 
Method Summary
static void add(Vector3f dest, Vector3f v1, Vector3f v2)
           
static void add(Vector3f dest, Vector3f v1, Vector3f v2, Vector3f v3)
           
static void add(Vector3f dest, Vector3f v1, Vector3f v2, Vector3f v3, Vector3f v4)
           
static int closestAxis4(Vector4f vec)
           
static void cross3(Vector3f dest, Vector4f v1, Vector4f v2)
           
static void div(Vector3f dest, Vector3f v1, Vector3f v2)
           
static float dot3(Vector3f v0, Vector4f v1)
           
static float dot3(Vector4f v0, Vector3f v1)
           
static float dot3(Vector4f v0, Vector4f v1)
           
static float getCoord(Vector3f vec, int num)
           
static float lengthSquared3(Vector4f v)
           
static int maxAxis(Vector3f v)
           
static int maxAxis4(Vector4f v)
           
static void mul(Vector3f dest, Vector3f v1, Vector3f v2)
           
static void mulCoord(Vector3f vec, int num, float value)
           
static void normalize3(Vector4f v)
           
static void setCoord(Vector3f vec, int num, float value)
           
static void setInterpolate3(Vector3f dest, Vector3f v0, Vector3f v1, float rt)
           
static void setMax(Vector3f a, Vector3f b)
           
static void setMin(Vector3f a, Vector3f b)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VectorUtil

public VectorUtil()
Method Detail

maxAxis

public static int maxAxis(Vector3f v)

maxAxis4

public static int maxAxis4(Vector4f v)

closestAxis4

public static int closestAxis4(Vector4f vec)

getCoord

public static float getCoord(Vector3f vec,
                             int num)

setCoord

public static void setCoord(Vector3f vec,
                            int num,
                            float value)

mulCoord

public static void mulCoord(Vector3f vec,
                            int num,
                            float value)

setInterpolate3

public static void setInterpolate3(Vector3f dest,
                                   Vector3f v0,
                                   Vector3f v1,
                                   float rt)

add

public static void add(Vector3f dest,
                       Vector3f v1,
                       Vector3f v2)

add

public static void add(Vector3f dest,
                       Vector3f v1,
                       Vector3f v2,
                       Vector3f v3)

add

public static void add(Vector3f dest,
                       Vector3f v1,
                       Vector3f v2,
                       Vector3f v3,
                       Vector3f v4)

mul

public static void mul(Vector3f dest,
                       Vector3f v1,
                       Vector3f v2)

div

public static void div(Vector3f dest,
                       Vector3f v1,
                       Vector3f v2)

setMin

public static void setMin(Vector3f a,
                          Vector3f b)

setMax

public static void setMax(Vector3f a,
                          Vector3f b)

dot3

public static float dot3(Vector4f v0,
                         Vector3f v1)

dot3

public static float dot3(Vector4f v0,
                         Vector4f v1)

dot3

public static float dot3(Vector3f v0,
                         Vector4f v1)

lengthSquared3

public static float lengthSquared3(Vector4f v)

normalize3

public static void normalize3(Vector4f v)

cross3

public static void cross3(Vector3f dest,
                          Vector4f v1,
                          Vector4f v2)