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

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

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

Spatial.setLightListRefresh介绍

暂无

代码示例

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

@Override
protected void setLightListRefresh(){
  super.setLightListRefresh();
  for (Spatial child : children.getArray()){
    if ((child.refreshFlags & RF_LIGHTLIST) != 0)
      continue;
    child.setLightListRefresh();
  }
}

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

/**
 * <code>addLight</code> adds the given light to the Spatial; causing all
 * child Spatials to be affected by it.
 *
 * @param light The light to add.
 */
public void addLight(Light light) {
  localLights.add(light);
  setLightListRefresh();
}

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

/**
 * <code>removeLight</code> removes the given light from the Spatial.
 *
 * @param light The light to remove.
 * @see Spatial#addLight(com.jme3.light.Light)
 */
public void removeLight(Light light) {
  localLights.remove(light);
  setLightListRefresh();
}

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

/**
 * (Internal use only) Forces a refresh of the given types of data.
 *
 * @param transforms Refresh world transform based on parents'
 * @param bounds Refresh bounding volume data based on child nodes
 * @param lights Refresh light list based on parents'
 */
public void forceRefresh(boolean transforms, boolean bounds, boolean lights) {
  if (transforms) {
    setTransformRefresh();
  }
  if (bounds) {
    setBoundRefresh();
  }
  if (lights) {
    setLightListRefresh();
  }
}

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

/**
 * @return Similar to Spatial.clone() except will create a deep clone of all
 * geometries' meshes. Normally this method shouldn't be used. Instead, use
 * Spatial.clone()
 *
 * @see Spatial#clone()
 */
public Spatial deepClone() {
  // Setup the cloner for the type of cloning we want to do.
  Cloner cloner = new Cloner();
  // First, we definitely do not want to clone our own parent
  cloner.setClonedValue(parent, null);
  Spatial clone = cloner.clone(this);
  // Because we've nulled the parent out we need to make sure
  // the transforms and stuff get refreshed.
  clone.setTransformRefresh();
  clone.setLightListRefresh();
  clone.setMatParamOverrideRefresh();
  return clone;
}

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

/**
 *
 * <code>detachChildAt</code> removes a child at a given index. That child
 * is returned for saving purposes.
 *
 * @param index
 *            the index of the child to be removed.
 * @return the child at the supplied index.
 */
public Spatial detachChildAt(int index) {
  Spatial child =  children.remove(index);
  if ( child != null ) {
    child.setParent( null );
    logger.log(Level.FINE, "{0}: Child removed.", this.toString());
    // since a child with a bound was detached;
    // our own bound will probably change.
    setBoundRefresh();
    // our world transform no longer influences the child.
    // XXX: Not necessary? Since child will have transform updated
    // when attached anyway.
    child.setTransformRefresh();
    // lights are also inherited from parent
    child.setLightListRefresh();
    child.setMatParamOverrideRefresh();
    
    invalidateUpdateList();
  }
  return child;
}

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

