/** * Updates the bounding volume of the mesh. Should be called when the * mesh has been modified. */ public void updateModelBound() { mesh.updateBound(); setBoundRefresh(); }
/** * 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(); }
/** * Sets the mesh to use for this geometry when rendering. * * @param mesh the mesh to use for this geometry * * @throws IllegalArgumentException If mesh is null */ public void setMesh(Mesh mesh) { if (mesh == null) { throw new IllegalArgumentException(); } this.mesh = mesh; setBoundRefresh(); if (isGrouped()) { groupNode.onMeshChange(this); } }
/** * Updates the bounding volume of the mesh. Should be called when the * mesh has been modified. */ public void updateModelBound() { mesh.updateBound(); setBoundRefresh(); }
/** * Updates the bounding volume of the mesh. Should be called when the * mesh has been modified. */ public void updateModelBound() { mesh.updateBound(); setBoundRefresh(); }
/** * Sets the mesh to use for this geometry when rendering. * * @param mesh the mesh to use for this geometry * * @throws IllegalArgumentException If mesh is null */ public void setMesh(Mesh mesh) { if (mesh == null) { throw new IllegalArgumentException(); } if (isBatched()) { throw new UnsupportedOperationException("Cannot set the mesh of a batched geometry"); } this.mesh = mesh; setBoundRefresh(); }
/** * 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(); }
/** * 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(); }
/** * Sets the mesh to use for this geometry when rendering. * * @param mesh the mesh to use for this geometry * * @throws IllegalArgumentException If mesh is null */ public void setMesh(Mesh mesh) { if (mesh == null) { throw new IllegalArgumentException(); } this.mesh = mesh; setBoundRefresh(); if (isGrouped()) { groupNode.onMeshChange(this); } }