本文整理了Java中com.jme3.scene.Geometry.getWorldTransform()
方法的一些代码示例,展示了Geometry.getWorldTransform()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.getWorldTransform()
方法的具体详情如下:
包路径:com.jme3.scene.Geometry
类名称:Geometry
方法名:getWorldTransform
暂无
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public ArmatureDebugger addArmatureFrom(Armature armature, Spatial forSpatial) {
ArmatureDebugger ad = armatures.get(armature);
if(ad != null){
return ad;
}
JointInfoVisitor visitor = new JointInfoVisitor(armature);
forSpatial.depthFirstTraversal(visitor);
ad = new ArmatureDebugger(forSpatial.getName() + "_Armature", armature, visitor.deformingJoints);
ad.setLocalTransform(forSpatial.getWorldTransform());
if (forSpatial instanceof Node) {
List<Geometry> geoms = new ArrayList<>();
findGeoms((Node) forSpatial, geoms);
if (geoms.size() == 1) {
ad.setLocalTransform(geoms.get(0).getWorldTransform());
}
}
armatures.put(armature, ad);
debugNode.attachChild(ad);
if (isInitialized()) {
ad.initialize(app.getAssetManager(), app.getCamera());
}
return ad;
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void visit(Geometry g) {
Mesh m = g.getMesh();
Geometry debug = new Geometry(
"debug tangents geom",
TangentBinormalGenerator.genNormalLines(m, 0.1f)
);
debug.setMaterial(debugMat);
debug.setCullHint(Spatial.CullHint.Never);
debug.setLocalTransform(g.getWorldTransform());
debugTangents.attachChild(debug);
}
});
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void visit(Geometry g){
Mesh m = g.getMesh();
Material mat = g.getMaterial();
// if (mat.getParam("DiffuseMap") != null){
// mat.setTexture("DiffuseMap", null);
// }
TangentBinormalGenerator.generate(m);
Geometry debug = new Geometry(
"debug tangents geom",
TangentBinormalGenerator.genTbnLines(g.getMesh(), 0.2f)
);
debug.setMaterial(debugMat);
debug.setCullHint(Spatial.CullHint.Never);
debug.setLocalTransform(g.getWorldTransform());
debugTangents.attachChild(debug);
}
});
代码示例来源:origin: org.jmonkeyengine/jme3-core
public SkeletonDebugger addSkeleton(Skeleton skeleton, Spatial forSpatial, boolean guessBonesOrientation) {
SkeletonDebugger sd = new SkeletonDebugger(forSpatial.getName() + "_Skeleton", skeleton, guessBonesOrientation);
sd.setLocalTransform(forSpatial.getWorldTransform());
if (forSpatial instanceof Node) {
List<Geometry> geoms = new ArrayList<>();
findGeoms((Node) forSpatial, geoms);
if (geoms.size() == 1) {
sd.setLocalTransform(geoms.get(0).getWorldTransform());
}
}
skeletons.put(skeleton, sd);
debugNode.attachChild(sd);
if (isInitialized()) {
sd.initialize(app.getAssetManager());
}
return sd;
}
代码示例来源:origin: info.projectkyoto/mms-engine
outGeom.setLocalTransform(inGeom.getWorldTransform());
outGeom.setMaterial(inGeom.getMaterial());
for (Light light : inGeom.getWorldLightList()){
代码示例来源:origin: us.ihmc/IHMCJMonkeyEngineToolkit
Point3f nearest = getNearestIntersection(origin, dir, getLidarResolution(), geom.getWorldTransform());
if (nearest != null)
代码示例来源:origin: us.ihmc/ihmc-jmonkey-engine-toolkit
Point3D32 nearest = getNearestIntersection(origin, dir, getLidarResolution(), geom.getWorldTransform());
if (nearest != null)
代码示例来源:origin: us.ihmc/ihmc-jmonkey-engine-toolkit
Point3D32 nearest = getNearestIntersection(origin, dir, getLidarResolution(), geom.getWorldTransform());
if (nearest != null)
内容来源于网络,如有侵权,请联系作者删除!