public interface

IEntity

implements IDrawHandler IUpdateHandler IDisposable
org.andengine.entity.IEntity
Known Indirect Subclasses

Class Overview

(c) 2010 Nicolas Gramlich (c) 2011 Zynga Inc.

Summary

Public Methods
abstract boolean attachChild(IEntity pEntity, int pIndex)
abstract void attachChild(IEntity pEntity)
abstract void callOnChildren(IEntityParameterCallable pEntityParameterCallable, IEntityMatcher pEntityMatcher)
abstract void callOnChildren(IEntityParameterCallable pEntityParameterCallable)
abstract void clearEntityModifiers()
abstract void clearUpdateHandlers()
abstract float[] convertLocalToSceneCoordinates(float[] pCoordinates, float[] pReuse)
abstract float[] convertLocalToSceneCoordinates(float[] pCoordinates)
abstract float[] convertLocalToSceneCoordinates(float pX, float pY)
abstract float[] convertLocalToSceneCoordinates(float pX, float pY, float[] pReuse)
abstract float[] convertSceneToLocalCoordinates(float pX, float pY)
abstract float[] convertSceneToLocalCoordinates(float[] pCoordinates)
abstract float[] convertSceneToLocalCoordinates(float pX, float pY, float[] pReuse)
abstract float[] convertSceneToLocalCoordinates(float[] pCoordinates, float[] pReuse)
abstract boolean detachChild(IEntity pEntity)
WARNING: This function should be called from within 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!
abstract IEntity detachChild(IEntityMatcher pEntityMatcher)
WARNING: This function should be called from within 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!
abstract boolean detachChildren(IEntityMatcher pEntityMatcher)
WARNING: This function should be called from within 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!
abstract void detachChildren()
abstract boolean detachSelf()
abstract float getAlpha()
abstract float getBlue()
abstract IEntity getChild(int pIndex)
abstract IEntity getChild(IEntityMatcher pEntityMatcher)
abstract int getChildCount()
abstract int getChildIndex(IEntity pEntity)
abstract Color getColor()
abstract IEntity getFirstChild()
abstract float getGreen()
abstract float getInitialX()
abstract float getInitialY()
abstract IEntity getLastChild()
abstract Transformation getLocalToParentTransformation()
abstract Transformation getLocalToSceneTransformation()
abstract IEntity getParent()
abstract Transformation getParentToLocalTransformation()
abstract float getRed()
abstract float getRotation()
abstract float getRotationCenterX()
abstract float getRotationCenterY()
abstract float getScaleCenterX()
abstract float getScaleCenterY()
abstract float getScaleX()
abstract float getScaleY()
abstract float[] getSceneCenterCoordinates()
abstract Transformation getSceneToLocalTransformation()
abstract float getSkewCenterX()
abstract float getSkewCenterY()
abstract float getSkewX()
abstract float getSkewY()
abstract Object getUserData()
abstract float getX()
abstract float getY()
abstract int getZIndex()
abstract boolean hasParent()
abstract boolean isChildrenIgnoreUpdate()
abstract boolean isChildrenVisible()
abstract boolean isCulled(Camera pCamera)
Will only be performed if isCullingEnabled() is true.
abstract boolean isCullingEnabled()
abstract boolean isIgnoreUpdate()
abstract boolean isRotated()
abstract boolean isRotatedOrScaledOrSkewed()
abstract boolean isScaled()
abstract boolean isSkewed()
abstract boolean isVisible()
abstract void onAttached()
abstract void onDetached()
abstract <L extends List<IEntity>> L query(IEntityMatcher pEntityMatcher, L pResult)
abstract ArrayList<IEntity> query(IEntityMatcher pEntityMatcher)
abstract <L extends List<S extends T>, S> L queryForSubclass(IEntityMatcher pEntityMatcher, L pResult)
abstract <S extends IEntity> ArrayList<S> queryForSubclass(IEntityMatcher pEntityMatcher)
abstract void registerEntityModifier(IEntityModifier pEntityModifier)
abstract void registerUpdateHandler(IUpdateHandler pUpdateHandler)
abstract void setAlpha(float pAlpha)
abstract boolean setChildIndex(IEntity pEntity, int pIndex)
abstract void setChildrenIgnoreUpdate(boolean pChildrenIgnoreUpdate)
abstract void setChildrenVisible(boolean pChildrenVisible)
abstract void setColor(float pRed, float pGreen, float pBlue)
abstract void setColor(Color pColor)
abstract void setColor(float pRed, float pGreen, float pBlue, float pAlpha)
abstract void setCullingEnabled(boolean pCullingEnabled)
abstract void setIgnoreUpdate(boolean pIgnoreUpdate)
abstract void setInitialPosition()
abstract void setParent(IEntity pEntity)
abstract void setPosition(IEntity pOtherEntity)
abstract void setPosition(float pX, float pY)
abstract void setRotation(float pRotation)
abstract void setRotationCenter(float pRotationCenterX, float pRotationCenterY)
abstract void setRotationCenterX(float pRotationCenterX)
abstract void setRotationCenterY(float pRotationCenterY)
abstract void setScale(float pScale)
abstract void setScale(float pScaleX, float pScaleY)
abstract void setScaleCenter(float pScaleCenterX, float pScaleCenterY)
abstract void setScaleCenterX(float pScaleCenterX)
abstract void setScaleCenterY(float pScaleCenterY)
abstract void setScaleX(float pScaleX)
abstract void setScaleY(float pScaleY)
abstract void setSkew(float pSkew)
abstract void setSkew(float pSkewX, float pSkewY)
abstract void setSkewCenter(float pSkewCenterX, float pSkewCenterY)
abstract void setSkewCenterX(float pSkewCenterX)
abstract void setSkewCenterY(float pSkewCenterY)
abstract void setSkewX(float pSkewX)
abstract void setSkewY(float pSkewY)
abstract void setUserData(Object pUserData)
abstract void setVisible(boolean pVisible)
abstract void setZIndex(int pZIndex)
abstract void sortChildren()
Immediately sorts the IEntitys based on their ZIndex.
abstract void sortChildren(Comparator<IEntity> pEntityComparator)
Sorts the IEntitys based on the Comparator supplied.
abstract void sortChildren(boolean pImmediate)
Sorts the IEntitys based on their ZIndex.
abstract boolean swapChildren(int pIndexA, int pIndexB)
abstract boolean swapChildren(IEntity pEntityA, IEntity pEntityB)
abstract void toString(StringBuilder pStringBuilder)
abstract boolean unregisterEntityModifier(IEntityModifier pEntityModifier)
abstract boolean unregisterEntityModifiers(IEntityModifier.IEntityModifierMatcher pEntityModifierMatcher)
abstract boolean unregisterUpdateHandler(IUpdateHandler pUpdateHandler)
abstract boolean unregisterUpdateHandlers(IUpdateHandler.IUpdateHandlerMatcher pUpdateHandlerMatcher)
[Expand]
Inherited Methods
From interface org.andengine.engine.handler.IDrawHandler
From interface org.andengine.engine.handler.IUpdateHandler
From interface org.andengine.util.IDisposable