child.setLightListRefresh();
child.setMatParamOverrideRefresh();
if (logger.isLoggable(Level.FINE)) {

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

clone.setLightListRefresh();
clone.setMatParamOverrideRefresh();

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

@Override
protected void setLightListRefresh(){
  super.setLightListRefresh();
  for (Spatial child : children.getArray()){
    if ((child.refreshFlags & RF_LIGHTLIST) != 0)
      continue;
    child.setLightListRefresh();
  }
}

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

@Override
protected void setLightListRefresh(){
  super.setLightListRefresh();
  for (Spatial child : children.getArray()){
    if ((child.refreshFlags & RF_LIGHTLIST) != 0)
      continue;
    child.setLightListRefresh();
  }
}

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

/**
 * <code>addLight</code> adds the given light to the Spatial; causing
 * all child Spatials to be effected by it.
 *
 * @param light The light to add.
 */
public void addLight(Light light) {
  localLights.add(light);
  setLightListRefresh();
}

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

/**
 * <code>removeLight</code> removes the given light from the Spatial.
 *
 * @param light The light to remove.
 * @see Spatial#addLight(com.jme3.light.Light)
 */
public void removeLight(Light light) {
  localLights.remove(light);
  setLightListRefresh();
}

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

/**
 * <code>addLight</code> adds the given light to the Spatial; causing all
 * child Spatials to be affected by it.
 *
 * @param light The light to add.
 */
public void addLight(Light light) {
  localLights.add(light);
  setLightListRefresh();
}

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

/**
 * <code>removeLight</code> removes the given light from the Spatial.
 * 
 * @param light The light to remove.
 * @see Spatial#addLight(com.jme3.light.Light) 
 */
public void removeLight(Light light) {
  localLights.remove(light);
  setLightListRefresh();
}

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

/**
 * (Internal use only) Forces a refresh of the given types of data.
 *
 * @param transforms Refresh world transform based on parents'
 * @param bounds Refresh bounding volume data based on child nodes
 * @param lights Refresh light list based on parents'
 */
public void forceRefresh(boolean transforms, boolean bounds, boolean lights) {
  if (transforms) {
    setTransformRefresh();
  }
  if (bounds) {
    setBoundRefresh();
  }
  if (lights) {
    setLightListRefresh();
  }
}

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

/**
 * (Internal use only) Forces a refresh of the given types of data.
 * 
 * @param transforms Refresh world transform based on parents'
 * @param bounds Refresh bounding volume data based on child nodes
 * @param lights Refresh light list based on parents'
 */
public void forceRefresh(boolean transforms, boolean bounds, boolean lights) {
  if (transforms) {
    setTransformRefresh();
  }
  if (bounds) {
    setBoundRefresh();
  }
  if (lights) {
    setLightListRefresh();
  }
}

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

/**
 * 
 * <code>detachChildAt</code> removes a child at a given index. That child
 * is returned for saving purposes.
 * 
 * @param index
 *            the index of the child to be removed.
 * @return the child at the supplied index.
 */
public Spatial detachChildAt(int index) {
  Spatial child =  children.remove(index);
  if ( child != null ) {
    child.setParent( null );
    logger.log(Level.INFO, "{0}: Child removed.", this.toString());
    // since a child with a bound was detached;
    // our own bound will probably change.
    setBoundRefresh();
    // our world transform no longer influences the child.
    // XXX: Not neccessary? Since child will have transform updated
    // when attached anyway.
    child.setTransformRefresh();
    // lights are also inherited from parent
    child.setLightListRefresh();
  }
  return child;
}

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

/**
 * @return Similar to Spatial.clone() except will create a deep clone of all
 * geometries' meshes. Normally this method shouldn't be used. Instead, use
 * Spatial.clone()
 *
 * @see Spatial#clone()
 */
public Spatial deepClone() {
  // Setup the cloner for the type of cloning we want to do.
  Cloner cloner = new Cloner();
  // First, we definitely do not want to clone our own parent
  cloner.setClonedValue(parent, null);
  Spatial clone = cloner.clone(this);
  // Because we've nulled the parent out we need to make sure
  // the transforms and stuff get refreshed.
  clone.setTransformRefresh();
  clone.setLightListRefresh();
  clone.setMatParamOverrideRefresh();
  return clone;
}

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

child.setLightListRefresh();
if (logger.isLoggable(Level.INFO)) {
  logger.log(Level.INFO,"Child ({0}) attached to this node ({1})",

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

/**
 *
 * <code>detachChildAt</code> removes a child at a given index. That child
 * is returned for saving purposes.
 *
 * @param index
 *            the index of the child to be removed.
 * @return the child at the supplied index.
 */
public Spatial detachChildAt(int index) {
  Spatial child =  children.remove(index);
  if ( child != null ) {
    child.setParent( null );
    logger.log(Level.FINE, "{0}: Child removed.", this.toString());
    // since a child with a bound was detached;
    // our own bound will probably change.
    setBoundRefresh();
    // our world transform no longer influences the child.
    // XXX: Not necessary? Since child will have transform updated
    // when attached anyway.
    child.setTransformRefresh();
    // lights are also inherited from parent
    child.setLightListRefresh();
    child.setMatParamOverrideRefresh();
    
    invalidateUpdateList();
  }
  return child;
}

相关文章

微信公众号

最新文章

更多

Spatial类方法