Module org.dyn4j

Class ConvexCastResult

  • All Implemented Interfaces:
    java.lang.Comparable<ConvexCastResult>

    public class ConvexCastResult
    extends java.lang.Object
    implements java.lang.Comparable<ConvexCastResult>
    Represents the result of a convex cast.

    Note: this class has a natural ordering that is inconsistent with equals.

    Since:
    3.1.5
    Version:
    3.2.0
    Author:
    William Bittle
    • Field Detail

      • body

        protected Body body
        The body
      • fixture

        protected BodyFixture fixture
        The body fixture with the smallest time of impact
      • timeOfImpact

        protected TimeOfImpact timeOfImpact
        The time of impact information
    • Constructor Detail

      • ConvexCastResult

        public ConvexCastResult()
        Default constructor.
      • ConvexCastResult

        public ConvexCastResult​(Body body,
                                BodyFixture fixture,
                                TimeOfImpact timeOfImpact)
        Full constructor.
        Parameters:
        body - the body
        fixture - the fixture
        timeOfImpact - the time of impact
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getBody

        public Body getBody()
        Returns the body.
        Returns:
        Body
      • setBody

        public void setBody​(Body body)
        Sets the body.
        Parameters:
        body - the Body
      • getFixture

        public BodyFixture getFixture()
        Returns the fixture on the body with the smallest time of impact.
        Returns:
        BodyFixture
      • setFixture

        public void setFixture​(BodyFixture fixture)
        Sets the fixture with the smallest time of impact.
        Parameters:
        fixture - the fixture
      • setTimeOfImpact

        public void setTimeOfImpact​(TimeOfImpact timeOfImpact)
        Sets the time of impact information.
        Parameters:
        timeOfImpact - the time of impact