Class LabelView
java.lang.Object
gaiasky.scene.view.AbstractView
gaiasky.scene.view.BaseView
gaiasky.scene.view.RenderView
gaiasky.scene.view.LabelView
- All Implemented Interfaces:
I3DTextRenderable, IRenderable
-
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class RenderView
extra, particleSet, starSetFields inherited from class AbstractView
entity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprotected voidContains actions to take after a new entity has been set.protected voidentityCheck(com.badlogic.ashley.core.Entity entity) Checks whether the given entity is suitable for this view.protected voidThis method is called when the entity of this view is cleared.floatGets the text opacitybooleanisLabel()Is it a label or another kind of text?booleanvoidvoidrender(ExtSpriteBatch batch, ExtShaderProgram shader, TextRenderer sys, RenderingContext rc, ICamera camera) Renders the textprotected voidrender2DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, RenderingContext rc, BitmapFont font, ICamera camera, String label, float x, float y) protected voidrender2DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, RenderingContext rc, BitmapFont font, ICamera camera, String label, float x, float y, float scale) protected voidrender2DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, RenderingContext rc, BitmapFont font, ICamera camera, String label, float x, float y, float scale, int align) protected voidrender2DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, RenderingContext rc, BitmapFont font, ICamera camera, String label, Vector3D pos3d) protected voidrender3DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, BitmapFont font, ICamera camera, RenderingContext rc, String label, Vector3D pos, double distToCamera, float scale, double size, double radius, boolean forceLabel) protected voidrender3DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, BitmapFont font, ICamera camera, RenderingContext rc, String label, Vector3D pos, double distToCamera, float scale, double size, double radius, float minSizeDegrees, float maxSizeDegrees, boolean forceLabel) booleanTells whether the text must be rendered or not for this entitybooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleantext()Returns the textvoidExecutes the blending for the textvoidtextPosition(ICamera cam, Vector3D out) Text position for single objects (models, single stars, etc.).floatReturns the text scale for the scale varying in the shaderfloattextSize()Returns the text sizeMethods inherited from class RenderView
getDistToCamera, getOpacity, getRadius, textColour, textColourMethods inherited from class BaseView
componentsCheck, getBase, getBody, getComponent, getComponentType, hasCt, isVisible, isVisible, setColor, setVisible, setVisibleMethods inherited from class AbstractView
check, clearEntity, getEntity, isEmpty, isValid, setEntityMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface I3DTextRenderable
textColourMethods inherited from interface IRenderable
getComponentType, getDistToCamera, getOpacity
-
Field Details
-
label
-
graph
-
sa
-
cluster
-
bbSet
-
constel
-
mesh
-
ruler
-
loc
-
-
Constructor Details
-
LabelView
public LabelView()
-
-
Method Details
-
entityCheck
protected void entityCheck(com.badlogic.ashley.core.Entity entity) Description copied from class:AbstractViewChecks whether the given entity is suitable for this view. This method should throw aRuntimeExceptionif the entity is not suitable.- Overrides:
entityCheckin classBaseView- Parameters:
entity- The entity.
-
entityChanged
protected void entityChanged()Description copied from class:AbstractViewContains actions to take after a new entity has been set. This method is typically used to initialize the view components.- Overrides:
entityChangedin classRenderView
-
entityCleared
protected void entityCleared()Description copied from class:AbstractViewThis method is called when the entity of this view is cleared. It should set all component references to null.- Overrides:
entityClearedin classRenderView
-
renderTextCelestial
public boolean renderTextCelestial() -
renderTextParticle
public boolean renderTextParticle() -
renderTextLocation
public boolean renderTextLocation() -
renderTextKeyframe
public boolean renderTextKeyframe() -
renderTextRuler
public boolean renderTextRuler() -
renderTextBackgroundModel
public boolean renderTextBackgroundModel() -
renderTextTitle
public boolean renderTextTitle() -
renderTextTrajectory
public boolean renderTextTrajectory() -
renderTextGridRec
public boolean renderTextGridRec() -
renderTextEssential
public boolean renderTextEssential() -
renderTextBase
public boolean renderTextBase() -
renderText
public boolean renderText()Description copied from interface:I3DTextRenderableTells whether the text must be rendered or not for this entity- Specified by:
renderTextin interfaceI3DTextRenderable- Returns:
- True if text must be rendered
-
render
public void render(ExtSpriteBatch batch, ExtShaderProgram shader, TextRenderer sys, RenderingContext rc, ICamera camera) Description copied from interface:I3DTextRenderableRenders the text- Specified by:
renderin interfaceI3DTextRenderable- Parameters:
batch- The sprite batchshader- The shadersys- The text rendererrc- The render contextcamera- The camera
-
textSize
public float textSize()Description copied from interface:I3DTextRenderableReturns the text size- Specified by:
textSizein interfaceI3DTextRenderable- Returns:
- The text size
-
textScale
public float textScale()Description copied from interface:I3DTextRenderableReturns the text scale for the scale varying in the shader- Specified by:
textScalein interfaceI3DTextRenderable- Returns:
- The scale
-
textPosition
Text position for single objects (models, single stars, etc.).- Specified by:
textPositionin interfaceI3DTextRenderable- Parameters:
cam- The camera.out- The out parameter with the result.
-
text
Description copied from interface:I3DTextRenderableReturns the text- Specified by:
textin interfaceI3DTextRenderable- Returns:
- The text
-
textDepthBuffer
public void textDepthBuffer()Description copied from interface:I3DTextRenderableExecutes the blending for the text- Specified by:
textDepthBufferin interfaceI3DTextRenderable
-
defaultTextDepthBuffer
public void defaultTextDepthBuffer() -
noTextDepthBuffer
public void noTextDepthBuffer() -
emptyTextDepthBuffer
public void emptyTextDepthBuffer() -
isLabel
public boolean isLabel()Description copied from interface:I3DTextRenderableIs it a label or another kind of text?- Specified by:
isLabelin interfaceI3DTextRenderable- Returns:
- Whether this is a label
-
isLocation
public boolean isLocation() -
getTextOpacity
public float getTextOpacity()Description copied from interface:I3DTextRenderableGets the text opacity- Specified by:
getTextOpacityin interfaceI3DTextRenderable- Returns:
- Text opacity
-
render2DLabel
protected void render2DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, RenderingContext rc, BitmapFont font, ICamera camera, String label, Vector3D pos3d) -
render2DLabel
protected void render2DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, RenderingContext rc, BitmapFont font, ICamera camera, String label, float x, float y, float scale, int align) -
render2DLabel
protected void render2DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, RenderingContext rc, BitmapFont font, ICamera camera, String label, float x, float y) -
render2DLabel
protected void render2DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, RenderingContext rc, BitmapFont font, ICamera camera, String label, float x, float y, float scale) -
render3DLabel
protected void render3DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, BitmapFont font, ICamera camera, RenderingContext rc, String label, Vector3D pos, double distToCamera, float scale, double size, double radius, boolean forceLabel) -
render3DLabel
protected void render3DLabel(ExtSpriteBatch batch, ExtShaderProgram shader, BitmapFont font, ICamera camera, RenderingContext rc, String label, Vector3D pos, double distToCamera, float scale, double size, double radius, float minSizeDegrees, float maxSizeDegrees, boolean forceLabel)
-