Package javaforce.gl

Class Vector4

java.lang.Object
javaforce.gl.Vector4

public class Vector4 extends Object
Stores one vector that intersects point (x,y,z) with optional w component (default = 1.0f).
  • Field Details

    • v

      public float[] v
  • Constructor Details

    • Vector4

      public Vector4()
    • Vector4

      public Vector4(float x, float y, float z)
    • Vector4

      public Vector4(float x, float y, float z, float w)
  • Method Details

    • set

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

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

      public void sub(Vector4 a, Vector4 b)
      this = a - b
    • cross

      public void cross(Vector4 a, Vector4 b)
      this = a X b
    • normalize

      public void normalize()
      normalize this vector
    • length

      public float length()
    • lengthSquared

      public float lengthSquared()
    • scale

      public void scale(float s)
    • divide

      public void divide(float d)
    • dot

      public float dot(Vector4 in)
    • length

      public float length(Vector4 in)
    • toString

      public String toString()
      Overrides:
      toString in class Object