Back to project page wannabe.
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.
// 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); } }