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

x33g5p2x  于2022-01-20 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(143)

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

Geometry.setIgnoreTransform介绍

暂无

代码示例

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

/**
 * Batch this batchNode
 * every geometry of the sub scene graph of this node will be batched into a single mesh that will be rendered in one call
 */
public void batch() {
  doBatch();
  //we set the batch geometries to ignore transforms to avoid transforms of parent nodes to be applied twice
  for (Batch batch : batches.getArray()) {
    batch.geometry.setIgnoreTransform(true);
    batch.geometry.setUserData(UserData.JME_PHYSICSIGNORE, true);
  }
}

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

/**
 * Attach a red square in the XY plane with its lower left corner at (0, 0,
 * 0). It is composed of 2 triangles.
 */
void createRedSquare() {
  Mesh quadMesh = new Quad(1f, 1f);
  Geometry redSquare = new Geometry("red square", quadMesh);
  Material red = assetManager.loadMaterial("Common/Materials/RedColor.j3m");
  redSquare.setMaterial(red);
  rootNode.attachChild(redSquare);
  redSquare.setLocalTranslation(0f, 3f, 0f);
  redSquare.setIgnoreTransform(true);
}

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

/**
 * Batch this batchNode
 * every geometry of the sub scene graph of this node will be batched into a single mesh that will be rendered in one call
 */
public void batch() {
  doBatch();
  //we set the batch geometries to ignore transforms to avoid transforms of parent nodes to be applied twice
  for (Batch batch : batches.getArray()) {
    batch.geometry.setIgnoreTransform(true);
    batch.geometry.setUserData(UserData.JME_PHYSICSIGNORE, true);
  }
}

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

/**
 * Batch this batchNode
 * every geometry of the sub scene graph of this node will be batched into a single mesh that will be rendered in one call
 */
public void batch() {
  doBatch();
  //we set the batch geometries to ignore transforms to avoid transforms of parent nodes to be applied twice        
  for (Batch batch : batches.getArray()) {
    batch.geometry.setIgnoreTransform(true);
    batch.geometry.setUserData(UserData.JME_PHYSICSIGNORE, true);
  }
  updateGeometricState();
}

相关文章