Public Methods

public abstract boolean attachChild (IEntity pEntity, int pIndex)

public abstract void attachChild (IEntity pEntity)

public abstract void callOnChildren (IEntityParameterCallable pEntityParameterCallable, IEntityMatcher pEntityMatcher)

public abstract void callOnChildren (IEntityParameterCallable pEntityParameterCallable)

public abstract void clearEntityModifiers ()

public abstract void clearUpdateHandlers ()

public abstract float[] convertLocalToSceneCoordinates (float[] pCoordinates, float[] pReuse)

Parameters
pCoordinates must be of length 2.
pReuse must be of length 2.
Returns
  • pReuse as a convenience.

public abstract float[] convertLocalToSceneCoordinates (float[] pCoordinates)

Parameters
pCoordinates must be of length 2.
Returns
  • a shared(!) float[] of length 2.

public abstract float[] convertLocalToSceneCoordinates (float pX, float pY)

Returns
  • a shared(!) float[] of length 2.

public abstract float[] convertLocalToSceneCoordinates (float pX, float pY, float[] pReuse)

Parameters
pReuse must be of length 2.
Returns
  • pReuse as a convenience.

public abstract float[] convertSceneToLocalCoordinates (float pX, float pY)

Returns
  • a shared(!) float[] of length 2.

