Class iicm.utils3d.Vec3f
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class iicm.utils3d.Vec3f
java.lang.Object
   |
   +----iicm.utils3d.Vec3f
  -  public final class Vec3f
  -  extends Object
Vec3f - small utilities for 3D vectors.
Copyright (c) 1997 IICM
   
  -   value_ value_
-  3D vector of values
  
-   X X
-  
  
-   Y Y
-  
  
-   Z Z
-  
   
  -   Vec3f() Vec3f()
-  constructor (0, 0, 0)
  
-   Vec3f(float, float, float) Vec3f(float, float, float)
-  constructor (x, y, z)
  
-   Vec3f(float[]) Vec3f(float[])
-  constructor (a[0], a[1], a[2]).
   
  -   assign(float, float, float) assign(float, float, float)
-  assignment (x, y, z)
  
-   assign(float[]) assign(float[])
-  assignment (a[0], a[1], a[2]).
  
-   assign(Vec3f) assign(Vec3f)
-  assignment (copying, v = b)
  
-   cross(float[], float[]) cross(float[], float[])
-  
  
-   cross(Vec3f, Vec3f) cross(Vec3f, Vec3f)
-  assign cross product a X b to this vector.
  
-   decrease(float[]) decrease(float[])
-  
  
-   decrease(Vec3f) decrease(Vec3f)
-  decrease (v -= b)
  
-   dot(float[], float[]) dot(float[], float[])
-  
  
-   dot(Vec3f, Vec3f) dot(Vec3f, Vec3f)
-  dot product.
  
-   getOrthogonalVector(float[], float[]) getOrthogonalVector(float[], float[])
-  find a vector that is orthogonal to non-zero vector v.
  
-   getRotationAngle(Vec3f) getRotationAngle(Vec3f)
-  get the angle which the xy plane must be rotatated about the
Y-axis (unchanged) such that the new normal vector (Z-axis)
points towards start
  
-   increase(float[]) increase(float[])
-  
  
-   increase(Vec3f) increase(Vec3f)
-  increase (v += b)
  
-   negate() negate()
-  negate (v = -v)
  
-   normalize() normalize()
-  normalize.
  
-   print(float[]) print(float[])
-  print a 3D float array (debugging tool)
  
-   rayat(float[], float, float[]) rayat(float[], float, float[])
-  ray equation (a + t * b)
  
-   scale(float) scale(float)
-  scale by a scalar
  
-   scale(float[], float) scale(float[], float)
-  
  
-   sincrease(float, float[]) sincrease(float, float[])
-  
  
-   sincrease(float, Vec3f) sincrease(float, Vec3f)
-  sincrease (v += f * b).
  
-   slerpNorm(float[], int, float[], int, float, float[], int) slerpNorm(float[], int, float[], int, float, float[], int)
-  spherical linear interpolation of 3D vector.
  
-   toString() toString()
-  conversion to string: "(x, y, z)".
   
 value_
value_
  public float value_[]
  -  3D vector of values
 X
X
  public final static int X
 Y
Y
  public final static int Y
 Z
Z
  public final static int Z
   
 Vec3f
Vec3f
  public Vec3f()
  -  constructor (0, 0, 0)
 Vec3f
Vec3f
  public Vec3f(float x,
               float y,
               float z)
  -  constructor (x, y, z)
 Vec3f
Vec3f
  public Vec3f(float a[])
  -  constructor (a[0], a[1], a[2]). values are copied into internal array.
   
 assign
assign
  public void assign(float x,
                     float y,
                     float z)
  -  assignment (x, y, z)
 assign
assign
  public void assign(float a[])
  -  assignment (a[0], a[1], a[2]). values are copied into internal array.
 assign
assign
  public void assign(Vec3f b)
  -  assignment (copying, v = b)
 negate
negate
  public void negate()
  -  negate (v = -v)
 increase
increase
  public void increase(Vec3f b)
  -  increase (v += b)
 increase
increase
  public void increase(float w[])
 decrease
decrease
  public void decrease(Vec3f b)
  -  decrease (v -= b)
 decrease
decrease
  public void decrease(float w[])
 sincrease
sincrease
  public void sincrease(float f,
                        Vec3f b)
  -  sincrease (v += f * b). increase by a scaled vector
 sincrease
sincrease
  public void sincrease(float f,
                        float w[])
 rayat
rayat
  public void rayat(float a[],
                    float t,
                    float b[])
  -  ray equation (a + t * b)
 scale
scale
  public void scale(float f)
  -  scale by a scalar
 scale
scale
  public static void scale(float v[],
                           float f)
 dot
dot
  public static float dot(Vec3f a,
                          Vec3f b)
  -  dot product. < a . b > E.g. dot (a, a) is the square norm of a
 dot
dot
  public static float dot(float u[],
                          float v[])
 cross
cross
  public void cross(Vec3f a,
                    Vec3f b)
  -  assign cross product a X b to this vector.
do not call with "this" as either argument.
 cross
cross
  public void cross(float u[],
                    float v[])
 normalize
normalize
  public float normalize()
  -  normalize. return old length
 getOrthogonalVector
getOrthogonalVector
  public static void getOrthogonalVector(float v[],
                                         float axis[])
  -  find a vector that is orthogonal to non-zero vector v.
write result (normalized) into axis
 getRotationAngle
getRotationAngle
  public static float getRotationAngle(Vec3f start)
  -  get the angle which the xy plane must be rotatated about the
Y-axis (unchanged) such that the new normal vector (Z-axis)
points towards start
  
    -  Returns:
    
-  angle off rotation
  
 
 slerpNorm
slerpNorm
  public static void slerpNorm(float a1[],
                               int a1offs,
                               float a2[],
                               int a2offs,
                               float t,
                               float a[],
                               int aoffs)
  -  spherical linear interpolation of 3D vector. return a vector that
lies "at t between a1 and a2", i.e. a1 for t == 0, a2 for t == 1
and an interpolation of a1 and a2 for values between 0 and 1.
a1offs and a2offs allow a1 and a2 to start at an offset.
result is written at aoffs into array a.
 toString
toString
  public String toString()
  -  conversion to string: "(x, y, z)". E.g.: System.out.println (v);
  
    -  Overrides:
    
-  toString in class Object
  
 
 print
print
  public static String print(float v[])
  -  print a 3D float array (debugging tool)
All Packages  Class Hierarchy  This Package  Previous  Next  Index