public interface IEntity extends IDrawHandler, IUpdateHandler, IDisposable
IUpdateHandler.IUpdateHandlerMatcherIDisposable.AlreadyDisposedException| Modifier and Type | Field and Description |
|---|---|
static int |
TAG_INVALID |
| Modifier and Type | Method and Description |
|---|---|
void |
attachChild(IEntity pEntity) |
void |
callOnChildren(IEntityParameterCallable pEntityParameterCallable) |
void |
callOnChildren(IEntityParameterCallable pEntityParameterCallable,
IEntityMatcher pEntityMatcher) |
void |
clearEntityModifiers() |
void |
clearUpdateHandlers() |
float[] |
convertLocalToSceneCoordinates(float[] pCoordinates) |
float[] |
convertLocalToSceneCoordinates(float[] pCoordinates,
float[] pReuse) |
float[] |
convertLocalToSceneCoordinates(float pX,
float pY) |
float[] |
convertLocalToSceneCoordinates(float pX,
float pY,
float[] pReuse) |
float[] |
convertSceneToLocalCoordinates(float[] pCoordinates) |
float[] |
convertSceneToLocalCoordinates(float[] pCoordinates,
float[] pReuse) |
float[] |
convertSceneToLocalCoordinates(float pX,
float pY) |
float[] |
convertSceneToLocalCoordinates(float pX,
float pY,
float[] pReuse) |
boolean |
detachChild(IEntity pEntity)
WARNING: This function should be called from within
RunnableHandler.postRunnable(Runnable) which is registered
to a Scene or the Engine itself, because otherwise
it may throw an IndexOutOfBoundsException in the
Update-Thread or the GL-Thread! |
IEntity |
detachChild(IEntityMatcher pEntityMatcher)
WARNING: This function should be called from within
RunnableHandler.postRunnable(Runnable) which is registered
to a Scene or the Engine itself, because otherwise
it may throw an IndexOutOfBoundsException in the
Update-Thread or the GL-Thread! |
IEntity |
detachChild(int pTag)
WARNING: This function should be called from within
RunnableHandler.postRunnable(Runnable) which is registered
to a Scene or the Engine itself, because otherwise
it may throw an IndexOutOfBoundsException in the
Update-Thread or the GL-Thread! |
void |
detachChildren() |
boolean |
detachChildren(IEntityMatcher pEntityMatcher)
WARNING: This function should be called from within
RunnableHandler.postRunnable(Runnable) which is registered
to a Scene or the Engine itself, because otherwise
it may throw an IndexOutOfBoundsException in the
Update-Thread or the GL-Thread! |
boolean |
detachSelf() |
float |
getAlpha() |
float |
getBlue() |
IEntity |
getChildByIndex(int pIndex) |
IEntity |
getChildByMatcher(IEntityMatcher pEntityMatcher) |
IEntity |
getChildByTag(int pTag) |
int |
getChildCount() |
Color |
getColor() |
int |
getEntityModifierCount() |
IEntity |
getFirstChild() |
float |
getGreen() |
IEntity |
getLastChild() |
Transformation |
getLocalToParentTransformation() |
Transformation |
getLocalToSceneTransformation() |
IEntity |
getParent() |
Transformation |
getParentToLocalTransformation() |
float |
getRed() |
float |
getRotation() |
float |
getRotationCenterX() |
float |
getRotationCenterY() |
float |
getScaleCenterX() |
float |
getScaleCenterY() |
float |
getScaleX() |
float |
getScaleY() |
float[] |
getSceneCenterCoordinates() |
float[] |
getSceneCenterCoordinates(float[] pReuse) |
Transformation |
getSceneToLocalTransformation() |
float |
getSkewCenterX() |
float |
getSkewCenterY() |
float |
getSkewX() |
float |
getSkewY() |
int |
getTag() |
int |
getUpdateHandlerCount() |
java.lang.Object |
getUserData() |
float |
getX() |
float |
getY() |
int |
getZIndex() |
boolean |
hasParent() |
boolean |
isChildrenIgnoreUpdate() |
boolean |
isChildrenVisible() |
boolean |
isCulled(Camera pCamera)
Will only be performed if
isCullingEnabled() is true. |
boolean |
isCullingEnabled() |
boolean |
isIgnoreUpdate() |
boolean |
isRotated() |
boolean |
isRotatedOrScaledOrSkewed() |
boolean |
isScaled() |
boolean |
isSkewed() |
boolean |
isVisible() |
void |
onAttached() |
void |
onDetached() |
java.util.ArrayList<IEntity> |
query(IEntityMatcher pEntityMatcher) |
<L extends java.util.List<IEntity>> |
query(IEntityMatcher pEntityMatcher,
L pResult) |
IEntity |
queryFirst(IEntityMatcher pEntityMatcher) |
<S extends IEntity> |
queryFirstForSubclass(IEntityMatcher pEntityMatcher) |
<S extends IEntity> |
queryForSubclass(IEntityMatcher pEntityMatcher) |
<L extends java.util.List<S>,S extends IEntity> |
queryForSubclass(IEntityMatcher pEntityMatcher,
L pResult) |
void |
registerEntityModifier(IEntityModifier pEntityModifier) |
void |
registerUpdateHandler(IUpdateHandler pUpdateHandler) |
void |
setAlpha(float pAlpha) |
void |
setBlue(float pBlue) |
void |
setChildrenIgnoreUpdate(boolean pChildrenIgnoreUpdate) |
void |
setChildrenVisible(boolean pChildrenVisible) |
void |
setColor(Color pColor) |
void |
setColor(float pRed,
float pGreen,
float pBlue) |
void |
setColor(float pRed,
float pGreen,
float pBlue,
float pAlpha) |
void |
setCullingEnabled(boolean pCullingEnabled) |
void |
setGreen(float pGreen) |
void |
setIgnoreUpdate(boolean pIgnoreUpdate) |
void |
setParent(IEntity pEntity) |
void |
setPosition(float pX,
float pY) |
void |
setPosition(IEntity pOtherEntity) |
void |
setRed(float pRed) |
void |
setRotation(float pRotation) |
void |
setRotationCenter(float pRotationCenterX,
float pRotationCenterY) |
void |
setRotationCenterX(float pRotationCenterX) |
void |
setRotationCenterY(float pRotationCenterY) |
void |
setScale(float pScale) |
void |
setScale(float pScaleX,
float pScaleY) |
void |
setScaleCenter(float pScaleCenterX,
float pScaleCenterY) |
void |
setScaleCenterX(float pScaleCenterX) |
void |
setScaleCenterY(float pScaleCenterY) |
void |
setScaleX(float pScaleX) |
void |
setScaleY(float pScaleY) |
void |
setSkew(float pSkew) |
void |
setSkew(float pSkewX,
float pSkewY) |
void |
setSkewCenter(float pSkewCenterX,
float pSkewCenterY) |
void |
setSkewCenterX(float pSkewCenterX) |
void |
setSkewCenterY(float pSkewCenterY) |
void |
setSkewX(float pSkewX) |
void |
setSkewY(float pSkewY) |
void |
setTag(int pTag) |
void |
setUserData(java.lang.Object pUserData) |
void |
setVisible(boolean pVisible) |
void |
setX(float pX) |
void |
setY(float pY) |
void |
setZIndex(int pZIndex) |
void |
sortChildren()
Immediately sorts the
IEntitys based on their ZIndex. |
void |
sortChildren(boolean pImmediate)
Sorts the
IEntitys based on their ZIndex. |
void |
sortChildren(IEntityComparator pEntityComparator)
Sorts the
IEntitys based on the Comparator supplied. |
void |
toString(java.lang.StringBuilder pStringBuilder) |
boolean |
unregisterEntityModifier(IEntityModifier pEntityModifier) |
boolean |
unregisterEntityModifiers(IEntityModifier.IEntityModifierMatcher pEntityModifierMatcher) |
boolean |
unregisterUpdateHandler(IUpdateHandler pUpdateHandler) |
boolean |
unregisterUpdateHandlers(IUpdateHandler.IUpdateHandlerMatcher pUpdateHandlerMatcher) |
onDrawonUpdate, resetdispose, isDisposedstatic final int TAG_INVALID
boolean isVisible()
void setVisible(boolean pVisible)
boolean isIgnoreUpdate()
void setIgnoreUpdate(boolean pIgnoreUpdate)
boolean isChildrenVisible()
void setChildrenVisible(boolean pChildrenVisible)
boolean isChildrenIgnoreUpdate()
void setChildrenIgnoreUpdate(boolean pChildrenIgnoreUpdate)
int getTag()
void setTag(int pTag)
int getZIndex()
void setZIndex(int pZIndex)
boolean hasParent()
IEntity getParent()
void setParent(IEntity pEntity)
float getX()
float getY()
void setX(float pX)
void setY(float pY)
void setPosition(IEntity pOtherEntity)
void setPosition(float pX,
float pY)
boolean isRotated()
float getRotation()
void setRotation(float pRotation)
float getRotationCenterX()
float getRotationCenterY()
void setRotationCenterX(float pRotationCenterX)
void setRotationCenterY(float pRotationCenterY)
void setRotationCenter(float pRotationCenterX,
float pRotationCenterY)
boolean isScaled()
float getScaleX()
float getScaleY()
void setScaleX(float pScaleX)
void setScaleY(float pScaleY)
void setScale(float pScale)
void setScale(float pScaleX,
float pScaleY)
float getScaleCenterX()
float getScaleCenterY()
void setScaleCenterX(float pScaleCenterX)
void setScaleCenterY(float pScaleCenterY)
void setScaleCenter(float pScaleCenterX,
float pScaleCenterY)
boolean isSkewed()
float getSkewX()
float getSkewY()
void setSkewX(float pSkewX)
void setSkewY(float pSkewY)
void setSkew(float pSkew)
void setSkew(float pSkewX,
float pSkewY)
float getSkewCenterX()
float getSkewCenterY()
void setSkewCenterX(float pSkewCenterX)
void setSkewCenterY(float pSkewCenterY)
void setSkewCenter(float pSkewCenterX,
float pSkewCenterY)
boolean isRotatedOrScaledOrSkewed()
float getRed()
float getGreen()
float getBlue()
float getAlpha()
Color getColor()
void setRed(float pRed)
void setGreen(float pGreen)
void setBlue(float pBlue)
void setAlpha(float pAlpha)
void setColor(Color pColor)
void setColor(float pRed,
float pGreen,
float pBlue)
void setColor(float pRed,
float pGreen,
float pBlue,
float pAlpha)
float[] getSceneCenterCoordinates()
float[] getSceneCenterCoordinates(float[] pReuse)
pReuse - must be of length 2.pReuse as a convenience.float[] convertLocalToSceneCoordinates(float pX,
float pY)
pX - pY - float[] convertLocalToSceneCoordinates(float pX,
float pY,
float[] pReuse)
pX - pY - pReuse - must be of length 2.pReuse as a convenience.float[] convertLocalToSceneCoordinates(float[] pCoordinates)
pCoordinates - must be of length 2.float[] convertLocalToSceneCoordinates(float[] pCoordinates,
float[] pReuse)
pCoordinates - must be of length 2.pReuse - must be of length 2.pReuse as a convenience.float[] convertSceneToLocalCoordinates(float pX,
float pY)
pX - pY - float[] convertSceneToLocalCoordinates(float pX,
float pY,
float[] pReuse)
pX - pY - pReuse - must be of length 2.pReuse as a convenience.float[] convertSceneToLocalCoordinates(float[] pCoordinates)
pCoordinates - must be of length 2.float[] convertSceneToLocalCoordinates(float[] pCoordinates,
float[] pReuse)
pCoordinates - must be of length 2.pReuse - must be of length 2.pReuse as a convenience.Transformation getLocalToSceneTransformation()
Transformation getSceneToLocalTransformation()
Transformation getLocalToParentTransformation()
Transformation getParentToLocalTransformation()
int getChildCount()
void onAttached()
void onDetached()
void attachChild(IEntity pEntity)
IEntity getChildByTag(int pTag)
IEntity getChildByMatcher(IEntityMatcher pEntityMatcher)
IEntity getChildByIndex(int pIndex)
IEntity getFirstChild()
IEntity getLastChild()
java.util.ArrayList<IEntity> query(IEntityMatcher pEntityMatcher)
pEntityMatcher - IEntityMatcher.IEntity queryFirst(IEntityMatcher pEntityMatcher)
pEntityMatcher - IEntityMatcher or null if none matches..<L extends java.util.List<IEntity>> L query(IEntityMatcher pEntityMatcher, L pResult)
pEntityMatcher - pResult - the List to put the result into.IEntityMatcher.<S extends IEntity> S queryFirstForSubclass(IEntityMatcher pEntityMatcher)
pEntityMatcher - IEntityMatcher or null if none matches..java.lang.ClassCastException - when the supplied IEntityMatcher matched an IEntity that was not of the requested subtype.<S extends IEntity> java.util.ArrayList<S> queryForSubclass(IEntityMatcher pEntityMatcher) throws java.lang.ClassCastException
pEntityMatcher - IEntityMatcher.java.lang.ClassCastException - when the supplied IEntityMatcher matched an IEntity that was not of the requested subtype.<L extends java.util.List<S>,S extends IEntity> L queryForSubclass(IEntityMatcher pEntityMatcher, L pResult) throws java.lang.ClassCastException
pEntityMatcher - pResult - the List to put the result into.IEntityMatcher.java.lang.ClassCastException - when the supplied IEntityMatcher matched an IEntity that was not of the requested subtype.void sortChildren()
IEntitys based on their ZIndex. Sort is stable.void sortChildren(boolean pImmediate)
IEntitys based on their ZIndex. Sort is stable.
In contrast to sortChildren() this method is particularly useful to avoid multiple sorts per frame.pImmediate - if true, the sorting is executed immediately.
If false the sorting is executed before the next (visible) drawing of the children of this IEntity.void sortChildren(IEntityComparator pEntityComparator)
IEntitys based on the Comparator supplied. Sort is stable.pEntityComparator - boolean detachSelf()
boolean detachChild(IEntity pEntity)
RunnableHandler.postRunnable(Runnable) which is registered
to a Scene or the Engine itself, because otherwise
it may throw an IndexOutOfBoundsException in the
Update-Thread or the GL-Thread!IEntity detachChild(int pTag)
RunnableHandler.postRunnable(Runnable) which is registered
to a Scene or the Engine itself, because otherwise
it may throw an IndexOutOfBoundsException in the
Update-Thread or the GL-Thread!IEntity detachChild(IEntityMatcher pEntityMatcher)
RunnableHandler.postRunnable(Runnable) which is registered
to a Scene or the Engine itself, because otherwise
it may throw an IndexOutOfBoundsException in the
Update-Thread or the GL-Thread!boolean detachChildren(IEntityMatcher pEntityMatcher)
RunnableHandler.postRunnable(Runnable) which is registered
to a Scene or the Engine itself, because otherwise
it may throw an IndexOutOfBoundsException in the
Update-Thread or the GL-Thread!void detachChildren()
void callOnChildren(IEntityParameterCallable pEntityParameterCallable)
void callOnChildren(IEntityParameterCallable pEntityParameterCallable, IEntityMatcher pEntityMatcher)
void registerUpdateHandler(IUpdateHandler pUpdateHandler)
boolean unregisterUpdateHandler(IUpdateHandler pUpdateHandler)
boolean unregisterUpdateHandlers(IUpdateHandler.IUpdateHandlerMatcher pUpdateHandlerMatcher)
int getUpdateHandlerCount()
void clearUpdateHandlers()
void registerEntityModifier(IEntityModifier pEntityModifier)
boolean unregisterEntityModifier(IEntityModifier pEntityModifier)
boolean unregisterEntityModifiers(IEntityModifier.IEntityModifierMatcher pEntityModifierMatcher)
int getEntityModifierCount()
void clearEntityModifiers()
boolean isCullingEnabled()
void setCullingEnabled(boolean pCullingEnabled)
boolean isCulled(Camera pCamera)
isCullingEnabled() is true.pCamera - the currently active camera to perform culling checks against.true when this object is visible by the Camera, false otherwise.void setUserData(java.lang.Object pUserData)
java.lang.Object getUserData()
void toString(java.lang.StringBuilder pStringBuilder)