Class SimplePositionedForce

java.lang.Object
foundry.veil.api.quasar.emitters.module.force.SimplePositionedForce
All Implemented Interfaces:
PositionedForce, ForceParticleModule, ParticleModule
Direct Known Subclasses:
PointAttractorForceModule, PointForceModule, VortexForceModule

public abstract class SimplePositionedForce extends Object implements ForceParticleModule, PositionedForce
  • Field Details

    • position

      protected final org.joml.Vector3d position
    • localPosition

      protected boolean localPosition
  • Constructor Details

    • SimplePositionedForce

      protected SimplePositionedForce(org.joml.Vector3d position, boolean localPosition)
    • SimplePositionedForce

      protected SimplePositionedForce(org.joml.Vector3dc position, boolean localPosition)
  • Method Details

    • getDeltaPosition

      protected org.joml.Vector3d getDeltaPosition(QuasarParticle particle)
    • getPosition

      public org.joml.Vector3d getPosition()
      Specified by:
      getPosition in interface PositionedForce
      Returns:
      The position of this force in emitter-relative space if PositionedForce.isLocalPosition() is true
    • isLocalPosition

      public boolean isLocalPosition()
      Specified by:
      isLocalPosition in interface PositionedForce
      Returns:
      Whether the position of this force is relative to the emitter
    • setForceOrigin

      public void setForceOrigin(double x, double y, double z)
      Description copied from interface: PositionedForce
      Directly sets the force origin to a global position.
      Specified by:
      setForceOrigin in interface PositionedForce
      Parameters:
      x - The new origin position X
      y - The new origin position Y
      z - The new origin position Z