Class ParticleForceAffector


  • public abstract class ParticleForceAffector
    extends Object
    Force to apply on a particle emitter. [invariant force not null].
    Author:
    Grégory Van Den Borre
    • Constructor Detail

      • ParticleForceAffector

        protected ParticleForceAffector()
        Simple constructor.
    • Method Detail

      • setForce

        public final void setForce​(float forceX,
                                   float forceY,
                                   float forceZ)
        Set the force direction and strength.
        Parameters:
        forceX - Force to apply on X direction.
        forceY - Force to apply on Y direction.
        forceZ - Force to apply on Z direction.
      • setForce

        public final void setForce​(be.yildizgames.common.geometry.Point3D force)
        Set the force direction and strength.
        Parameters:
        force - Force to apply [assert not null].
      • getForce

        public be.yildizgames.common.geometry.Point3D getForce()
        Provide the current force.
        Returns:
        The current force applied, [ensure not null].
      • setForceImpl

        protected abstract void setForceImpl​(float forceX,
                                             float forceY,
                                             float forceZ)
        Set the force in implementation.
        Parameters:
        forceX - Force to apply on X direction.
        forceY - Force to apply on Y direction.
        forceZ - Force to apply on Z direction.