   Problems with building kd-tree
  hi:  currently i'm building the kd-tree for my ray tracer.  But something strange happened , the first time building cost 60% time of that of the rest building.  For example , first time building kd-tree takes me about 200 seconds 500 ms, while the second or the third one cost as mush as 750 ms.  I've checked the memory leak of my demo with VLD, but there is no memory leak in it.  So what's the problem with my code??  Any idea is really appreciated!!!   
  Why are you rebuilding your kd tree over and over?   ;Quote:So what's the problem with my code ??We can't know.Anyways, try looking at other kd-tree implementations, especially on the the forum on ray tracing: "kd tree compiler".   