Package gaiasky.interfce.minimap
Class AbstractMinimapScale
- java.lang.Object
-
- gaiasky.interfce.minimap.AbstractMinimapScale
-
- All Implemented Interfaces:
IMinimapScale
- Direct Known Subclasses:
HeliosphereMinimapScale,HighZMinimapScale,InnerSolarSystemMinimapScale,LocalGroup1MinimapScale,LocalGroup2MinimapScale,MilkyWayMinimapScale,OortCloudMinimapScale,OuterSolarSystemMinimapScale,SolarNeighbourhoodMinimapScale
public abstract class AbstractMinimapScale extends java.lang.Object implements IMinimapScale
-
-
Field Summary
Fields Modifier and Type Field Description protected Vector2daux2d1protected Vector2daux2d2protected Vector3daux3d1protected Vector3daux3d2protected ICameracamprotected com.badlogic.gdx.graphics.Colorcamcprotected float[]camdprotected float[]campprotected doubleextentDownExtent, in whatever units, of the minimap - where the edge isprotected doubleextentUpExtent, in whatever units, of the minimap - where the edge isprotected com.badlogic.gdx.graphics.g2d.BitmapFontfontprotected doublefromConversions to and from internal unitsprotected com.badlogic.gdx.graphics.OrthographicCameraorthoprotected com.badlogic.gdx.graphics.g2d.SpriteBatchsbprotected intsideprotected intside2protected intsideshortprotected intsideshort2protected com.badlogic.gdx.graphics.glutils.ShapeRenderersrprotected com.badlogic.gdx.graphics.Colorsuncprotected floatsunsprotected com.badlogic.gdx.graphics.Colortextbcprotected com.badlogic.gdx.graphics.Colortextccprotected com.badlogic.gdx.graphics.Colortextgcprotected com.badlogic.gdx.graphics.Colortextmcprotected com.badlogic.gdx.graphics.Colortextrcprotected com.badlogic.gdx.graphics.Colortextycprotected doubletoConversions to and from internal unitsprotected Matrix4dtrans
-
Constructor Summary
Constructors Constructor Description AbstractMinimapScale()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description float[]direction(Vector3d dir, float[] out)voiddispose()protected voidinitialize(com.badlogic.gdx.graphics.OrthographicCamera ortho, com.badlogic.gdx.graphics.g2d.SpriteBatch sb, com.badlogic.gdx.graphics.glutils.ShapeRenderer sr, com.badlogic.gdx.graphics.g2d.BitmapFont font, int side, int sideshort, double to, double from, double extentUp, double extentDown)booleanisActive(Vector3d campos, double distSun)float[]position(Vector3d pos, float[] out)protected floatpx(float px)protected voidrenderCameraSide()protected voidrenderCameraSide(float viewportAlpha)protected voidrenderCameraTop()protected voidrenderCameraTop(float viewportAlpha)protected intu2Px(double units, float side)Converts units to pixels, given the side/2 of the end minimapvoidupdate()protected abstract voidupdateLocal()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gaiasky.interfce.IMinimapScale
getName, initialize, renderSideProjection, renderTopProjection
-
-
-
-
Field Detail
-
ortho
protected com.badlogic.gdx.graphics.OrthographicCamera ortho
-
sb
protected com.badlogic.gdx.graphics.g2d.SpriteBatch sb
-
sr
protected com.badlogic.gdx.graphics.glutils.ShapeRenderer sr
-
font
protected com.badlogic.gdx.graphics.g2d.BitmapFont font
-
side
protected int side
-
sideshort
protected int sideshort
-
side2
protected int side2
-
sideshort2
protected int sideshort2
-
extentUp
protected double extentUp
Extent, in whatever units, of the minimap - where the edge is
-
extentDown
protected double extentDown
Extent, in whatever units, of the minimap - where the edge is
-
to
protected double to
Conversions to and from internal units
-
from
protected double from
Conversions to and from internal units
-
aux3d1
protected Vector3d aux3d1
-
aux3d2
protected Vector3d aux3d2
-
aux2d1
protected Vector2d aux2d1
-
aux2d2
protected Vector2d aux2d2
-
trans
protected Matrix4d trans
-
sunc
protected com.badlogic.gdx.graphics.Color sunc
-
camc
protected com.badlogic.gdx.graphics.Color camc
-
textbc
protected com.badlogic.gdx.graphics.Color textbc
-
textrc
protected com.badlogic.gdx.graphics.Color textrc
-
textgc
protected com.badlogic.gdx.graphics.Color textgc
-
textyc
protected com.badlogic.gdx.graphics.Color textyc
-
textcc
protected com.badlogic.gdx.graphics.Color textcc
-
textmc
protected com.badlogic.gdx.graphics.Color textmc
-
camp
protected float[] camp
-
camd
protected float[] camd
-
suns
protected float suns
-
cam
protected ICamera cam
-
-
Method Detail
-
initialize
protected void initialize(com.badlogic.gdx.graphics.OrthographicCamera ortho, com.badlogic.gdx.graphics.g2d.SpriteBatch sb, com.badlogic.gdx.graphics.glutils.ShapeRenderer sr, com.badlogic.gdx.graphics.g2d.BitmapFont font, int side, int sideshort, double to, double from, double extentUp, double extentDown)
-
update
public void update()
- Specified by:
updatein interfaceIMinimapScale
-
updateLocal
protected abstract void updateLocal()
-
position
public float[] position(Vector3d pos, float[] out)
-
direction
public float[] direction(Vector3d dir, float[] out)
-
isActive
public boolean isActive(Vector3d campos, double distSun)
- Specified by:
isActivein interfaceIMinimapScale
-
px
protected float px(float px)
-
u2Px
protected int u2Px(double units, float side)Converts units to pixels, given the side/2 of the end minimap- Parameters:
units- The value in whatever unitsside- Side/2 of minimap- Returns:
- Pixel coordinate
-
renderCameraSide
protected void renderCameraSide()
-
renderCameraSide
protected void renderCameraSide(float viewportAlpha)
-
renderCameraTop
protected void renderCameraTop()
-
renderCameraTop
protected void renderCameraTop(float viewportAlpha)
-
dispose
public void dispose()
- Specified by:
disposein interfaceIMinimapScale
-
-