Beispiel #1
0
 public static float vectorsCos(warp_Vector a, warp_Vector b)
 // returns the angle between 2 vectors
 {
     a.normalize();
     b.normalize();
     return(a.x * b.x + a.y * b.y + a.z * b.z);
 }
Beispiel #2
0
 public warp_Light(warp_Vector direction, int diffuse, int specular, int highlightSheen, int highlightSpread)
 {
     v = direction.getClone();
     v.normalize();
     this.diffuse         = diffuse;
     this.specular        = specular;
     this.highlightSheen  = highlightSheen;
     this.highlightSpread = highlightSpread;
 }
Beispiel #3
0
 public void regenerateNormal()
 {
     rawNorm = warp_Vector.vectorProduct(p1.pos, p2.pos, p3.pos);
     n       = rawNorm.normalize();
 }
Beispiel #4
0
 public warp_Light(warp_Vector direction, int diffuse)
 {
     v = direction.getClone();
     v.normalize();
     this.diffuse = diffuse;
 }
Beispiel #5
0
 public warp_Light(warp_Vector direction)
 {
     v = direction.getClone();
     v.normalize();
 }