Class BaseView
java.lang.Object
gaiasky.scene.view.AbstractView
gaiasky.scene.view.BaseView
- Direct Known Subclasses:
BillboardView, FilterView, FocusView, KeyframesView, LineView, ModelView, RenderView, SpacecraftView, VertsView
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe base component.The body component.The render component.Fields inherited from class AbstractView
entity -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancomponentsCheck(com.badlogic.ashley.core.Entity entity) Check whether the current components are the same as the components of the given entity.protected 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.getBase()getBody()<T extends com.badlogic.ashley.core.Component>
TgetComponent(Class<T> c) floatbooleanbooleanbooleanbooleanisVisible(boolean attributeValue) voidsetColor(float[] color) voidsetVisible(boolean visible) voidsetVisible(boolean visible, String name) Methods inherited from class AbstractView
check, clearEntity, getEntity, isEmpty, isValid, setEntity
-
Field Details
-
base
The base component. -
body
The body component. -
render
The render component.
-
-
Constructor Details
-
BaseView
public BaseView() -
BaseView
public BaseView(com.badlogic.ashley.core.Entity entity)
-
-
Method Details
-
componentsCheck
protected boolean componentsCheck(com.badlogic.ashley.core.Entity entity) Description copied from class:AbstractViewCheck whether the current components are the same as the components of the given entity.- Specified by:
componentsCheckin classAbstractView- Parameters:
entity- The entity to check.- Returns:
- True if the components are the same, false otherwise.
-
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.- Specified by:
entityCheckin classAbstractView- 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.- Specified by:
entityChangedin classAbstractView
-
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.- Specified by:
entityClearedin classAbstractView
-
setColor
public void setColor(float[] color) -
getComponent
-
getOpacity
public float getOpacity() -
getComponentType
-
getBase
-
getBody
-
getRender
-
isVisible
public boolean isVisible() -
setVisible
public void setVisible(boolean visible) -
setVisible
-
isVisible
public boolean isVisible(boolean attributeValue) -
hasCt
-
isHalfResolutionBuffer
public boolean isHalfResolutionBuffer()
-