- Object
-
- ConstraintGraphNode<T>
-
- Type Parameters:
T
- thePhysicsBody
type
public final class ConstraintGraphNode<T extends PhysicsBody> extends Object
Represents a node in the constraint graph.Each node is a
PhysicsBody
with theContactConstraint
s andJoint
s being the edges to the other nodes.- Since:
- 4.0.0
- Version:
- 4.0.0
- Author:
- William Bittle
-
-
Field Summary
Fields Modifier and Type Field Description protected T
body
The bodyprotected List<ContactConstraint<T>>
contactConstraints
The contact constraints connecting this body and other bodiesprotected List<ContactConstraint<T>>
contactConstraintsUnmodifiable
An unmodifiable view of the contacts listprotected List<Joint<T>>
joints
The joints connecting this body and other bodiesprotected List<Joint<T>>
jointsUnmodifiable
An unmodifiable view of the joints list
-
Constructor Summary
Constructors Constructor Description ConstraintGraphNode(T body)
Minimal constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getBody()
Returns the body at this node.List<ContactConstraint<T>>
getContactConstraints()
Returns the list of contact constraints this body is connected with.List<Joint<T>>
getJoints()
Returns the list of joints this body is connected with.
-
-
-
Field Detail
-
body
protected final T extends PhysicsBody body
The body
-
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>>
-
getContactConstraints
public List<ContactConstraint<T>> getContactConstraints()
Returns the list of contact constraints this body is connected with.- Returns:
- List<
ContactConstraint
<T>>
-
-