本文整理了Java中com.jme3.scene.Mesh.isAnimatedByBone()
方法的一些代码示例,展示了Mesh.isAnimatedByBone()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mesh.isAnimatedByBone()
方法的具体详情如下:
包路径:com.jme3.scene.Mesh
类名称:Mesh
方法名:isAnimatedByBone
暂无
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Access the attachments node of this bone. If this bone doesn't already
* have an attachments node, create one. Models and effects attached to the
* attachments node will follow this bone's motions.
*
* @param boneIndex this bone's index in its skeleton (≥0)
* @param targets a list of geometries animated by this bone's skeleton (not
* null, unaffected)
*/
Node getAttachmentsNode(int boneIndex, SafeArrayList<Geometry> targets) {
targetGeometry = null;
/*
* Search for a geometry animated by this particular bone.
*/
for (Geometry geometry : targets) {
Mesh mesh = geometry.getMesh();
if (mesh != null && mesh.isAnimatedByBone(boneIndex)) {
targetGeometry = geometry;
break;
}
}
if (attachNode == null) {
attachNode = new Node(name + "_attachnode");
attachNode.setUserData("AttachedBone", this);
//We don't want the node to have a numBone set by a parent node so we force it to null
attachNode.addMatParamOverride(new MatParamOverride(VarType.Int, "NumberOfBones", null));
}
return attachNode;
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Access the attachments node of this bone. If this bone doesn't already
* have an attachments node, create one. Models and effects attached to the
* attachments node will follow this bone's motions.
*
* @param boneIndex this bone's index in its skeleton (≥0)
* @param targets a list of geometries animated by this bone's skeleton (not
* null, unaffected)
*/
Node getAttachmentsNode(int boneIndex, SafeArrayList<Geometry> targets) {
targetGeometry = null;
/*
* Search for a geometry animated by this particular bone.
*/
for (Geometry geometry : targets) {
Mesh mesh = geometry.getMesh();
if (mesh != null && mesh.isAnimatedByBone(boneIndex)) {
targetGeometry = geometry;
break;
}
}
if (attachNode == null) {
attachNode = new Node(name + "_attachnode");
attachNode.setUserData("AttachedBone", this);
//We don't want the node to have a numBone set by a parent node so we force it to null
attachNode.addMatParamOverride(new MatParamOverride(VarType.Int, "NumberOfBones", null));
}
return attachNode;
}
内容来源于网络,如有侵权,请联系作者删除!