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

x33g5p2x  于2022-01-25 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(97)

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

Mesh.prepareForAnim介绍

[英]Prepares the mesh for software skinning by converting the bone index and weight buffers to heap buffers.
[中]通过将骨骼索引和权重缓冲区转换为堆缓冲区,为软件蒙皮准备网格。

代码示例

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

private void switchToSoftware() {
  numberOfBonesParam.setEnabled(false);
  boneMatricesParam.setEnabled(false);
  
  for (Geometry geometry : targets) {
    Mesh mesh = geometry.getMesh();
    if (mesh != null && mesh.isAnimated()) {
      mesh.prepareForAnim(true);
    }
  }
}

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

private void switchToSoftware() {
  numberOfJointsParam.setEnabled(false);
  jointMatricesParam.setEnabled(false);
  for (Geometry geometry : targets) {
    Mesh mesh = geometry.getMesh();
    if (mesh != null && mesh.isAnimated()) {
      mesh.prepareForAnim(true);
    }
  }
}

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

private void switchToHardware() {
  numberOfBonesParam.setEnabled(true);
  boneMatricesParam.setEnabled(true);
  
  // Next full 10 bones (e.g. 30 on 24 bones)
  int numBones = ((skeleton.getBoneCount() / 10) + 1) * 10;
  numberOfBonesParam.setValue(numBones);
  
  for (Geometry geometry : targets) {
    Mesh mesh = geometry.getMesh();
    if (mesh != null && mesh.isAnimated()) {
      mesh.prepareForAnim(false);
    }
  }
}

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

private void switchToHardware() {
  numberOfJointsParam.setEnabled(true);
  jointMatricesParam.setEnabled(true);
  // Next full 10 bones (e.g. 30 on 24 bones)
  int numBones = ((armature.getJointCount() / 10) + 1) * 10;
  numberOfJointsParam.setValue(numBones);
  for (Geometry geometry : targets) {
    Mesh mesh = geometry.getMesh();
    if (mesh != null && mesh.isAnimated()) {
      mesh.prepareForAnim(false);
    }
  }
}

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

jmeMesh.prepareForAnim(true);
jmeMesh.generateBindPose(true);

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

Buffer biBuff = mesh.getBuffer(Type.BoneIndex).getData();
if (!biBuff.hasArray() || !bwBuff.hasArray()) {
  mesh.prepareForAnim(true); // prepare for software animation

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

Buffer biBuff = mesh.getBuffer(Type.BoneIndex).getData();
if (!biBuff.hasArray() || !bwBuff.hasArray()) {
  mesh.prepareForAnim(true); // prepare for software animation

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

private void switchToSoftware() {
  for (Material m : materials) {
    if (m.getParam("NumberOfBones") != null) {
      m.clearParam("NumberOfBones");
    }
  }
  for (Mesh mesh : targets) {
    if (mesh.isAnimated()) {
      mesh.prepareForAnim(true);
    }
  }
}

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

private void switchToHardware() {
  // Next full 10 bones (e.g. 30 on 24 bones)
  int numBones = ((skeleton.getBoneCount() / 10) + 1) * 10;
  for (Material m : materials) {
    m.setInt("NumberOfBones", numBones);
  }
  for (Mesh mesh : targets) {
    if (mesh.isAnimated()) {
      mesh.prepareForAnim(false);
    }
  }
}

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

private void switchToSoftware() {
  numberOfBonesParam.setEnabled(false);
  boneMatricesParam.setEnabled(false);
  
  for (Geometry geometry : targets) {
    Mesh mesh = geometry.getMesh();
    if (mesh != null && mesh.isAnimated()) {
      mesh.prepareForAnim(true);
    }
  }
}

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

private void switchToHardware() {
  numberOfBonesParam.setEnabled(true);
  boneMatricesParam.setEnabled(true);
  
  // Next full 10 bones (e.g. 30 on 24 bones)
  int numBones = ((skeleton.getBoneCount() / 10) + 1) * 10;
  numberOfBonesParam.setValue(numBones);
  
  for (Geometry geometry : targets) {
    Mesh mesh = geometry.getMesh();
    if (mesh != null && mesh.isAnimated()) {
      mesh.prepareForAnim(false);
    }
  }
}

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

jmeMesh.prepareForAnim(true);
jmeMesh.generateBindPose(true);

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

Buffer biBuff = mesh.getBuffer(Type.BoneIndex).getData();
if (!biBuff.hasArray() || !bwBuff.hasArray()) {
  mesh.prepareForAnim(true); // prepare for software animation

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

Buffer biBuff = mesh.getBuffer(Type.BoneIndex).getData();
if (!biBuff.hasArray() || !bwBuff.hasArray()) {
  mesh.prepareForAnim(true); // prepare for software animation

相关文章