- Common ways to obtain EmitterShape
private void myMethod () {EmitterShape e =
InputCapsule inputCapsule;String str;Savable defVal;(EmitterShape) inputCapsule.readSavable(str, defVal)
- Smart code suggestions by Codota
}
shape = shape.deepClone(); particleInfluencer = particleInfluencer.clone();
@Override public void influenceParticle(Particle particle, EmitterShape emitterShape) { emitterShape.getRandomPoint(particle.position); this.applyVelocityVariation(particle); }
@Override public void influenceParticle(Particle particle, EmitterShape emitterShape) { emitterShape.getRandomPointAndNormal(particle.position, particle.velocity); // influencing the particle's velocity if (surfaceTangentFactor == 0.0f) { particle.velocity.multLocal(normalVelocity); } else { // calculating surface tangent (velocity contains the 'normal' value) temp.set(particle.velocity.z * surfaceTangentFactor, particle.velocity.y * surfaceTangentFactor, -particle.velocity.x * surfaceTangentFactor); if (surfaceTangentRotation != 0.0f) {// rotating the tangent Matrix3f m = new Matrix3f(); m.fromAngleNormalAxis(FastMath.PI * surfaceTangentRotation, particle.velocity); temp = m.multLocal(temp); } // applying normal factor (this must be done first) particle.velocity.multLocal(normalVelocity); // adding tangent vector particle.velocity.addLocal(temp); } if (velocityVariation != 0.0f) { this.applyVelocityVariation(particle); } }
clone.shape = shape.deepClone();
@Override public void influenceParticle(Particle particle, EmitterShape emitterShape) { emitterShape.getRandomPoint(particle.position); this.applyVelocityVariation(particle); }
@Override public void influenceParticle(Particle particle, EmitterShape emitterShape) { emitterShape.getRandomPointAndNormal(particle.position, particle.velocity); // influencing the particle's velocity if (surfaceTangentFactor == 0.0f) { particle.velocity.multLocal(normalVelocity); } else { // calculating surface tangent (velocity contains the 'normal' value) temp.set(particle.velocity.z * surfaceTangentFactor, particle.velocity.y * surfaceTangentFactor, -particle.velocity.x * surfaceTangentFactor); if (surfaceTangentRotation != 0.0f) {// rotating the tangent Matrix3f m = new Matrix3f(); m.fromAngleNormalAxis(FastMath.PI * surfaceTangentRotation, particle.velocity); temp = m.multLocal(temp); } // applying normal factor (this must be done first) particle.velocity.multLocal(normalVelocity); // adding tangent vector particle.velocity.addLocal(temp); } if (velocityVariation != 0.0f) { this.applyVelocityVariation(particle); } }
shape = shape.deepClone();
@Override public void influenceParticle(Particle particle, EmitterShape emitterShape) { emitterShape.getRandomPoint(particle.position); this.applyVelocityVariation(particle); }
@Override public void influenceParticle(Particle particle, EmitterShape emitterShape) { emitterShape.getRandomPointAndNormal(particle.position, particle.velocity); // influencing the particle's velocity if (surfaceTangentFactor == 0.0f) { particle.velocity.multLocal(normalVelocity); } else { // calculating surface tangent (velocity contains the 'normal' value) temp.set(particle.velocity.z * surfaceTangentFactor, particle.velocity.y * surfaceTangentFactor, -particle.velocity.x * surfaceTangentFactor); if (surfaceTangentRotation != 0.0f) {// rotating the tangent Matrix3f m = new Matrix3f(); m.fromAngleNormalAxis(FastMath.PI * surfaceTangentRotation, particle.velocity); temp = m.multLocal(temp); } // applying normal factor (this must be done first) particle.velocity.multLocal(normalVelocity); // adding tangent vector particle.velocity.addLocal(temp); } if (velocityVariation != 0.0f) { this.applyVelocityVariation(particle); } }
shape = shape.deepClone(); particleInfluencer = particleInfluencer.clone();
shape = shape.deepClone(); particleInfluencer = particleInfluencer.clone();
clone.shape = shape.deepClone();
@Override public ParticleEmitter clone(boolean cloneMaterial) { ParticleEmitter clone = (ParticleEmitter) super.clone(cloneMaterial); clone.shape = shape.deepClone();
shape = shape.deepClone();
shape = shape.deepClone();