gnu.gleem.linalg
Class Vec4f

java.lang.Object
  |
  +--gnu.gleem.linalg.Vec4f

public class Vec4f
extends java.lang.Object

4-element single-precision vector


Constructor Summary
Vec4f()
           
Vec4f(float x, float y, float z, float w)
           
Vec4f(Vec4f arg)
           
 
Method Summary
 void add(Vec4f b)
          this = this + b
 void add(Vec4f a, Vec4f b)
          this = a + b
 Vec4f addScaled(float s, Vec4f arg)
          Returns this + s * arg; creates new vector
 void addScaled(Vec4f a, float s, Vec4f b)
          this = a + s * b
 Vec4f copy()
           
 float dot(Vec4f arg)
           
 float get(int i)
          Gets the ith component, 0 <= i < 4
 float length()
           
 float lengthSquared()
           
 Vec4f minus(Vec4f arg)
          Returns this - arg; creates new vector
 void normalize()
           
 Vec4f plus(Vec4f arg)
          Returns this + arg; creates new vector
 void scale(float val)
          this = this * val
 void set(float x, float y, float z, float w)
           
 void set(int i, float val)
          Sets the ith component, 0 <= i < 4
 void set(Vec4f arg)
           
 void setW(float w)
           
 void setX(float x)
           
 void setY(float y)
           
 void setZ(float z)
           
 void sub(Vec4f b)
          this = this - b
 void sub(Vec4f a, Vec4f b)
          this = a - b
 Vec4f times(float val)
          Returns this * val; creates new vector
 java.lang.String toString()
           
 Vecf toVecf()
           
 float w()
           
 float x()
           
 float y()
           
 float z()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Vec4f

public Vec4f()

Vec4f

public Vec4f(Vec4f arg)

Vec4f

public Vec4f(float x,
             float y,
             float z,
             float w)
Method Detail

copy

public Vec4f copy()

set

public void set(Vec4f arg)

set

public void set(float x,
                float y,
                float z,
                float w)

set

public void set(int i,
                float val)
Sets the ith component, 0 <= i < 4


get

public float get(int i)
Gets the ith component, 0 <= i < 4


x

public float x()

y

public float y()

z

public float z()

w

public float w()

setX

public void setX(float x)

setY

public void setY(float y)

setZ

public void setZ(float z)

setW

public void setW(float w)

dot

public float dot(Vec4f arg)

length

public float length()

lengthSquared

public float lengthSquared()

normalize

public void normalize()

times

public Vec4f times(float val)
Returns this * val; creates new vector


scale

public void scale(float val)
this = this * val


plus

public Vec4f plus(Vec4f arg)
Returns this + arg; creates new vector


add

public void add(Vec4f b)
this = this + b


add

public void add(Vec4f a,
                Vec4f b)
this = a + b


addScaled

public Vec4f addScaled(float s,
                       Vec4f arg)
Returns this + s * arg; creates new vector


addScaled

public void addScaled(Vec4f a,
                      float s,
                      Vec4f b)
this = a + s * b


minus

public Vec4f minus(Vec4f arg)
Returns this - arg; creates new vector


sub

public void sub(Vec4f b)
this = this - b


sub

public void sub(Vec4f a,
                Vec4f b)
this = a - b


toVecf

public Vecf toVecf()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object