Esempio n. 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);
 }
Esempio n. 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;
 }
Esempio n. 3
0
 public void regenerateNormal()
 {
     rawNorm = warp_Vector.vectorProduct(p1.pos, p2.pos, p3.pos);
     n       = rawNorm.normalize();
 }
Esempio n. 4
0
 public warp_Light(warp_Vector direction, int diffuse)
 {
     v = direction.getClone();
     v.normalize();
     this.diffuse = diffuse;
 }
Esempio n. 5
0
 public warp_Light(warp_Vector direction)
 {
     v = direction.getClone();
     v.normalize();
 }