Added an accessor for accessing the current GeometryComparator
for a bucket. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10033 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
8ce28cbc04
commit
fbb0bcff37
@ -163,7 +163,7 @@ public class RenderQueue {
|
||||
|
||||
/**
|
||||
* Sets a different geometry comparator for the specified bucket, one
|
||||
* of Gui, Opaque, Sky, or Transparent. The GeometryComparators are
|
||||
* of Gui, Opaque, Sky, Transparent, or Translucent. The GeometryComparators are
|
||||
* used to sort the accumulated list of geometries before actual rendering
|
||||
* occurs.
|
||||
*
|
||||
@ -208,6 +208,27 @@ public class RenderQueue {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current GeometryComparator used by the specified bucket,
|
||||
* one of Gui, Opaque, Sky, Transparent, or Translucent.
|
||||
*/
|
||||
public GeometryComparator getGeometryComparator(Bucket bucket) {
|
||||
switch (bucket) {
|
||||
case Gui:
|
||||
return guiList.getComparator();
|
||||
case Opaque:
|
||||
return opaqueList.getComparator();
|
||||
case Sky:
|
||||
return skyList.getComparator();
|
||||
case Transparent:
|
||||
return transparentList.getComparator();
|
||||
case Translucent:
|
||||
return translucentList.getComparator();
|
||||
default:
|
||||
throw new UnsupportedOperationException("Unknown bucket type: " + bucket);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a geometry to a shadow bucket.
|
||||
* Note that this operation is done automatically by the
|
||||
|
Loading…
x
Reference in New Issue
Block a user