* Little bit of docs for RenderQueue
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7666 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
f9b0a56c90
commit
d62952a16e
@ -208,6 +208,19 @@ public class RenderQueue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a geometry to a shadow bucket.
|
||||||
|
* Note that this operation is done automatically by the
|
||||||
|
* {@link RenderManager}. {@link SceneProcessor}s that handle
|
||||||
|
* shadow rendering should fetch the queue by using
|
||||||
|
* {@link #getShadowQueueContent(com.jme3.renderer.queue.RenderQueue.ShadowMode) },
|
||||||
|
* by default no action is taken on the shadow queues.
|
||||||
|
*
|
||||||
|
* @param g The geometry to add
|
||||||
|
* @param shadBucket The shadow bucket type, if it is
|
||||||
|
* {@link ShadowMode#CastAndReceive}, it is added to both the cast
|
||||||
|
* and the receive buckets.
|
||||||
|
*/
|
||||||
public void addToShadowQueue(Geometry g, ShadowMode shadBucket) {
|
public void addToShadowQueue(Geometry g, ShadowMode shadBucket) {
|
||||||
switch (shadBucket) {
|
switch (shadBucket) {
|
||||||
case Inherit:
|
case Inherit:
|
||||||
@ -229,6 +242,16 @@ public class RenderQueue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds a geometry to the given bucket.
|
||||||
|
* The {@link RenderManager} automatically handles this task
|
||||||
|
* when flattening the scene graph. The bucket to add
|
||||||
|
* the geometry is determined by {@link Geometry#getQueueBucket() }.
|
||||||
|
*
|
||||||
|
* @param g The geometry to add
|
||||||
|
* @param bucket The bucket to add to, usually
|
||||||
|
* {@link Geometry#getQueueBucket() }.
|
||||||
|
*/
|
||||||
public void addToQueue(Geometry g, Bucket bucket) {
|
public void addToQueue(Geometry g, Bucket bucket) {
|
||||||
switch (bucket) {
|
switch (bucket) {
|
||||||
case Gui:
|
case Gui:
|
||||||
@ -251,6 +274,11 @@ public class RenderQueue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param shadBucket
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public GeometryList getShadowQueueContent(ShadowMode shadBucket) {
|
public GeometryList getShadowQueueContent(ShadowMode shadBucket) {
|
||||||
switch (shadBucket) {
|
switch (shadBucket) {
|
||||||
case Cast:
|
case Cast:
|
||||||
@ -258,7 +286,7 @@ public class RenderQueue {
|
|||||||
case Receive:
|
case Receive:
|
||||||
return shadowRecv;
|
return shadowRecv;
|
||||||
default:
|
default:
|
||||||
return null;
|
throw new IllegalArgumentException("Only Cast or Receive are allowed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user