Interface RenderingBoHasPositionRelativeToParent
-
- All Superinterfaces:
AutoCloseable
,RenderingBo
- All Known Subinterfaces:
DrawTileCableRenderingBo
,DrawTileEffectRenderingBo
,DrawTileHighlightRenderingBo
,DrawTileImageBo
,DrawTilePixmapRenderingBo
public interface RenderingBoHasPositionRelativeToParent extends RenderingBo
Rendering BOs deriving from this interface indicate that their relative x/y coordinates are relative to a parent at tilesetDestinationPosition (for example "entity pos", which is relative to it's composite entity world position) You can optionally set an alternative parent, for example to allow coordinate translation based on a different parent composite entity than the one of your current entity. This is also needed if you create this BO outside of onClientDrawEntity() call. Rendering business objects implementing this interface are then usually positioned using RenderingBo#withPositionRelative . Relative position is also scalable (scaleTile factor).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Optional<AbstractCompositeEntity>
getAlternativeParent()
double
getScaleTile()
RenderingBoHasPositionRelativeToParent
setAlternativeParent(Optional<AbstractCompositeEntity> alternativeParent)
Sets an alternative parent.RenderingBoHasPositionRelativeToParent
setScaleTile(double factor)
Sets a scale factor for rendering tiles (e.g.RenderingBoHasPositionRelativeToParent
setZoomFactor(double zoomFactor)
Sets the viewport's zoom factor.-
Methods inherited from interface java.lang.AutoCloseable
close
-
Methods inherited from interface de.extio.spacecraft.shared.client.renderer.RenderingBo
getLayer, getLocalX, getLocalY, getX, getY, setColor, setEngineData, setLayer, withPositionAbsoluteAnchorBottomLeft, withPositionAbsoluteAnchorBottomLeft, withPositionAbsoluteAnchorBottomRight, withPositionAbsoluteAnchorBottomRight, withPositionAbsoluteAnchorTopLeft, withPositionAbsoluteAnchorTopLeft, withPositionAbsoluteAnchorTopRight, withPositionAbsoluteAnchorTopRight, withPositionIncrementalAbsolute, withPositionIncrementalAbsolute, withPositionIncrementalPercentual, withPositionPercentual, withPositionRelative, withPositionRelative
-
-
-
-
Method Detail
-
setAlternativeParent
RenderingBoHasPositionRelativeToParent setAlternativeParent(Optional<AbstractCompositeEntity> alternativeParent)
Sets an alternative parent. This is needed if you create this BO outside of onClientDrawEntity() call or want to create it for a different parent.
-
getAlternativeParent
Optional<AbstractCompositeEntity> getAlternativeParent()
-
setScaleTile
RenderingBoHasPositionRelativeToParent setScaleTile(double factor)
Sets a scale factor for rendering tiles (e.g. 2.0 makes the tile appear double the size)
-
setZoomFactor
RenderingBoHasPositionRelativeToParent setZoomFactor(double zoomFactor)
Sets the viewport's zoom factor. This is usually managed by the core tile translator.
-
getScaleTile
double getScaleTile()
-
-