Module org.dyn4j

Class ConstraintGraphNode<T extends PhysicsBody>

  • Type Parameters:
    T - the PhysicsBody type

    public final class ConstraintGraphNode<T extends PhysicsBody>
    extends Object
    Represents a node in the constraint graph.

    Each node is a PhysicsBody with the ContactConstraints and Joints being the edges to the other nodes.

    Since:
    4.0.0
    Version:
    4.0.0
    Author:
    William Bittle
    • Field Detail

      • contactConstraints

        protected final List<ContactConstraint<T extends PhysicsBody>> contactConstraints
        The contact constraints connecting this body and other bodies
      • joints

        protected final List<Joint<T extends PhysicsBody>> joints
        The joints connecting this body and other bodies
      • contactConstraintsUnmodifiable

        protected final List<ContactConstraint<T extends PhysicsBody>> contactConstraintsUnmodifiable
        An unmodifiable view of the contacts list
      • jointsUnmodifiable

        protected final List<Joint<T extends PhysicsBody>> jointsUnmodifiable
        An unmodifiable view of the joints list
    • Constructor Detail

      • ConstraintGraphNode

        public ConstraintGraphNode​(T body)
        Minimal constructor.
        Parameters:
        body - the body
    • Method Detail

      • getBody

        public T getBody()
        Returns the body at this node.
        Returns:
        T
      • getJoints

        public List<Joint<T>> getJoints()
        Returns the list of joints this body is connected with.
        Returns:
        List<Joint<T>>