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

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

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

Mesh.getMaxNumWeights介绍

[英]Returns the maximum number of weights per vertex on this mesh.
[中]返回此网格上每个顶点的最大权重数。

代码示例

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

weightsArray[i + j] = data.value;
sum += data.value;
if (data.value > 0 && (j + 1) > mesh.getMaxNumWeights()) {
  mesh.setMaxNumWeights(j + 1);

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

int maxWeightsPerVert = mesh.getMaxNumWeights();

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

int maxWeightsPerVert = mesh.getMaxNumWeights();
if (maxWeightsPerVert <= 0) {
  throw new IllegalStateException("Max weights per vert is incorrectly set!");

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

int maxWeightsPerVert = mesh.getMaxNumWeights();

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

int maxWeightsPerVert = mesh.getMaxNumWeights();
if (maxWeightsPerVert <= 0) {
  throw new IllegalStateException("Max weights per vert is incorrectly set!");

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

setMaxNumWeights(other.getMaxNumWeights());

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

maxWeights = Math.max(maxWeights, geom.getMesh().getMaxNumWeights());

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

maxWeights = Math.max(maxWeights, geom.getMesh().getMaxNumWeights());

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

weightsArray[i + j] = data.value;
sum += data.value;
if (data.value > 0 && (j + 1) > mesh.getMaxNumWeights()) {
  mesh.setMaxNumWeights(j + 1);

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

private void softwareSkinUpdate(Mesh mesh, Matrix4f[] offsetMatrices) {
  int maxWeightsPerVert = mesh.getMaxNumWeights();
  int fourMinusMaxWeights = 4 - maxWeightsPerVert;

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

int maxWeightsPerVert = mesh.getMaxNumWeights();
if (maxWeightsPerVert <= 0) {
  throw new IllegalStateException("Max weights per vert is incorrectly set!");

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

int maxWeightsPerVert = mesh.getMaxNumWeights();

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

int maxWeightsPerVert = mesh.getMaxNumWeights();

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

int maxWeightsPerVert = mesh.getMaxNumWeights();
if (maxWeightsPerVert <= 0) {
  throw new IllegalStateException("Max weights per vert is incorrectly set!");

代码示例来源:origin: us.ihmc/ihmc-jmonkey-engine-toolkit

/** creates MeshData from mesh  */
public MeshData(Mesh mesh)
{
 this.maxNumOfWeights = mesh.getMaxNumWeights();
 vertexArray = BufferUtils.getFloatArray(mesh.getFloatBuffer(Type.Position));
 normalArray = BufferUtils.getFloatArray(mesh.getFloatBuffer(Type.Normal));
 int numOfTexcoordinates = 0;
 for (int i = 0; i < MAX_TEX_COORDS; i++)
 {
   if (mesh.getBuffer(Utilities.getTexCoordType(i)) != null) numOfTexcoordinates++;
 }
 this.uvArrays = new float[numOfTexcoordinates][];
 for (int i = 0; i < numOfTexcoordinates; i++)
 {
   uvArrays[i] = BufferUtils.getFloatArray(mesh.getFloatBuffer(Utilities.getTexCoordType(i)));
 }
 indexArray = Utilities.getShortArray(mesh.getShortBuffer(Type.Index));
 boneWeightArray = BufferUtils.getFloatArray(mesh.getFloatBuffer(Type.BoneWeight));
 VertexBuffer boneIndexBuffer = mesh.getBuffer(Type.BoneIndex);
 if (boneIndexBuffer != null) boneIndexArray = (Utilities.getByteArray((ByteBuffer) boneIndexBuffer.getData()));
}

代码示例来源:origin: us.ihmc/IHMCJMonkeyEngineToolkit

/** creates MeshData from mesh  */
public MeshData(Mesh mesh)
{
 this.maxNumOfWeights = mesh.getMaxNumWeights();
 vertexArray = BufferUtils.getFloatArray(mesh.getFloatBuffer(Type.Position));
 normalArray = BufferUtils.getFloatArray(mesh.getFloatBuffer(Type.Normal));
 int numOfTexcoordinates = 0;
 for (int i = 0; i < MAX_TEX_COORDS; i++)
 {
   if (mesh.getBuffer(Utilities.getTexCoordType(i)) != null) numOfTexcoordinates++;
 }
 this.uvArrays = new float[numOfTexcoordinates][];
 for (int i = 0; i < numOfTexcoordinates; i++)
 {
   uvArrays[i] = BufferUtils.getFloatArray(mesh.getFloatBuffer(Utilities.getTexCoordType(i)));
 }
 indexArray = Utilities.getShortArray(mesh.getShortBuffer(Type.Index));
 boneWeightArray = BufferUtils.getFloatArray(mesh.getFloatBuffer(Type.BoneWeight));
 VertexBuffer boneIndexBuffer = mesh.getBuffer(Type.BoneIndex);
 if (boneIndexBuffer != null) boneIndexArray = (Utilities.getByteArray((ByteBuffer) boneIndexBuffer.getData()));
}

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

setMaxNumWeights(other.getMaxNumWeights());

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

setMaxNumWeights(other.getMaxNumWeights());

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

maxWeights = Math.max(maxWeights, geom.getMesh().getMaxNumWeights());

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

maxWeights = Math.max(maxWeights, geom.getMesh().getMaxNumWeights());

相关文章