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

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

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

Mesh.isAnimated介绍

[英]Determines if the mesh uses bone animation. A mesh uses bone animation if it has bone index / weight buffers such as Type#BoneIndex or Type#HWBoneIndex.
[中]确定网格是否使用骨骼动画。如果网格具有骨骼索引/权重缓冲区,例如类型#BoneIndex或类型#HWBoneIndex,则网格将使用骨骼动画。

代码示例

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

/**
 * If specified the geometry has an animated mesh, add its mesh and material
 * to the lists of animation targets.
 */
private void findTargets(Geometry geometry) {
  Mesh mesh = geometry.getMesh();
  if (mesh != null && mesh.isAnimated()) {
    targets.add(geometry);
  }
}

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

/**
 * If specified the geometry has an animated mesh, add its mesh and material
 * to the lists of animation targets.
 */
private void findTargets(Geometry geometry) {
  Mesh mesh = geometry.getMesh();
  if (mesh != null && mesh.isAnimated()) {
    targets.add(geometry);
  }
  
}

代码示例来源: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 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 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

if(mesh.isAnimated()){
  mesh.clearBuffer(Type.BindPoseNormal);
  mesh.clearBuffer(Type.BindPosePosition);

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

void resetToBind() {
  for (Geometry geometry : targets) {
    Mesh mesh = geometry.getMesh();
    if (mesh != null && mesh.isAnimated()) {
      Buffer bwBuff = mesh.getBuffer(Type.BoneWeight).getData();
      Buffer biBuff = mesh.getBuffer(Type.BoneIndex).getData();

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

void resetToBind() {
  for (Geometry geometry : targets) {
    Mesh mesh = geometry.getMesh();
    if (mesh != null && mesh.isAnimated()) {
      Buffer bwBuff = mesh.getBuffer(Type.BoneWeight).getData();
      Buffer biBuff = mesh.getBuffer(Type.BoneIndex).getData();

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

if(isAnimated()){
  VertexBuffer hwBoneIndex = new VertexBuffer(Type.HWBoneIndex);
  hwBoneIndex.setUsage(Usage.CpuOnly);

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

/**
 * If specified the geometry has an animated mesh, add its mesh and material
 * to the lists of animation targets.
 */
private void findTargets(Geometry geometry) {
  Mesh mesh = geometry.getMesh();
  if (mesh != null && mesh.isAnimated()) {
    targets.add(geometry);
  }
  
}

代码示例来源: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: info.projectkyoto/mms-engine

if (childSharedMesh.isAnimated()) {
if (mesh.isAnimated()) {
  targets.add(mesh);
  materials.add(geom.getMaterial());

代码示例来源: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: info.projectkyoto/mms-engine

void resetToBind() {
  for (Mesh mesh : targets) {
    if (mesh.isAnimated()) {
      Buffer bwBuff = mesh.getBuffer(Type.BoneWeight).getData();
      Buffer biBuff = mesh.getBuffer(Type.BoneIndex).getData();

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

void resetToBind() {
  for (Geometry geometry : targets) {
    Mesh mesh = geometry.getMesh();
    if (mesh != null && mesh.isAnimated()) {
      Buffer bwBuff = mesh.getBuffer(Type.BoneWeight).getData();
      Buffer biBuff = mesh.getBuffer(Type.BoneIndex).getData();

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

if(isAnimated()){
  VertexBuffer hwBoneIndex = new VertexBuffer(Type.HWBoneIndex);
  hwBoneIndex.setUsage(Usage.CpuOnly);

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

if(isAnimated()){
  VertexBuffer hwBoneIndex = new VertexBuffer(Type.HWBoneIndex);
  hwBoneIndex.setUsage(Usage.CpuOnly);

相关文章