Module org.dyn4j

Class Torque


  • public class Torque
    extends Object
    Represents a torque about the z-axis.
    Since:
    1.0.0
    Version:
    4.0.0
    Author:
    William Bittle
    • Constructor Detail

      • Torque

        public Torque()
        Default constructor.
        Since:
        1.0.2
      • Torque

        public Torque​(double torque)
        Creates a Torque using specified torque value.
        Parameters:
        torque - the torque
    • Method Detail

      • set

        public void set​(double torque)
        Sets this Torque to the given torque value.
        Parameters:
        torque - the torque
      • isComplete

        public boolean isComplete​(double elapsedTime)
        Returns true if this torque should be removed.

        Implement this method to create Torque objects that are not cleared during the accumulation step.

        The default implementation always returns true.

        Parameters:
        elapsedTime - the elapsed time since the last call to this method
        Returns:
        boolean true if this torque should be removed
        Since:
        3.1.0
      • getTorque

        public double getTorque()
        Returns the torque value.
        Returns:
        double