Ejemplo n.º 1
0
  /** Apply transformations to this camera */
  public synchronized void doTransforms() {
    if (this.tiedObjectUpdated) {
      tiedObjectLocator.accept(tiedTo, this);
      this.tiedObjectUpdated = false;
    } else if (transforms.size() == 0) return;

    for (CameraTransform t : this.transforms.values()) {
      t.doTransform(this);
    }

    ot.saveCurrentTransforms(orientation);

    this.setChanged();
    this.notifyObservers(CAMERA_MOVED);
  }
Ejemplo n.º 2
0
 @Override
 public void setOrientation(IOrientation orientation) {
   this.orientation = orientation;
   ot.saveCurrentTransforms(orientation);
 }
Ejemplo n.º 3
0
 public void removeCameraRotation(CanvasObject obj) {
   ot.removeRotation(obj);
 }
Ejemplo n.º 4
0
 public void addCameraRotation(CanvasObject obj) {
   ot.addRotation(obj);
 }
Ejemplo n.º 5
0
 public void matchCameraRotation(CanvasObject obj) {
   obj.applyCameraTransform(new Rotation<YRotation>(YRotation.class, -ot.getyRot()), this);
   obj.applyCameraTransform(new Rotation<XRotation>(XRotation.class, -ot.getxRot()), this);
   obj.applyCameraTransform(new Rotation<ZRotation>(ZRotation.class, -ot.getzRot()), this);
 }