|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.renderer.queue.RenderQueue
public class RenderQueue
RenderQueue
is used to queue up and sort
geometries
for rendering.
Nested Class Summary | |
---|---|
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. |
Constructor Summary | |
---|---|
RenderQueue()
Creates a new RenderQueue, the default comparators
are used for all geometry lists . |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RenderQueue()
comparators
are used for all geometry lists
.
Method Detail |
---|
public void setGeometryComparator(RenderQueue.Bucket bucket, GeometryComparator c)
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:
OpaqueComparator
which sorts
by material first and front to back within the same material.
TransparentComparator
which
sorts purely back to front by leading bounding edge with no material sort.
TransparentComparator
which
sorts purely back to front by leading bounding edge with no material sort. this bucket is rendered after post processors.
NullComparator
which does no sorting
at all.
GuiComparator
sorts geometries back to
front based on their Z values.
public void addToShadowQueue(Geometry g, RenderQueue.ShadowMode shadBucket)
RenderManager
. SceneProcessor
s 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 addshadBucket
- The shadow bucket type, if it is
RenderQueue.ShadowMode.CastAndReceive
, it is added to both the cast
and the receive buckets.public void addToQueue(Geometry g, RenderQueue.Bucket bucket)
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 addbucket
- The bucket to add to, usually
Spatial.getQueueBucket()
.public GeometryList getShadowQueueContent(RenderQueue.ShadowMode shadBucket)
shadBucket
- The shadow mode to retrieve the queue content
for. Only Cast
and
Receive
are valid.
GeometryList
public void renderShadowQueue(GeometryList list, RenderManager rm, Camera cam, boolean clear)
public void renderShadowQueue(RenderQueue.ShadowMode shadBucket, RenderManager rm, Camera cam, boolean clear)
public boolean isQueueEmpty(RenderQueue.Bucket bucket)
public void renderQueue(RenderQueue.Bucket bucket, RenderManager rm, Camera cam)
public void renderQueue(RenderQueue.Bucket bucket, RenderManager rm, Camera cam, boolean clear)
public void clear()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |