public void visit(final Spatial spatial) { if (spatial instanceof Mesh) { ((Mesh) spatial).updateModelBound(); } } }
public void visit(final Spatial spatial) { if (spatial instanceof Mesh) { ((Mesh) spatial).updateModelBound(); } } }
/** * Updates the bounding volume of the morph mesh */ protected void updateBounding() { _morphMesh.updateModelBound(); }
@Override public void updateModelBound() { super.updateModelBound(); // if we make our model bound accurate, also make the collision tree accurate CollisionTreeManager.INSTANCE.removeCollisionTree(this); }
@Override public void updateModelBound() { super.updateModelBound(); // if we make our model bound accurate, also make the collision tree accurate CollisionTreeManager.INSTANCE.removeCollisionTree(this); }
/** * Sets the local bounding volume for this mesh to the given bounding volume. If autoCompute is true (default, if * not given) then we will modify the given modelBound to fit the current vertices of this mesh. This will also mark * the spatial as having dirty world bounds. * * @param modelBound * the bounding volume * @param autoCompute * if true, update the given modelBound to fit the vertices of this Mesh. */ public void setModelBound(final BoundingVolume modelBound, final boolean autoCompute) { _modelBound = modelBound != null ? modelBound.clone(_modelBound) : null; if (autoCompute) { updateModelBound(); } markDirty(DirtyType.Bounding); }
/** * Sets the local bounding volume for this mesh to the given bounding volume. If autoCompute is true (default, if * not given) then we will modify the given modelBound to fit the current vertices of this mesh. This will also mark * the spatial as having dirty world bounds. * * @param modelBound * the bounding volume * @param autoCompute * if true, update the given modelBound to fit the vertices of this Mesh. */ public void setModelBound(final BoundingVolume modelBound, final boolean autoCompute) { _modelBound = modelBound != null ? modelBound.clone(_modelBound) : null; if (autoCompute) { updateModelBound(); } markDirty(DirtyType.Bounding); }
public Spatial copy(final Spatial source, final AtomicBoolean recurse) { recurse.set(false); if (source instanceof Node) { recurse.set(true); return clone((Node) source); } else if (source instanceof Mesh) { final Mesh result = clone((Mesh) source); result.setMeshData(((Mesh) source).getMeshData()); result.updateModelBound(); return result; } return null; }
public Spatial copy(final Spatial source, final AtomicBoolean recurse) { recurse.set(false); if (source instanceof Node) { recurse.set(true); return clone((Node) source); } else if (source instanceof Mesh) { final Mesh result = clone((Mesh) source); result.setMeshData(((Mesh) source).getMeshData()); result.updateModelBound(); return result; } return null; }
public void initAllParticlesLocation() { for (int i = _particles.length; --i >= 0;) { initParticleLocation(i); _particles[i].updateVerts(null); } getParticleGeometry().updateModelBound(); }
public void initAllParticlesLocation() { for (int i = _particles.length; --i >= 0;) { initParticleLocation(i); _particles[i].updateVerts(null); } getParticleGeometry().updateModelBound(); }
triMesh.updateModelBound();
mapToGroups(mesh); mesh.updateModelBound();
polyMesh.updateModelBound();
polyMesh.updateModelBound();
@Override public void draw(final Renderer r) { final Camera camera = Camera.getCurrentCamera(); boolean anyAlive = false; for (int i = 0; i < _particles.length; i++) { final Particle particle = _particles[i]; if (particle.getStatus() == Particle.Status.Alive) { particle.updateVerts(camera); anyAlive = true; } } // Since we've updated our verts, update the model boundary where applicable if (getParticleGeometry().getWorldBound() != null && anyAlive) { getParticleGeometry().updateModelBound(); } if (!_particlesInWorldCoords) { getParticleGeometry().setWorldTransform(getWorldTransform()); } else { getParticleGeometry().setWorldTranslation(Vector3.ZERO); getParticleGeometry().setWorldRotation(Matrix3.IDENTITY); getParticleGeometry().setWorldScale(getWorldScale()); } getParticleGeometry().draw(r); }
@Override public void draw(final Renderer r) { final Camera camera = Camera.getCurrentCamera(); boolean anyAlive = false; for (int i = 0; i < _particles.length; i++) { final Particle particle = _particles[i]; if (particle.getStatus() == Particle.Status.Alive) { particle.updateVerts(camera); anyAlive = true; } } // Since we've updated our verts, update the model boundary where applicable if (getParticleGeometry().getWorldBound() != null && anyAlive) { getParticleGeometry().updateModelBound(); } if (!_particlesInWorldCoords) { getParticleGeometry().setWorldTransform(getWorldTransform()); } else { getParticleGeometry().setWorldTranslation(Vector3.ZERO); getParticleGeometry().setWorldRotation(Matrix3.IDENTITY); getParticleGeometry().setWorldScale(getWorldScale()); } getParticleGeometry().draw(r); }
particles.getParticleGeometry().updateModelBound(); particles.updateWorldBoundManually();
particles.getParticleGeometry().updateModelBound(); particles.updateWorldBoundManually();