Android Open Source - wannabe Projections






From Project

Back to project page wannabe.

License

The source code is released under:

MIT License

If you think the Android project wannabe 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

// Copyright 2013 Patrick Forhan.
package wannabe.projection;
/*from www.  j  a  v a2  s  . co m*/
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/** Converts a 3d Position to a 2d coordinate for rendering. */
public class Projections {

  public static final List<Projection> PROJECTIONS =
      Collections.unmodifiableList(Arrays.asList(
          new Isometric(),
          new Flat(),
          new PseudoPerspective()
      ));

  public static Projection next(Projection current) {
    int nextIdx = PROJECTIONS.indexOf(current) + 1;
    return PROJECTIONS.get(nextIdx < PROJECTIONS.size() ? nextIdx : 0);
  }
}




Java Source Code List

android.util.ArrayUtils.java
android.util.SparseArray.java
android.util.SparseIntArray.java
wannabe.Camera.java
wannabe.Position.java
wannabe.Rendered.java
wannabe.UI.java
wannabe.Voxel.java
wannabe.android.MainActivity.java
wannabe.grid.FixedGrid.java
wannabe.grid.Grid.java
wannabe.grid.SimpleGrid.java
wannabe.projection.Flat.java
wannabe.projection.Isometric.java
wannabe.projection.Projection.java
wannabe.projection.Projections.java
wannabe.projection.PseudoPerspective.java
wannabe.swing.SettingsPanel.java
wannabe.swing.SwingWannabe.java
wannabe.swing.WannabePanel.java
wannabe.util.SampleGrids.java
wannabe.util.UIs.java