Beispiel #1
0
 public Viewport(Viewport other)
 {
     this.corner = other.corner;
     this.size = other.size;
     this.minSizeY = other.minSizeY;
 }
Beispiel #2
0
 public Vector2 scaleTo(Viewport other)
 {
     return other.size / size;
 }
Beispiel #3
0
 /*
  * Maps a vector from this viewport to other.
  */
 public Vector2 mapTo(Vector2 from, Viewport other)
 {
     return other.size * ((from - corner) / size) + other.corner;
 }
Beispiel #4
0
 public Vector2 scaleTo(Viewport other)
 {
     return(other.size / size);
 }
Beispiel #5
0
 /*
  * Maps a vector from this viewport to other.
  */
 public Vector2 mapTo(Vector2 from, Viewport other)
 {
     return(other.size * ((from - corner) / size) + other.corner);
 }
Beispiel #6
0
 public Viewport(Viewport other)
 {
     this.corner   = other.corner;
     this.size     = other.size;
     this.minSizeY = other.minSizeY;
 }