public abstract float[] convertSceneToLocalCoordinates (float[] pCoordinates)

Parameters
pCoordinates must be of length 2.
Returns
  • a shared(!) float[] of length 2.

public abstract float[] convertSceneToLocalCoordinates (float pX, float pY, float[] pReuse)

Parameters
pReuse must be of length 2.
Returns
  • pReuse as a convenience.

public abstract float[] convertSceneToLocalCoordinates (float[] pCoordinates, float[] pReuse)

Parameters
pCoordinates must be of length 2.
pReuse must be of length 2.
Returns
  • pReuse as a convenience.

public abstract boolean detachChild (IEntity pEntity)

WARNING: This function should be called from within 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!

public abstract IEntity detachChild (IEntityMatcher pEntityMatcher)

WARNING: This function should be called from within 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!

public abstract boolean detachChildren (IEntityMatcher pEntityMatcher)

WARNING: This function should be called from within 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!

public abstract void detachChildren ()

public abstract boolean detachSelf ()

public abstract float getAlpha ()

public abstract float getBlue ()

public abstract IEntity getChild (int pIndex)

public abstract IEntity getChild (IEntityMatcher pEntityMatcher)

public abstract int getChildCount ()

public abstract int getChildIndex (IEntity pEntity)

public abstract Color getColor ()

public abstract IEntity getFirstChild ()

public abstract float getGreen ()

public abstract float getInitialX ()

public abstract float getInitialY ()

public abstract IEntity getLastChild ()

public abstract Transformation getLocalToParentTransformation ()

public abstract Transformation getLocalToSceneTransformation ()

public abstract IEntity getParent ()

public abstract Transformation getParentToLocalTransformation ()

public abstract float getRed ()

public abstract float getRotation ()

public abstract float getRotationCenterX ()

public abstract float getRotationCenterY ()

public abstract float getScaleCenterX ()

public abstract float getScaleCenterY ()

public abstract float getScaleX ()

public abstract float getScaleY ()

public abstract float[] getSceneCenterCoordinates ()

Returns
  • a shared(!) float[] of length 2.

public abstract Transformation getSceneToLocalTransformation ()

public abstract float getSkewCenterX ()

public abstract float getSkewCenterY ()

public abstract float getSkewX ()

public abstract float getSkewY ()

public abstract Object getUserData ()

public abstract float getX ()

public abstract float getY ()

public abstract int getZIndex ()

public abstract boolean hasParent ()

public abstract boolean isChildrenIgnoreUpdate ()

public abstract boolean isChildrenVisible ()

public abstract boolean isCulled (Camera pCamera)

Will only be performed if isCullingEnabled() is true.

Parameters
pCamera the currently active camera to perform culling checks against.
Returns
  • true when this object is visible by the Camera, false otherwise.

public abstract boolean isCullingEnabled ()

public abstract boolean isIgnoreUpdate ()

public abstract boolean isRotated ()

public abstract boolean isRotatedOrScaledOrSkewed ()

public abstract boolean isScaled ()

public abstract boolean isSkewed ()

public abstract boolean isVisible ()

public abstract void onAttached ()

public abstract void onDetached ()

public abstract L query (IEntityMatcher pEntityMatcher, L pResult)

Parameters
pResult the List to put the result into.
Returns

