com.jme3.scene.Spatial.getCullHint()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(85)

本文整理了Java中com.jme3.scene.Spatial.getCullHint()方法的一些代码示例,展示了Spatial.getCullHint()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Spatial.getCullHint()方法的具体详情如下:
包路径:com.jme3.scene.Spatial
类名称:Spatial
方法名:getCullHint

Spatial.getCullHint介绍

暂无

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

CullHint cm = getCullHint();
assert cm != CullHint.Inherit;
if (cm == Spatial.CullHint.Always) {

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Helper function used to recursively populate the outputGeometryList 
 * with geometry children of scene node
 * 
 * @param camera
 * @param scene
 * @param outputGeometryList 
 */
private static void addGeometriesInCamFrustumFromNode(Camera camera, Node scene, RenderQueue.ShadowMode mode, GeometryList outputGeometryList) {
  if (scene.getCullHint() == Spatial.CullHint.Always) return;
  camera.setPlaneState(0);
  if (camera.contains(scene.getWorldBound()) != Camera.FrustumIntersect.Outside) {
    for (Spatial child: scene.getChildren()) {
      if (child instanceof Node) addGeometriesInCamFrustumFromNode(camera, (Node)child, mode, outputGeometryList);
      else if (child instanceof Geometry && child.getCullHint() != Spatial.CullHint.Always) {
        camera.setPlaneState(0);
        if (checkShadowMode(child.getShadowMode(), mode) &&
            !((Geometry)child).isGrouped() &&
            camera.contains(child.getWorldBound()) != Camera.FrustumIntersect.Outside) {
         outputGeometryList.add((Geometry)child);
        }
      }
    }
  }
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

if (scene.getCullHint() == Spatial.CullHint.Always) return;

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

private void process(Spatial scene) {
  if (scene.getCullHint() == Spatial.CullHint.Always) return;

代码示例来源:origin: net.sf.phat/phat-audio

@Override
protected void controlUpdate(float tpf) {
  AudioNode audioNode = (AudioNode) spatial.getParent();
  if(audioNode.getStatus() == AudioSource.Status.Playing && spatial.getCullHint() == Spatial.CullHint.Always) {
    spatial.setCullHint(Spatial.CullHint.Dynamic);
  } else if(audioNode.getStatus() == AudioSource.Status.Stopped && spatial.getCullHint() == Spatial.CullHint.Dynamic) {
    spatial.setCullHint(Spatial.CullHint.Always);
  }
}

代码示例来源:origin: info.projectkyoto/mms-engine

CullHint cm = getCullHint();
assert cm != CullHint.Inherit;
if (cm == Spatial.CullHint.Always) {

代码示例来源:origin: org.jmonkeyengine/jme3-core

CullHint cm = getCullHint();
assert cm != CullHint.Inherit;
if (cm == Spatial.CullHint.Always) {

代码示例来源:origin: info.projectkyoto/mms-engine

if ((scene.getShadowMode() != RenderQueue.ShadowMode.Off || scene instanceof Node) && scene.getCullHint()!=Spatial.CullHint.Always) {
  renderShadow(scene, vp.getQueue());

代码示例来源:origin: org.jmonkeyengine/jme3-core

if (scene.getCullHint() == Spatial.CullHint.Always) return;

代码示例来源:origin: org.jmonkeyengine/jme3-core

/**
 * Helper function used to recursively populate the outputGeometryList 
 * with geometry children of scene node
 * 
 * @param camera
 * @param scene
 * @param outputGeometryList 
 */
private static void addGeometriesInCamFrustumFromNode(Camera camera, Node scene, RenderQueue.ShadowMode mode, GeometryList outputGeometryList) {
  if (scene.getCullHint() == Spatial.CullHint.Always) return;
  camera.setPlaneState(0);
  if (camera.contains(scene.getWorldBound()) != Camera.FrustumIntersect.Outside) {
    for (Spatial child: scene.getChildren()) {
      if (child instanceof Node) addGeometriesInCamFrustumFromNode(camera, (Node)child, mode, outputGeometryList);
      else if (child instanceof Geometry && child.getCullHint() != Spatial.CullHint.Always) {
        camera.setPlaneState(0);
        if (checkShadowMode(child.getShadowMode(), mode) &&
            !((Geometry)child).isGrouped() &&
            camera.contains(child.getWorldBound()) != Camera.FrustumIntersect.Outside) {
         outputGeometryList.add((Geometry)child);
        }
      }
    }
  }
}

代码示例来源:origin: org.jmonkeyengine/jme3-core

private void process(Spatial scene) {
  if (scene.getCullHint() == Spatial.CullHint.Always) return;

相关文章

Spatial类方法