Пример #1
0
  protected void translate(iTranslatable aTranslatable) {
    GVector theVector;
    if (myRotationCenter != null) {
      theVector = new GVector(myRotationCenter.getCamCenterPoint());
    } else {
      theVector = new GVector(aTranslatable.getCamCenterPoint());
    }

    Transformation theTransform = new Transformation();
    theTransform.addTransformation(MatrixOperations.buildTranslationMatrix(theVector.inv()));
    theTransform.addTransformation(MatrixOperations.buildRotationMatrix(myRotation));
    theTransform.addTransformation(MatrixOperations.buildTranslationMatrix(theVector));
    aTranslatable.translate(theTransform);
  }