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
3.0
PSp..om 12 years ago
parent 8ce28cbc04
commit fbb0bcff37
  1. 23
      engine/src/core/com/jme3/renderer/queue/RenderQueue.java

@ -163,7 +163,7 @@ public class RenderQueue {
/** /**
* Sets a different geometry comparator for the specified bucket, one * 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 * used to sort the accumulated list of geometries before actual rendering
* occurs. * 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. * Adds a geometry to a shadow bucket.
* Note that this operation is done automatically by the * Note that this operation is done automatically by the

Loading…
Cancel
Save