Module org.dyn4j

Class ContactPoint

    • Constructor Detail

      • ContactPoint

        public ContactPoint​(ContactPointId id,
                            PhysicsBody body1,
                            BodyFixture fixture1,
                            PhysicsBody body2,
                            BodyFixture fixture2,
                            Vector2 point,
                            Vector2 normal,
                            double depth,
                            boolean sensor)
        Deprecated.
        Full constructor.
        Parameters:
        id - the contact point id
        body1 - the first Body in contact
        fixture1 - the first Body's BodyFixture
        body2 - the second Body in contact
        fixture2 - the second Body's BodyFixture
        point - the world space contact point
        normal - the world space contact normal
        depth - the penetration depth
        sensor - true if the contact is a sensor contact
      • ContactPoint

        public ContactPoint​(ContactConstraint<? extends PhysicsBody> constraint,
                            Contact contact)
        Deprecated.
        Helper constructor for a contact constraint and contact.
        Parameters:
        constraint - the constraint
        contact - the contact
      • ContactPoint

        public ContactPoint​(ContactPoint contactPoint)
        Deprecated.
        Copy constructor (shallow).
        Parameters:
        contactPoint - the ContactPoint to copy
    • Method Detail

      • getPoint

        public Vector2 getPoint()
        Deprecated.
        Returns the contact point.
        Returns:
        Vector2
      • getNormal

        public Vector2 getNormal()
        Deprecated.
        Returns the normal.
        Returns:
        Vector2
      • getDepth

        public double getDepth()
        Deprecated.
        Returns the depth.
        Returns:
        double
      • isSensor

        public boolean isSensor()
        Deprecated.
        Returns true if this contact point is for a sensor.
        Returns:
        boolean