Package jsim.dynamics

Class RigidBodyFlags

java.lang.Object
jsim.dynamics.RigidBodyFlags

public final class RigidBodyFlags extends Object
Bit-flag constants that control how a body participates in the simulation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Body responds to forces and collisions (default for dynamic objects).
    static final int
    Body does not rotate (infinite rotational inertia).
    static final int
    Body does not participate in collision detection or response.
    static final int
    Body is not affected by gravity.
    static final int
    Body has infinite mass and does not move.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isSet(int flags, int flag)
    Test whether a specific flag bit is set in a bitmask.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DYNAMIC

      public static final int DYNAMIC
      Body responds to forces and collisions (default for dynamic objects).
      See Also:
    • STATIC

      public static final int STATIC
      Body has infinite mass and does not move. Forces and impulses are still received by colliding dynamic bodies, but this body's state never changes.
      See Also:
    • NO_GRAVITY

      public static final int NO_GRAVITY
      Body is not affected by gravity. Useful for neutrally-buoyant game pieces or wheel-driven robots.
      See Also:
    • NO_COLLISION

      public static final int NO_COLLISION
      Body does not participate in collision detection or response. It still receives forces and integrates, so it can be used as a ghost / trigger volume when combined with a sensor implementation.
      See Also:
    • FIXED_ROTATION

      public static final int FIXED_ROTATION
      Body does not rotate (infinite rotational inertia).
      See Also:
  • Method Details

    • isSet

      public static boolean isSet(int flags, int flag)
      Test whether a specific flag bit is set in a bitmask.
      Parameters:
      flags - bitmask to test
      flag - single flag constant to check
      Returns:
      true if the flag bit is set in the bitmask