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
Fields inherited from class gaiasky.scene.view.AbstractView
entity
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Contains actions to take after a new entity has been set.protected void
This method is called when the entity of this view is cleared.Gets the component types of this entitydouble
Gets the last distance to the camera calculated for this entityint
float
float
Returns the opacity of this renderablevoid
render
(LineRenderSystem renderer, ICamera camera, float alpha) Methods inherited from class gaiasky.scene.view.BaseView
componentsCheck, entityCheck, getBase, getBody, getComponent, hasCt, isVisible, isVisible, setColor, setVisible, setVisible
Methods 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:AbstractView
Contains actions to take after a new entity has been set. This method is typically used to initialize the view components.- Overrides:
entityChanged
in classBaseView
-
entityCleared
protected void entityCleared()Description copied from class:AbstractView
This method is called when the entity of this view is cleared. It should set all component references to null.- Overrides:
entityCleared
in classBaseView
-
getLineWidth
public float getLineWidth()- Specified by:
getLineWidth
in interfaceILineRenderable
-
render
- Specified by:
render
in interfaceILineRenderable
-
getGlPrimitive
public int getGlPrimitive()- Specified by:
getGlPrimitive
in interfaceILineRenderable
-
getComponentType
Description copied from interface:IRenderable
Gets the component types of this entity- Specified by:
getComponentType
in interfaceIRenderable
- Overrides:
getComponentType
in classBaseView
- Returns:
- The component types
-
getDistToCamera
public double getDistToCamera()Description copied from interface:IRenderable
Gets the last distance to the camera calculated for this entity- Specified by:
getDistToCamera
in interfaceIRenderable
- Returns:
- The distance
-
getOpacity
public float getOpacity()Description copied from interface:IRenderable
Returns the opacity of this renderable- Specified by:
getOpacity
in interfaceIRenderable
- Overrides:
getOpacity
in classBaseView
- Returns:
- The opacity
-