public abstract ArrayList<IEntity> query (IEntityMatcher pEntityMatcher)

Returns

public abstract L queryForSubclass (IEntityMatcher pEntityMatcher, L pResult)

Parameters
pResult the List to put the result into.
Returns
Throws
ClassCastException when the supplied IEntityMatcher matched a IEntity that was not of the requested subtype.

public abstract ArrayList<S> queryForSubclass (IEntityMatcher pEntityMatcher)

Returns
Throws
ClassCastException when the supplied IEntityMatcher matched a IEntity that was not of the requested subtype.

public abstract void registerEntityModifier (IEntityModifier pEntityModifier)

public abstract void registerUpdateHandler (IUpdateHandler pUpdateHandler)

public abstract void setAlpha (float pAlpha)

public abstract boolean setChildIndex (IEntity pEntity, int pIndex)

public abstract void setChildrenIgnoreUpdate (boolean pChildrenIgnoreUpdate)

public abstract void setChildrenVisible (boolean pChildrenVisible)

public abstract void setColor (float pRed, float pGreen, float pBlue)

public abstract void setColor (Color pColor)

public abstract void setColor (float pRed, float pGreen, float pBlue, float pAlpha)

public abstract void setCullingEnabled (boolean pCullingEnabled)

public abstract void setIgnoreUpdate (boolean pIgnoreUpdate)

public abstract void setInitialPosition ()

public abstract void setParent (IEntity pEntity)

public abstract void setPosition (IEntity pOtherEntity)

public abstract void setPosition (float pX, float pY)

public abstract void setRotation (float pRotation)

public abstract void setRotationCenter (float pRotationCenterX, float pRotationCenterY)

public abstract void setRotationCenterX (float pRotationCenterX)

public abstract void setRotationCenterY (float pRotationCenterY)

public abstract void setScale (float pScale)

public abstract void setScale (float pScaleX, float pScaleY)

public abstract void setScaleCenter (float pScaleCenterX, float pScaleCenterY)

public abstract void setScaleCenterX (float pScaleCenterX)

public abstract void setScaleCenterY (float pScaleCenterY)

public abstract void setScaleX (float pScaleX)

public abstract void setScaleY (float pScaleY)

public abstract void setSkew (float pSkew)

public abstract void setSkew (float pSkewX, float pSkewY)

public abstract void setSkewCenter (float pSkewCenterX, float pSkewCenterY)

public abstract void setSkewCenterX (float pSkewCenterX)

public abstract void setSkewCenterY (float pSkewCenterY)

public abstract void setSkewX (float pSkewX)

public abstract void setSkewY (float pSkewY)

public abstract void setUserData (Object pUserData)

public abstract void setVisible (boolean pVisible)

public abstract void setZIndex (int pZIndex)

public abstract void sortChildren ()

Immediately sorts the IEntitys based on their ZIndex. Sort is stable.

public abstract void sortChildren (Comparator<IEntity> pEntityComparator)

Sorts the IEntitys based on the Comparator supplied. Sort is stable.

public abstract void sortChildren (boolean pImmediate)

Sorts the IEntitys based on their ZIndex. Sort is stable. In contrast to sortChildren() this method is particularly useful to avoid multiple sorts per frame.

Parameters
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.

public abstract boolean swapChildren (int pIndexA, int pIndexB)

public abstract boolean swapChildren (IEntity pEntityA, IEntity pEntityB)

public abstract void toString (StringBuilder pStringBuilder)

public abstract boolean unregisterEntityModifier (IEntityModifier pEntityModifier)

public abstract boolean unregisterEntityModifiers (IEntityModifier.IEntityModifierMatcher pEntityModifierMatcher)

public abstract boolean unregisterUpdateHandler (IUpdateHandler pUpdateHandler)

public abstract boolean unregisterUpdateHandlers (IUpdateHandler.IUpdateHandlerMatcher pUpdateHandlerMatcher)