Package gaiasky.scene.view
Class LineView
java.lang.Object
gaiasky.scene.view.AbstractView
gaiasky.scene.view.BaseView
gaiasky.scene.view.LineView
- All Implemented Interfaces:
ILineRenderable,IRenderable
-
Field Summary
FieldsFields inherited from class gaiasky.scene.view.AbstractView
entity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidContains actions to take after a new entity has been set.protected voidThis method is called when the entity of this view is cleared.Gets the component types of this entitydoubleGets the last distance to the camera calculated for this entityintfloatfloatReturns the opacity of this renderablevoidrender(LineRenderSystem renderer, ICamera camera, float alpha) Methods inherited from class gaiasky.scene.view.BaseView
componentsCheck, entityCheck, getBase, getBody, getComponent, hasCt, isVisible, isVisible, setColor, setVisible, setVisibleMethods inherited from class gaiasky.scene.view.AbstractView
check, clearEntity, getEntity, isEmpty, isValid, setEntity
-
Field Details
-
trajectory
-
verts
-
line
-
-
Constructor Details
-
LineView
public LineView()Creates an empty line view. -
LineView
public LineView(com.badlogic.ashley.core.Entity entity) Creates an abstract view with the given entity.- Parameters:
entity- The entity.
-
-
Method Details
-
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 classBaseView
-
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 classBaseView
-
getLineWidth
public float getLineWidth()- Specified by:
getLineWidthin interfaceILineRenderable
-
render
- Specified by:
renderin interfaceILineRenderable
-
getGlPrimitive
public int getGlPrimitive()- Specified by:
getGlPrimitivein interfaceILineRenderable
-
getComponentType
Description copied from interface:IRenderableGets the component types of this entity- Specified by:
getComponentTypein interfaceIRenderable- Overrides:
getComponentTypein classBaseView- Returns:
- The component types
-
getDistToCamera
public double getDistToCamera()Description copied from interface:IRenderableGets the last distance to the camera calculated for this entity- Specified by:
getDistToCamerain interfaceIRenderable- Returns:
- The distance
-
getOpacity
public float getOpacity()Description copied from interface:IRenderableReturns the opacity of this renderable- Specified by:
getOpacityin interfaceIRenderable- Overrides:
getOpacityin classBaseView- Returns:
- The opacity
-