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

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

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

Mesh.clone介绍

[英]Create a shallow clone of this Mesh. The VertexBuffer are shared between this and the clone mesh, the rest of the data is cloned.
[中]创建此网格的浅克隆。VertexBuffer在该网格和克隆网格之间共享,其余数据被克隆。

代码示例

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

int materialId = e.getKey();
List<Integer> indexes = e.getValue();
Mesh newMesh = mesh.clone();
newMesh.setBuffer(VertexBuffer.Type.Index, 3, toArray(indexes.toArray(new Integer[indexes.size()])));
newMesh.setStatic();

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

Mesh clone = clone();
if (getBuffer(Type.BindPosePosition) != null){
  VertexBuffer oldPos = getBuffer(Type.Position);

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

Mesh cMesh = m.clone();
Geometry coloredMesh = new Geometry ("ColoredMesh", cMesh);
Material matVC = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
Mesh wfMesh = m.clone();
Geometry wfGeom = new Geometry("wireframeGeometry", wfMesh);
Material matWireframe = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");

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

@Override
public synchronized PMDMesh clone() {
  PMDMesh newMesh = (PMDMesh) super.clone();
  boneMatricesParamIndex = -1;
  newMesh.boneMatrixArray = new Matrix4f[boneMatrixArray.length];
  for (int i = 0; i < newMesh.boneMatrixArray.length; i++) {
    newMesh.boneMatrixArray[i] = new Matrix4f();
  }
  newMesh.setBuffer(getBuffer(VertexBuffer.Type.BoneIndex));
  newMesh.setBuffer(getBuffer(VertexBuffer.Type.TexCoord));
  releaseSoftwareSkinningBufferes();
  FloatBuffer newBoneMatrixBuffer = BufferUtils.createFloatBuffer(boneMatrixBuffer.capacity());
  boneMatrixBuffer.position(0);
  newBoneMatrixBuffer.put(boneMatrixBuffer);
  newBoneMatrixBuffer.position(0);
  newMesh.setBoneMatrixBuffer(newBoneMatrixBuffer);
  return newMesh;
}

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

int materialId = e.getKey();
List<Integer> indexes = e.getValue();
Mesh newMesh = mesh.clone();
newMesh.setBuffer(VertexBuffer.Type.Index, 3, toArray(indexes.toArray(new Integer[indexes.size()])));
newMesh.setStatic();

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

@Override
public synchronized PMDSkinMesh clone() {
  PMDSkinMesh newMesh = (PMDSkinMesh)super.clone();

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

Mesh clone = clone();
if (getBuffer(Type.BindPosePosition) != null){
  VertexBuffer oldPos = getBuffer(Type.Position);

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

Mesh clone = clone();
if (getBuffer(Type.BindPosePosition) != null){
  VertexBuffer oldPos = getBuffer(Type.Position);

相关文章