From: <ma...@us...> - 2003-08-23 21:22:50
|
Update of /cvsroot/jrman/drafts/src/org/jrman/render In directory sc8-pr-cvs1:/tmp/cvs-serv20980/src/org/jrman/render Modified Files: Sampler.java Log Message: Implemented shadowspotlight Added random number generator Index: Sampler.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/Sampler.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Sampler.java 20 Aug 2003 20:41:21 -0000 1.9 --- Sampler.java 23 Aug 2003 21:22:46 -0000 1.10 *************** *** 26,29 **** --- 26,30 ---- import org.jrman.util.Calc; import org.jrman.util.Constants; + import org.jrman.util.Rand; public class Sampler { *************** *** 106,111 **** float x = min.x + sampleWidth * .5f; for (int column = 0; column < width; column++) { ! float jx = x + ((float) Math.random() - .5f) * sampleWidth; ! float jy = y + ((float) Math.random() - .5f) * sampleHeight; samplePoints[row * width + column].init(jx, jy); x += sampleWidth; --- 107,112 ---- float x = min.x + sampleWidth * .5f; for (int column = 0; column < width; column++) { ! float jx = x + (Rand.uniform() - .5f) * sampleWidth; ! float jy = y + (Rand.uniform() - .5f) * sampleHeight; samplePoints[row * width + column].init(jx, jy); x += sampleWidth; |