Android Open Source - misty Camera






From Project

Back to project page misty.

License

The source code is released under:

MIT License

If you think the Android project misty listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.misty.graphics;
/*w w  w  . j  a v a  2 s  .c  om*/
import com.misty.kernel.Process;

public class Camera
{
  public float x = 0;
  public float y = 0;
  public int width = 0;
  public int height = 0;

  public Camera()
  {
  }

  public void setSize(ScreenResolution screenResolution)
  {
    this.width = screenResolution.horizontal;
    this.height = screenResolution.vertical;
  }

  public boolean isInside(Process process)
  {
    float right = this.x + this.width;
    float top = this.y + this.height;
    
    return process.fixedPosition || (!((right < process.x) || (top < process.y) || ((process.x + process.width) < this.x) || ((process.y + process.height) < this.y)));
  }
}




Java Source Code List

com.misty.audio.AudioManager.java
com.misty.debug.FPS.java
com.misty.debug.TimeCounter.java
com.misty.graphics.Animation.java
com.misty.graphics.Camera.java
com.misty.graphics.CollisionGrid.java
com.misty.graphics.Renderer.java
com.misty.graphics.ScreenResolution.java
com.misty.graphics.textures.TextureManager.java
com.misty.graphics.textures.Texture.java
com.misty.input.TouchEvent.java
com.misty.kernel.Alarm.java
com.misty.kernel.Engine.java
com.misty.kernel.Misty.java
com.misty.kernel.Process.java
com.misty.math.Rectangle.java
com.misty.math.Utils.java
com.misty.math.Vector.java
com.misty.utils.Assets.java