Module org.dyn4j

Interface LinearLimitsJoint

  • All Known Implementing Classes:
    DistanceJoint, PrismaticJoint, WheelJoint

    public interface LinearLimitsJoint
    Represents a joint that has a single set of linear limits.
    Since:
    5.0.0
    Version:
    5.0.0
    Author:
    William Bittle
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double getLowerLimit()
      Returns the lower limit in meters.
      double getUpperLimit()
      Returns the upper limit in meters.
      boolean isLowerLimitEnabled()
      Returns true if the lower limit is enabled.
      boolean isUpperLimitEnabled()
      Returns true if the upper limit is enabled.
      void setLimits​(double limit)
      Sets both the lower and upper limits to the given limit.
      void setLimits​(double lowerLimit, double upperLimit)
      Sets both the lower and upper limits.
      void setLimitsEnabled​(boolean flag)
      Enables or disables both the lower and upper limits.
      void setLimitsEnabled​(double limit)
      Sets both the lower and upper limits to the given limit and enables both.
      void setLimitsEnabled​(double lowerLimit, double upperLimit)
      Sets both the lower and upper limits and enables both.
      void setLowerLimit​(double lowerLimit)
      Sets the lower limit in meters.
      void setLowerLimitEnabled​(boolean flag)
      Sets whether the lower limit is enabled.
      void setUpperLimit​(double upperLimit)
      Sets the upper limit in meters.
      void setUpperLimitEnabled​(boolean flag)
      Sets whether the upper limit is enabled.
    • Method Detail

      • setUpperLimitEnabled

        void setUpperLimitEnabled​(boolean flag)
        Sets whether the upper limit is enabled.
        Parameters:
        flag - true if the upper limit should be enabled
      • isUpperLimitEnabled

        boolean isUpperLimitEnabled()
        Returns true if the upper limit is enabled.
        Returns:
        boolean true if the upper limit is enabled
      • setLowerLimitEnabled

        void setLowerLimitEnabled​(boolean flag)
        Sets whether the lower limit is enabled.
        Parameters:
        flag - true if the lower limit should be enabled
      • isLowerLimitEnabled

        boolean isLowerLimitEnabled()
        Returns true if the lower limit is enabled.
        Returns:
        boolean true if the lower limit is enabled
      • getUpperLimit

        double getUpperLimit()
        Returns the upper limit in meters.
        Returns:
        double
      • setUpperLimit

        void setUpperLimit​(double upperLimit)
        Sets the upper limit in meters.
        Parameters:
        upperLimit - the upper limit in meters
        Throws:
        IllegalArgumentException - if upperLimit is less than the current lower limit
      • getLowerLimit

        double getLowerLimit()
        Returns the lower limit in meters.
        Returns:
        double
      • setLowerLimit

        void setLowerLimit​(double lowerLimit)
        Sets the lower limit in meters.
        Parameters:
        lowerLimit - the lower limit in meters
        Throws:
        IllegalArgumentException - if lowerLimit is greater than the current upper limit
      • setLimits

        void setLimits​(double lowerLimit,
                       double upperLimit)
        Sets both the lower and upper limits.
        Parameters:
        lowerLimit - the lower limit in meters
        upperLimit - the upper limit in meters
        Throws:
        IllegalArgumentException - if lowerLimit is greater than upperLimit
      • setLimitsEnabled

        void setLimitsEnabled​(double lowerLimit,
                              double upperLimit)
        Sets both the lower and upper limits and enables both.
        Parameters:
        lowerLimit - the lower limit in meters
        upperLimit - the upper limit in meters
        Throws:
        IllegalArgumentException - if lowerLimit is greater than upperLimit
      • setLimitsEnabled

        void setLimitsEnabled​(boolean flag)
        Enables or disables both the lower and upper limits.
        Parameters:
        flag - true if both limits should be enabled
      • setLimits

        void setLimits​(double limit)
        Sets both the lower and upper limits to the given limit.
        Parameters:
        limit - the desired limit in meters
      • setLimitsEnabled

        void setLimitsEnabled​(double limit)
        Sets both the lower and upper limits to the given limit and enables both.
        Parameters:
        limit - the desired limit in meters