public class

Camera

extends Object
implements IUpdateHandler
java.lang.Object
   ↳ org.anddev.andengine.engine.camera.Camera
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

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

Summary

Fields
protected static final float[] VERTICES_TOUCH_TMP
protected float mCameraSceneRotation
protected float mRotation
protected int mSurfaceHeight
protected int mSurfaceWidth
protected int mSurfaceX
protected int mSurfaceY
Public Constructors
Camera(float pX, float pY, float pWidth, float pHeight)
Public Methods
void convertCameraSceneToSceneTouchEvent(TouchEvent pCameraSceneTouchEvent)
void convertSceneToCameraSceneTouchEvent(TouchEvent pSceneTouchEvent)
void convertSurfaceToSceneTouchEvent(TouchEvent pSurfaceTouchEvent, int pSurfaceWidth, int pSurfaceHeight)
float getCameraSceneRotation()
float getCenterX()
float getCenterY()
float getFarZClippingPlane()
HUD getHUD()
float getHeight()
float getHeightRaw()
float getMaxX()
float getMaxY()
float getMinX()
float getMinY()
float getNearZClippingPlane()
float getRotation()
int getSurfaceHeight()
int getSurfaceWidth()
int getSurfaceX()
int getSurfaceY()
float getWidth()
float getWidthRaw()
boolean hasHUD()
boolean isLineVisible(Line pLine)
boolean isRectangularShapeVisible(RectangularShape pRectangularShape)
boolean isRotated()
void offsetCenter(float pX, float pY)
void onApplyCameraSceneMatrix(GL10 pGL)
void onApplySceneBackgroundMatrix(GL10 pGL)
void onApplySceneMatrix(GL10 pGL)
void onDrawHUD(GL10 pGL)
void onUpdate(float pSecondsElapsed)
void reset()
void setCameraSceneRotation(float pCameraSceneRotation)
void setCenter(float pCenterX, float pCenterY)
void setChaseEntity(IEntity pChaseEntity)
void setFarZClippingPlane(float pFarZClippingPlane)
void setHUD(HUD pHUD)
void setNearZClippingPlane(float pNearZClippingPlane)
void setRotation(float pRotation)
void setSurfaceSize(int pSurfaceX, int pSurfaceY, int pSurfaceWidth, int pSurfaceHeight)
void setZClippingPlanes(float pNearZClippingPlane, float pFarZClippingPlane)
void updateChaseEntity()
Protected Methods
void applySceneToCameraSceneOffset(TouchEvent pSceneTouchEvent)
void unapplySceneToCameraSceneOffset(TouchEvent pCameraSceneTouchEvent)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.anddev.andengine.engine.handler.IUpdateHandler

Fields

protected static final float[] VERTICES_TOUCH_TMP

protected float mCameraSceneRotation

protected float mRotation

protected int mSurfaceHeight

protected int mSurfaceWidth

protected int mSurfaceX

protected int mSurfaceY

Public Constructors

public Camera (float pX, float pY, float pWidth, float pHeight)

Public Methods

public void convertCameraSceneToSceneTouchEvent (TouchEvent pCameraSceneTouchEvent)

public void convertSceneToCameraSceneTouchEvent (TouchEvent pSceneTouchEvent)

public void convertSurfaceToSceneTouchEvent (TouchEvent pSurfaceTouchEvent, int pSurfaceWidth, int pSurfaceHeight)

public float getCameraSceneRotation ()

public float getCenterX ()

public float getCenterY ()

public float getFarZClippingPlane ()

public HUD getHUD ()

public float getHeight ()

public float getHeightRaw ()

public float getMaxX ()

public float getMaxY ()

public float getMinX ()

public float getMinY ()

public float getNearZClippingPlane ()

public float getRotation ()

public int getSurfaceHeight ()

public int getSurfaceWidth ()

public int getSurfaceX ()

public int getSurfaceY ()

public float getWidth ()

public float getWidthRaw ()

public boolean hasHUD ()

public boolean isLineVisible (Line pLine)

public boolean isRectangularShapeVisible (RectangularShape pRectangularShape)

public boolean isRotated ()

public void offsetCenter (float pX, float pY)

public void onApplyCameraSceneMatrix (GL10 pGL)

public void onApplySceneBackgroundMatrix (GL10 pGL)

public void onApplySceneMatrix (GL10 pGL)

public void onDrawHUD (GL10 pGL)

public void onUpdate (float pSecondsElapsed)

public void reset ()

public void setCameraSceneRotation (float pCameraSceneRotation)

public void setCenter (float pCenterX, float pCenterY)

public void setChaseEntity (IEntity pChaseEntity)

public void setFarZClippingPlane (float pFarZClippingPlane)

public void setHUD (HUD pHUD)

public void setNearZClippingPlane (float pNearZClippingPlane)

public void setRotation (float pRotation)

public void setSurfaceSize (int pSurfaceX, int pSurfaceY, int pSurfaceWidth, int pSurfaceHeight)

public void setZClippingPlanes (float pNearZClippingPlane, float pFarZClippingPlane)

public void updateChaseEntity ()

Protected Methods

protected void applySceneToCameraSceneOffset (TouchEvent pSceneTouchEvent)

protected void unapplySceneToCameraSceneOffset (TouchEvent pCameraSceneTouchEvent)