com.jme3.renderer.queue
クラス RenderQueue

java.lang.Object
  上位を拡張 com.jme3.renderer.queue.RenderQueue

public class RenderQueue
extends java.lang.Object

RenderQueue is used to queue up and sort geometries for rendering.


入れ子のクラスの概要
static class RenderQueue.Bucket
          The render queue Bucket specifies the bucket to which the spatial will be placed when rendered.
static class RenderQueue.ShadowMode
          ShadowMode is a marker used to specify how shadow effects should treat the spatial.
 
コンストラクタの概要
RenderQueue()
          Creates a new RenderQueue, the default comparators are used for all geometry lists.
 
メソッドの概要
 void addToQueue(Geometry g, RenderQueue.Bucket bucket)
          Adds a geometry to the given bucket.
 void addToShadowQueue(Geometry g, RenderQueue.ShadowMode shadBucket)
          Adds a geometry to a shadow bucket.
 void clear()
           
 GeometryList getShadowQueueContent(RenderQueue.ShadowMode shadBucket)
           
 boolean isQueueEmpty(RenderQueue.Bucket bucket)
           
 void renderQueue(RenderQueue.Bucket bucket, RenderManager rm, Camera cam)
           
 void renderQueue(RenderQueue.Bucket bucket, RenderManager rm, Camera cam, boolean clear)
           
 void renderShadowQueue(GeometryList list, RenderManager rm, Camera cam, boolean clear)
           
 void renderShadowQueue(RenderQueue.ShadowMode shadBucket, RenderManager rm, Camera cam, boolean clear)
           
 void setGeometryComparator(RenderQueue.Bucket bucket, GeometryComparator c)
          Sets a different geometry comparator for the specified bucket, one of Gui, Opaque, Sky, or Transparent.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

RenderQueue

public RenderQueue()
Creates a new RenderQueue, the default comparators are used for all geometry lists.

メソッドの詳細

setGeometryComparator

public void setGeometryComparator(RenderQueue.Bucket bucket,
                                  GeometryComparator c)
Sets a different geometry comparator for the specified bucket, one of Gui, Opaque, Sky, or Transparent. The GeometryComparators are used to sort the accumulated list of geometries before actual rendering occurs.

The most significant comparator is the one for the transparent bucket since there is no correct way to sort the transparent bucket that will handle all geometry all the time. In certain cases, the application may know the best way to sort and now has the option of configuring a specific implementation.

The default comparators are:


addToShadowQueue

public void addToShadowQueue(Geometry g,
                             RenderQueue.ShadowMode shadBucket)
Adds a geometry to a shadow bucket. Note that this operation is done automatically by the RenderManager. SceneProcessors that handle shadow rendering should fetch the queue by using getShadowQueueContent(com.jme3.renderer.queue.RenderQueue.ShadowMode), by default no action is taken on the shadow queues.

パラメータ:
g - The geometry to add
shadBucket - The shadow bucket type, if it is RenderQueue.ShadowMode.CastAndReceive, it is added to both the cast and the receive buckets.

addToQueue

public void addToQueue(Geometry g,
                       RenderQueue.Bucket bucket)
Adds a geometry to the given bucket. The RenderManager automatically handles this task when flattening the scene graph. The bucket to add the geometry is determined by Spatial.getQueueBucket().

パラメータ:
g - The geometry to add
bucket - The bucket to add to, usually Spatial.getQueueBucket().

getShadowQueueContent

public GeometryList getShadowQueueContent(RenderQueue.ShadowMode shadBucket)
パラメータ:
shadBucket -
戻り値:

renderShadowQueue

public void renderShadowQueue(GeometryList list,
                              RenderManager rm,
                              Camera cam,
                              boolean clear)

renderShadowQueue

public void renderShadowQueue(RenderQueue.ShadowMode shadBucket,
                              RenderManager rm,
                              Camera cam,
                              boolean clear)

isQueueEmpty

public boolean isQueueEmpty(RenderQueue.Bucket bucket)

renderQueue

public void renderQueue(RenderQueue.Bucket bucket,
                        RenderManager rm,
                        Camera cam)

renderQueue

public void renderQueue(RenderQueue.Bucket bucket,
                        RenderManager rm,
                        Camera cam,
                        boolean clear)

clear

public void clear()