Module org.dyn4j

Class AbstractPhysicsBody

    • Field Detail

      • mass

        protected Mass mass
        The Mass information
      • linearVelocity

        protected final Vector2 linearVelocity
        The current linear velocity
      • angularVelocity

        protected double angularVelocity
        The current angular velocity
      • gravityScale

        protected double gravityScale
        The per body gravity scale factor
      • bullet

        protected boolean bullet
        True if the body is fast, small or both
      • atRestDetectionEnabled

        protected boolean atRestDetectionEnabled
        True if at-rest detection is enabled
      • atRest

        protected boolean atRest
        True if the body is at-rest
      • atRestTime

        protected double atRestTime
        The time that the PhysicsBody has been at-rest
      • force

        protected final Vector2 force
        The current force
      • torque

        protected double torque
        The current torque
      • forces

        protected final List<Force> forces
        The force accumulator
      • torques

        protected final List<Torque> torques
        The torque accumulator
    • Constructor Detail

      • AbstractPhysicsBody

        public AbstractPhysicsBody()
        Default constructor.
      • AbstractPhysicsBody

        public AbstractPhysicsBody​(int fixtureCount)
        Optional constructor.

        Creates a new AbstractPhysicsBody using the given estimated fixture count. Assignment of the initial fixture count allows sizing of internal structures for optimal memory/performance. This estimated fixture count is not a limit on the number of fixtures.

        Parameters:
        fixtureCount - the estimated number of fixtures
        Throws:
        IllegalArgumentException - if fixtureCount less than zero
        Since:
        3.1.1