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