示例#1
0
  public void setShear(double theta, double shx, double shy) {
    Mat3 tr1 = new Mat3();
    Mat3 tr2 = new Mat3();
    Mat3 rt = new Mat3();
    Mat3 sc = new Mat3();
    centroid = rt.centroid(p);

    tr1.setTranslation(centroid[0], centroid[1]);
    sc.setShear(shx, shy);
    rt.setRotation(theta);
    tr2.setTranslation(-centroid[0], -centroid[1]);
    at = tr1.multiply(rt);
    at = at.multiply(sc);
    at = at.multiply(tr2);
  }