本文整理了Java中com.jme3.scene.Geometry.addMatParamOverride()
方法的一些代码示例,展示了Geometry.addMatParamOverride()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.addMatParamOverride()
方法的具体详情如下:
包路径:com.jme3.scene.Geometry
类名称:Geometry
方法名:addMatParamOverride
暂无
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
private void inputMpo(MatParamOverride... overrides) {
if (evaluated) {
throw new IllegalStateException();
}
for (MatParamOverride override : overrides) {
geometry.addMatParamOverride(override);
}
root.updateGeometricState();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void visit(Geometry geom) {
MatParam p = geom.getMaterial().getMaterialDef().getMaterialParam("MorphWeights");
if (p == null) {
return;
}
Mesh mesh = geom.getMesh();
if (mesh != null && mesh.hasMorphTargets()) {
targets.add(geom);
// If the mesh is in a subgraph of a node with a SkinningControl it might have hardware skinning activated through mat param override even if it's not skinned.
// this code makes sure that if the mesh has no hardware skinning buffers hardware skinning won't be activated.
// this is important, because if HW skinning is activated the shader will declare 2 additional useless attributes,
// and we desperately need all the attributes we can find for Morph animation.
if (mesh.getBuffer(VertexBuffer.Type.HWBoneIndex) == null && !geom.getLocalMatParamOverrides().contains(nullNumberOfBones)) {
geom.addMatParamOverride(nullNumberOfBones);
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!