本文整理了Java中com.jme3.scene.Mesh.setBound()
方法的一些代码示例,展示了Mesh.setBound()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mesh.setBound()
方法的具体详情如下:
包路径:com.jme3.scene.Mesh
类名称:Mesh
方法名:setBound
[英]Sets the BoundingVolume for this Mesh. The bounding volume is recomputed by calling #updateBound().
[中]设置此网格的边界体积。通过调用#updateBound()重新计算边界卷。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Sets the model bound to use for this geometry.
* This alters the bound used on the mesh as well via
* {@link Mesh#setBound(com.jme3.bounding.BoundingVolume) } and
* forces the world bounding volume to be recomputed.
*
* @param modelBound The model bound to set
*/
@Override
public void setModelBound(BoundingVolume modelBound) {
this.worldBound = null;
mesh.setBound(modelBound);
setBoundRefresh();
// NOTE: Calling updateModelBound() would cause the mesh
// to recompute the bound based on the geometry thus making
// this call useless!
//updateModelBound();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
q.setBound(new BoundingSphere());
q.updateBound();
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
@Override
public void simpleInitApp() {
Mesh mesh = new Mesh();
mesh.setBuffer(VertexBuffer.Type.Index, 1, BufferUtils.createIntBuffer(new int[]{1}));
mesh.setBuffer(VertexBuffer.Type.Position, 3, BufferUtils.createFloatBuffer(new float[]{0, 0, 0}));
mesh.setMode(Mesh.Mode.Points);
mesh.setBound(new BoundingBox(new Vector3f(0, 0, 0), 10, 10, 10));
mesh.updateCounts();
Geometry geometry = new Geometry("Test", mesh);
geometry.updateGeometricState();
geometry.setMaterial(new Material(assetManager, "Materials/Geom/SimpleGeom.j3md"));
//geometry.getMaterial().getAdditionalRenderState().setFaceCullMode(RenderState.FaceCullMode.Off);
//geometry.setMaterial(assetManager.loadMaterial("Materials/Geom/SimpleTess.j3md"));
rootNode.attachChild(geometry);
Geometry geometry1 = new Geometry("T1", new Sphere(10, 10, 1));
geometry1.setMaterial(new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"));
rootNode.attachChild(geometry1);
}
代码示例来源:origin: info.projectkyoto/mms-engine
/**
* Sets the model bound to use for this geometry.
* This alters the bound used on the mesh as well via
* {@link Mesh#setBound(com.jme3.bounding.BoundingVolume) } and
* forces the world bounding volume to be recomputed.
*
* @param modelBound The model bound to set
*/
@Override
public void setModelBound(BoundingVolume modelBound) {
this.worldBound = null;
mesh.setBound(modelBound);
setBoundRefresh();
// NOTE: Calling updateModelBound() would cause the mesh
// to recompute the bound based on the geometry thus making
// this call useless!
//updateModelBound();
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Sets the model bound to use for this geometry.
* This alters the bound used on the mesh as well via
* {@link Mesh#setBound(com.jme3.bounding.BoundingVolume) } and
* forces the world bounding volume to be recomputed.
*
* @param modelBound The model bound to set
*/
@Override
public void setModelBound(BoundingVolume modelBound) {
this.worldBound = null;
mesh.setBound(modelBound);
setBoundRefresh();
// NOTE: Calling updateModelBound() would cause the mesh
// to recompute the bound based on the geometry thus making
// this call useless!
//updateModelBound();
}
内容来源于网络,如有侵权,请联系作者删除!