Esempio n. 1
0
    public void reset() {
      visible = false;

      baseLeft.leftChild = null;
      baseLeft.rightChild = null;
      baseRight.leftChild = null;
      baseRight.rightChild = null;

      baseLeft.baseNeighbor = baseRight;
      baseRight.baseNeighbor = baseLeft;

      baseLeft.rightNeighbor = null;
      baseLeft.leftNeighbor = null;
      baseRight.rightNeighbor = null;
      baseRight.leftNeighbor = null;
    }
Esempio n. 2
0
    public void init(int x, int y) {
      // 清空记录
      baseLeft.rightNeighbor = null;
      baseLeft.leftNeighbor = null;
      baseLeft.leftChild = null;
      baseLeft.rightChild = null;
      baseRight.rightNeighbor = null;
      baseRight.leftNeighbor = null;
      baseRight.leftChild = null;
      baseRight.rightChild = null;
      // 关联两个三角形
      baseLeft.baseNeighbor = baseRight;
      baseRight.baseNeighbor = baseLeft;

      this.x = x;
      this.y = y;
      dirty = true;
    }