com.threed.jpct
Class WorldProcessor

java.lang.Object
  extended bycom.threed.jpct.WorldProcessor

public final class WorldProcessor
extends java.lang.Object

A WorldProcessor does some object processing for the World. By default, jPCT uses a single threaded processor, which is fine for normal scenes. For high object counts (i.e. thousands of objects, particle systems etc), especially in scenes where most of the objects aren't visible, it can improve performance to assign a multi threaded processor to the world instead. You can do this by instantiating this class with the thread count that you want to use and assign it to the world.


Constructor Summary
WorldProcessor(int threads)
          Creates a new world processor with the given number of processing threads and a granularity of 2.
WorldProcessor(int threads, int granularity)
          Creates a new world processor with the given number of processing threads.
 
Method Summary
 void finalize()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorldProcessor

public WorldProcessor(int threads)
Creates a new world processor with the given number of processing threads and a granularity of 2.

Parameters:
threads - the number of threads

WorldProcessor

public WorldProcessor(int threads,
                      int granularity)
Creates a new world processor with the given number of processing threads.

Parameters:
threads - the number of threads
granularity - the granularity, i.e. the number of work units that are given to each thread.
Method Detail

finalize

public void finalize()