public abstract class

RectangularShape

extends Shape
implements IAreaShape
java.lang.Object
   ↳ org.andengine.entity.Entity
     ↳ org.andengine.entity.shape.Shape
       ↳ org.andengine.entity.shape.RectangularShape
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

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

Summary

[Expand]
Inherited Constants
From interface org.andengine.entity.shape.IShape
Fields
protected float mBaseHeight
protected float mBaseWidth
protected float mHeight
protected float mWidth
[Expand]
Inherited Fields
From class org.andengine.entity.shape.Shape
From class org.andengine.entity.Entity
Public Constructors
RectangularShape(float pX, float pY, float pWidth, float pHeight, ShaderProgram pShaderProgram)
Public Methods
boolean collidesWith(IShape pOtherShape)
boolean contains(float pX, float pY)
float getBaseHeight()
float getBaseWidth()
float getHeight()
float getHeightScaled()
float[] getSceneCenterCoordinates()
float getWidth()
float getWidthScaled()
boolean isCulled(Camera pCamera)
Will only be performed if isCullingEnabled() is true.
void reset()
void resetRotationCenter()
void resetScaleCenter()
void resetSkewCenter()
void setBaseSize()
void setHeight(float pHeight)
void setSize(float pWidth, float pHeight)
void setWidth(float pWidth)
[Expand]
Inherited Methods
From class org.andengine.entity.shape.Shape
From class org.andengine.entity.Entity
From class java.lang.Object
From interface org.andengine.engine.handler.IDrawHandler
From interface org.andengine.engine.handler.IUpdateHandler
From interface org.andengine.entity.IEntity
From interface org.andengine.entity.scene.Scene.ITouchArea
From interface org.andengine.entity.shape.IAreaShape
From interface org.andengine.entity.shape.IShape
From interface org.andengine.util.IDisposable

Fields

protected float mBaseHeight

protected float mBaseWidth

protected float mHeight

protected float mWidth

Public Constructors

public RectangularShape (float pX, float pY, float pWidth, float pHeight, ShaderProgram pShaderProgram)

Public Methods

public boolean collidesWith (IShape pOtherShape)

public boolean contains (float pX, float pY)

public float getBaseHeight ()

public float getBaseWidth ()

public float getHeight ()

public float getHeightScaled ()

public float[] getSceneCenterCoordinates ()

public float getWidth ()

public float getWidthScaled ()

public 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 void reset ()

public void resetRotationCenter ()

public void resetScaleCenter ()

public void resetSkewCenter ()

public void setBaseSize ()

public void setHeight (float pHeight)

public void setSize (float pWidth, float pHeight)

public void setWidth (float pWidth)