All Packages  This Package  Class Hierarchy  Class Search  Index

Class com.hermetica.vecmath.Vec3f
java.lang.Object
   |
   +----com.hermetica.vecmath.Vec3f

  Summary

public class  Vec3f
     extends java.lang.Object
{
          // Fields 3
     public float x;
     public float y;
     public float z;

          // Constructors 4
     public Vec3f();
     public Vec3f(Vec3f);
     public Vec3f(float, float, float);
     public Vec3f(float[]);

          // Methods 24
     public final void add(Vec3f);
     public final void add(Vec3f, Vec3f);
     public final void cross(Vec3f, Vec3f);
     public final float distance(Vec3f);
     public final float distanceSquared(Vec3f);
     public final float dot(Vec3f);
     public final boolean equals(Vec3f);
     public final void get(float[]);
     public int hashCode();
     public final float length();
     public final float lengthSquared();
     public final void negate();
     public final void negate(Vec3f);
     public final void normalize();
     public final void scale(float);
     public final void scale(float, Vec3f);
     public final void scaleAdd(float, Vec3f, Vec3f);
     public final void set(Vec3d);
     public final void set(Vec3f);
     public final void set(float, float, float);
     public final void set(float[]);
     public final void sub(Vec3f);
     public final void sub(Vec3f, Vec3f);
     public String toString();
}




  Fields

· x

Summary  |  Top

   public float x

The x coordinate


· y

Summary  |  Top
   public float y

The y coordinate


· z

Summary  |  Top
   public float z

The z coordinate


  Constructors

· Vec3f

Summary  |  Top

   public Vec3f() 

Constructs and initializes a Vec3f to ( 0, 0, 0 )



· Vec3f

Summary  |  Top
   public Vec3f(float x, 
                float y, 
                float z) 

Constructs and initializes a Vec3f from the specified xyz co-ordinates



· Vec3f

Summary  |  Top
   public Vec3f(float[] ary) 

Constructs and initializes a Vec3f from the array of length 3



· Vec3f

Summary  |  Top
   public Vec3f(Vec3f vec) 

Constructs and initializes a Vec3f from the specified Vec3f



  Methods

· add

Summary  |  Top
   public final void add(Vec3f v1) 

Sets the values of this vector to the vector sum of itself and vector v1.



· add

Summary  |  Top
   public final void add(Vec3f v1, 
                         Vec3f v2) 

Sets the value of this vector to the vector sum of vectors v1 and v2



· cross

Summary  |  Top
   public final void cross(Vec3f v1, 
                           Vec3f v2) 

Sets this vector to be the cross product of vectors v1 and v2



· distance

Summary  |  Top
   public final float distance(Vec3f v1) 

Computes the distance between this vector and vector v1



· distanceSquared

Summary  |  Top
   public final float distanceSquared(Vec3f v1) 

Computes the square of the distance between this vector and vector v1.



· dot

Summary  |  Top
   public final float dot(Vec3f v1) 

Computes the dot product of this vector and vector v1



· equals

Summary  |  Top
   public final boolean equals(Vec3f v1) 

Returns true if all of the data members of Vec3f v1 are equal to the corresponding data members in this Vec3f.



· get

Summary  |  Top
   public final void get(float[] ary) 

Gets the value of this vector and copies the values into v[]



· hashCode

Summary  |  Top
   public int hashCode() 

Returns a hash number based on the data values in this object

Overrides:
hashCode in class Object


· length

Summary  |  Top
   public final float length() 

Returns the length of this vector



· lengthSquared

Summary  |  Top
   public final float lengthSquared() 

Returns the squared length of this vector



· negate

Summary  |  Top
   public final void negate() 

Inverts the value of this vector in place



· negate

Summary  |  Top
   public final void negate(Vec3f v1) 

Sets the value of this vector to the inverse of vector v1



· normalize

Summary  |  Top
   public final void normalize() 

Normalizes this vector in place.



· scale

Summary  |  Top
   public final void scale(float s) 

Sets the value of this vector to the scalar multiplication of the scale factor with this.



· scale

Summary  |  Top
   public final void scale(float s, 
                           Vec3f v1) 

Sets the value of this vector to the scalar multiplication of vector v1.



· scaleAdd

Summary  |  Top
   public final void scaleAdd(float s, 
                              Vec3f v1, 
                              Vec3f v2) 

Sets the value of this vector to the scalar multiplication of vector v1 plus vector v2 ( this = s * v1 + v2 ).



· set

Summary  |  Top
   public final void set(float x, 
                         float y, 
                         float z) 

Sets the value of this vector to the specified xyz co-ordinates



· set

Summary  |  Top
   public final void set(float[] ary) 

Sets the value of this vector to the xyz co-ordinates specified in the array of length 3.



· set

Summary  |  Top
   public final void set(Vec3f v1) 

Sets the value of this vector to the value of vector v1.



· set

Summary  |  Top
   public final void set(Vec3d v1) 

Sets the values of this vector to the value of vector v1



· sub

Summary  |  Top
   public final void sub(Vec3f v1) 

Sets the value of this vector to the vector difference of itself and vector v1 ( this = this - v1 ).



· sub

Summary  |  Top
   public final void sub(Vec3f v1, 
                         Vec3f v2) 

Sets the value of this vector to the vector difference of vectors v1 and v2 ( this = v1 - v2 ).



· toString

Summary  |  Top
   public String toString() 

Returns a String that contains the values of this Vec3f

Overrides:
toString in class Object


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7