本文整理了Java中com.jme3.scene.Geometry.setModelBound()
方法的一些代码示例,展示了Geometry.setModelBound()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.setModelBound()
方法的具体详情如下:
包路径:com.jme3.scene.Geometry
类名称:Geometry
方法名:setModelBound
[英]Sets the model bound to use for this geometry. This alters the bound used on the mesh as well via Mesh#setBound(com.jme3.bounding.BoundingVolume) and forces the world bounding volume to be recomputed.
[中]设置绑定为此几何图形使用的模型。这也会通过mesh#setBound(com.jme3.bounding.BoundingVolume)更改网格上使用的边界,并强制重新计算世界边界体积。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Test
public void testAmbientFiltering() {
geom.addLight(new AmbientLight());
checkFilteredLights(1); // Ambient lights must never be filtered
// Test for bounding Sphere
geom.setModelBound(new BoundingSphere(0.5f, Vector3f.ZERO));
checkFilteredLights(1); // Ambient lights must never be filtered
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Test
public void testDirectionalFiltering() {
geom.addLight(new DirectionalLight(Vector3f.UNIT_Y));
checkFilteredLights(1); // Directional lights must never be filtered
// Test for bounding Sphere
geom.setModelBound(new BoundingSphere(0.5f, Vector3f.ZERO));
checkFilteredLights(1); // Directional lights must never be filtered
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
sky.setQueueBucket(Bucket.Sky);
sky.setCullHint(Spatial.CullHint.Never);
sky.setModelBound(new BoundingSphere(Float.POSITIVE_INFINITY, Vector3f.ZERO));
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
collisionBox.setModelBound(new BoundingBox());
collisionBox.setLocalTranslation(new Vector3f(20, 95, 30));
collisionBox.setMaterial(matWire);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
sl.setDirection(Vector3f.UNIT_Z);
geom.setLocalTranslation(Vector3f.ZERO);
geom.setModelBound(new BoundingSphere(1f, Vector3f.ZERO));
geom.setModelBound(new BoundingSphere(5f, Vector3f.ZERO));
checkFilteredLights(1);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
geom.setModelBound(new BoundingSphere(1f, Vector3f.ZERO));
geom.setLocalTranslation(0, 0, 2);
pl.setPosition(new Vector3f(0, 0, 2f));
代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-extension-envsupport-jmonkey
public Spatial draw(DrawableCombiner3d dc, Primitive3d primitive,
SpaceObject sobj, ViewportJMonkey vp) {
float innerRadius = (float)((Torus3d) primitive).getInnerRadius();
float outerRadius = (float)((Torus3d) primitive).getOuterRadius();
int circleSamples = (int)((Torus3d) primitive).getCircleSamples();
int radialSamples = (int)((Torus3d) primitive).getRadialSamples();
torus = new Torus(circleSamples, radialSamples, innerRadius, outerRadius);
geo = new Geometry(identifier, torus);
geo.setModelBound(new BoundingBox());
return geo;
}
代码示例来源:origin: org.jmonkeyengine/jme3-dae
public void setCurrentSequence(String name)
{
currentSequence = findSequence(name);
currentIndex = 0;
if (geometry.getMesh() == null)
{
geometry.setMesh(currentSequence[currentIndex]);
geometry.setModelBound(new BoundingBox());
geometry.updateModelBound();
setModelBound(new BoundingBox());
updateModelBound();
}
else if (currentSequence != null)
{
geometry.setMesh(currentSequence[currentIndex]);
}
else
{
System.err.println("Can't play animation " + name);
return;
}
if (totalAnimationTime != 0)
{
animationFrameTime = totalAnimationTime / currentSequence.length;
}
}
代码示例来源:origin: info.projectkyoto/mms-engine
sky.setQueueBucket(Bucket.Sky);
sky.setCullHint(Spatial.CullHint.Never);
sky.setModelBound(new BoundingSphere(Float.POSITIVE_INFINITY, Vector3f.ZERO));
代码示例来源:origin: info.projectkyoto/mms-engine
sky.setQueueBucket(Bucket.Sky);
sky.setCullHint(Spatial.CullHint.Never);
sky.setModelBound(new BoundingSphere(Float.POSITIVE_INFINITY, Vector3f.ZERO));
代码示例来源:origin: org.jmonkeyengine/jme3-core
sky.setQueueBucket(Bucket.Sky);
sky.setCullHint(Spatial.CullHint.Never);
sky.setModelBound(new BoundingSphere(Float.POSITIVE_INFINITY, Vector3f.ZERO));
代码示例来源:origin: org.jmonkeyengine/jme3-dae
geometry.setModelBound(new BoundingBox());
代码示例来源:origin: org.jmonkeyengine/jme3-dae
geom = new Geometry("model");
geom.setMesh(mesh.get().getA());
geom.setModelBound(new BoundingBox());
geom.updateModelBound();
applyMaterial(geom, polys, bindings);
代码示例来源:origin: org.jmonkeyengine/jme3-dae
geom = new Geometry("model");
geom.setMesh(mesh.get().getA());
geom.setModelBound(new BoundingBox());
geom.updateModelBound();
applyMaterial(geom, triangles, bindings);
代码示例来源:origin: org.jmonkeyengine/jme3-dae
geom = new Geometry("model");
geom.setMesh(mesh.get().getA());
geom.setModelBound(new BoundingBox());
geom.updateModelBound();
applyMaterial(geom, poly, bindings);
内容来源于网络,如有侵权,请联系作者删除!