/** * Sets the local bounding volume for this mesh to the given bounds, updated to fit the vertices of this Mesh. Marks * the spatial as having dirty world bounds. * * @param modelBound * the bounding volume - only type is used, actual values are replaced. */ public void setModelBound(final BoundingVolume modelBound) { setModelBound(modelBound, true); }
/** * Sets the local bounding volume for this mesh to the given bounds, updated to fit the vertices of this Mesh. Marks * the spatial as having dirty world bounds. * * @param modelBound * the bounding volume - only type is used, actual values are replaced. */ public void setModelBound(final BoundingVolume modelBound) { setModelBound(modelBound, true); }
public void visit(final Spatial spatial) { if (spatial instanceof Mesh) { ((Mesh) spatial).setModelBound(_bound.clone(null)); } } }
public void visit(final Spatial spatial) { if (spatial instanceof Mesh) { ((Mesh) spatial).setModelBound(_bound.clone(null)); } } }
public Mesh getCombinedMesh() { final Mesh mesh = getMesh(); // set our bounding volume using the volume type of our first source found above. mesh.setModelBound(volumeType); // set the render states from the first mesh for (final RenderState state : states.values()) { mesh.setRenderState(state); } return mesh; }
public Mesh getCombinedMesh() { final Mesh mesh = getMesh(); // set our bounding volume using the volume type of our first source found above. mesh.setModelBound(volumeType); // set the render states from the first mesh for (final RenderState state : states.values()) { mesh.setRenderState(state); } return mesh; }
@Override public Mesh makeCopy(final boolean shareGeometricData) { // get copy of basic spatial info final Mesh mesh = (Mesh) super.makeCopy(shareGeometricData); // if we are sharing, just reuse meshdata if (shareGeometricData) { mesh.setMeshData(_meshData); } else { // make a copy of our data mesh.setMeshData(_meshData.makeCopy()); } // copy our basic properties mesh.setModelBound(_modelBound != null ? _modelBound.clone(null) : null); mesh.setVisible(_isVisible); mesh.setRenderMaterial(_material); mesh._properties.putAll(_properties); // return return mesh; }
@Override public Mesh makeInstanced() { final Mesh mesh = (Mesh) super.makeInstanced(); if (_meshData.getInstancingManager() == null) { _meshData.setInstancingManager(new InstancingManager()); } mesh.setMeshData(_meshData); mesh.setModelBound(_modelBound != null ? _modelBound.clone(null) : null); mesh.setVisible(_isVisible); return mesh; }
@Override public Mesh makeInstanced() { final Mesh mesh = (Mesh) super.makeInstanced(); if (_meshData.getInstancingManager() == null) { _meshData.setInstancingManager(new InstancingManager()); } mesh.setMeshData(_meshData); mesh.setModelBound(_modelBound != null ? _modelBound.clone(null) : null); mesh._defaultColor = _defaultColor; mesh.setVisible(_isVisible); return mesh; }
@Override public Mesh makeCopy(final boolean shareGeometricData) { // get copy of basic spatial info final Mesh mesh = (Mesh) super.makeCopy(shareGeometricData); // if we are sharing, just reuse meshdata if (shareGeometricData) { mesh.setMeshData(_meshData); } else { // make a copy of our data mesh.setMeshData(_meshData.makeCopy()); } // copy our basic properties mesh.setModelBound(_modelBound != null ? _modelBound.clone(null) : null); mesh.setDefaultColor(_defaultColor); mesh.setVisible(_isVisible); // return return mesh; }
mesh.setModelBound(new BoundingBox());