SAPProxy constructor

SAPProxy(
  1. SAPBroadPhase sap,
  2. Shape shape
)

A proxy for sweep and prune broad-phase.

sap the broard phase used in the proxy shape The shape applied to the proxy

Implementation

SAPProxy(this.sap, Shape shape):super(shape){
  min = List.filled(3, SAPElement(this, false));
  max = List.filled(3, SAPElement(this, true));

  max[0].pair = min[0];
  max[1].pair = min[1];
  max[2].pair = min[2];
  min[0].min1 = min[1];
  min[0].max1 = max[1];
  min[0].min2 = min[2];
  min[0].max2 = max[2];
  min[1].min1 = min[0];
  min[1].max1 = max[0];
  min[1].min2 = min[2];
  min[1].max2 = max[2];
  min[2].min1 = min[0];
  min[2].max1 = max[0];
  min[2].min2 = min[1];
  min[2].max2 = max[1];
}