This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Galaxy extends BaseRoom { | |
private Stage stage; | |
private SquidLayers display; | |
private SpriteBatch spriteBatch; | |
public Galaxy(int galaxySize, SpriteBatch spriteBatch) { | |
this.galaxySize = galaxySize; | |
this.spriteBatch = spriteBatch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(int px = 0; px < planet.getSolarSystemViewSprite().size(); px++) { | |
for(int py = 0; py < planet.getSolarSystemViewSprite().get(0).size(); py++) { | |
if(planet.getSolarSystemViewCircleMask().get(px).get(py) != 0 && planet.getSolarSystemViewCircleMask().get(px).get(py) != 1) | |
buffer[px+i-planet.getSolarSystemViewSprite().size()][py+j-planet.getSolarSystemViewSprite().size()/2] = new CelestialBody(' ', null, planet.getSolarSystemViewSprite().get(px).get(py), planet.getDescription()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
&&&&&&&&&&###### | |
&&eeeeeeeeeeeeeeee&&&&&&######%% | |
&&oooo********ooooooeeeeee&&&&########%% | |
oo****!!!!!!!!******ooooooeeee&&&&########%% | |
eeoo**!!!!::::::::!!!!******ooooeeee&&&&########%%%% | |
ee**!!::::::....::::::!!!!!!**ooooeeee&&&&&&########%%%% | |
ee**!!::..............::::!!!!****ooooeeee&&&&########%%%%%% | |
ee**!!::..................::::!!!!**ooooeeee&&&&##########%%%%%% | |
oo!!::....................::::!!!!****ooeeee&&&&&&########%%%%%% | |
oo**::......................::::!!!!****ooeeee&&&&&&##########%%%%%% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.carterza; | |
import java.util.stream.IntStream; | |
public class PlanetTest2 { | |
static char[] textShades; | |
public static void main(String[] args) { | |
double[] light = normalize(new double[]{30,30,-50}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Working | |
private static double dot (double[] v1, double[] v2) { | |
double d = v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2]; | |
if(d < 0) return -d; | |
return 0; | |
} | |
// Non-working | |
private static double dot(double[] v1, double[] v2) { | |
double d = v1[0]*v2[0] + v1[1] * v2[1] + v1[2] + v2[2]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
verts = | |
[ | |
{ p: new Vector3(0, +dv, +du), e: [], f: [] }, | |
{ p: new Vector3(0, +dv, -du), e: [], f: [] }, | |
{ p: new Vector3(0, -dv, +du), e: [], f: [] }, | |
{ p: new Vector3(0, -dv, -du), e: [], f: [] }, | |
{ p: new Vector3(+du, 0, +dv), e: [], f: [] }, | |
{ p: new Vector3(-du, 0, +dv), e: [], f: [] }, | |
{ p: new Vector3(+du, 0, -dv), e: [], f: [] }, | |
{ p: new Vector3(-du, 0, -dv), e: [], f: [] }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.carterza.geom; | |
/** | |
* Created by zachcarter on 12/14/16. | |
*/ | |
public class Icosahedron { | |
IcosahedronNode[] nodes; | |
IcosahedronEdge[] edges; | |
IcosahedronFace[] faces; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.carterza.geom.util; | |
import com.badlogic.gdx.graphics.Mesh; | |
import com.badlogic.gdx.graphics.VertexAttribute; | |
import com.badlogic.gdx.graphics.VertexAttributes; | |
import com.badlogic.gdx.math.Vector3; | |
import com.badlogic.gdx.utils.BufferUtils; | |
import com.carterza.geom.Node; | |
import com.carterza.geom.PanGraph; | |
import com.carterza.geom.Point; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.carterza.example; | |
import android.app.Activity; | |
import android.content.Intent; | |
import com.carterza.AndroidLauncher; | |
import com.spotify.sdk.android.authentication.AuthenticationClient; | |
import com.spotify.sdk.android.authentication.AuthenticationRequest; | |
import com.spotify.sdk.android.authentication.AuthenticationResponse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.carterza.example; | |
import android.app.Activity; | |
import android.content.Intent; | |
import com.carterza.AndroidLauncher; | |
import com.spotify.sdk.android.authentication.AuthenticationClient; | |
import com.spotify.sdk.android.authentication.AuthenticationRequest; | |
import com.spotify.sdk.android.authentication.AuthenticationResponse; |