Joint constructor

Joint(
  1. IWorldPool worldPool,
  2. JointDef def
)

Implementation

Joint(IWorldPool worldPool, JointDef def) : _type = def.type {
  assert(def.bodyA != def.bodyB);

  pool = worldPool;
  _prev = null;
  _next = null;
  _bodyA = def.bodyA;
  _bodyB = def.bodyB;
  _collideConnected = def.collideConnected;
  _islandFlag = false;

  _edgeA = new JointEdge();
  _edgeA.joint = null;
  _edgeA.other = null;
  _edgeA.prev = null;
  _edgeA.next = null;

  _edgeB = new JointEdge();
  _edgeB.joint = null;
  _edgeB.other = null;
  _edgeB.prev = null;
  _edgeB.next = null;
}