@Override public synchronized void draw(final Renderer r) { if (_textString.length() > 0) { final Camera cam = Camera.getCurrentCamera(); if (!(_autoScale == AutoScale.Off && _autoFade == AutoFade.Off)) { updateScaleAndAlpha(cam, r); } correctTransform(cam); super.draw(r); } }
@Override public synchronized void draw(final Renderer r) { if (_font != null && _textString.length() > 0) { final Camera cam = Camera.getCurrentCamera(); if (!(_autoScale == AutoScale.Off && _autoFade == AutoFade.Off)) { updateScaleAndAlpha(cam, r); } // if text is transparent, don't spend time // calculating transform and drawing if (getDefaultColor().getAlpha() > 0.05) { correctTransform(cam); updateWorldBound(false); super.draw(r); } } }
@Override public synchronized void draw(final Renderer r) { this.setWorldRotation(_text.getWorldRotation()); this.setWorldTranslation(_text.getWorldTranslation()); this.setWorldScale(_text.getWorldScale()); super.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); }
@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); }