public class

Rectangle

extends RectangularShape
java.lang.Object
   ↳ org.andengine.entity.Entity
     ↳ org.andengine.entity.shape.Shape
       ↳ org.andengine.entity.shape.RectangularShape
         ↳ org.andengine.entity.primitive.Rectangle

Class Overview

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

Summary

Nested Classes
class Rectangle.HighPerformanceRectangleVertexBufferObject  
interface Rectangle.IRectangleVertexBufferObject  
class Rectangle.LowMemoryRectangleVertexBufferObject  
Constants
int COLOR_INDEX
int RECTANGLE_SIZE
int VERTEX_INDEX_X
int VERTEX_INDEX_Y
int VERTEX_SIZE
int VERTICES_PER_RECTANGLE
[Expand]
Inherited Constants
From interface org.andengine.entity.shape.IShape
Fields
public static final VertexBufferObjectAttributes VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT
protected final Rectangle.IRectangleVertexBufferObject mRectangleVertexBufferObject
[Expand]
Inherited Fields
From class org.andengine.entity.shape.RectangularShape
From class org.andengine.entity.shape.Shape
From class org.andengine.entity.Entity
Public Constructors
Rectangle(float pX, float pY, float pWidth, float pHeight, VertexBufferObjectManager pVertexBufferObjectManager)
Rectangle(float pX, float pY, float pWidth, float pHeight, VertexBufferObjectManager pVertexBufferObjectManager, VertexBufferObject.DrawType pDrawType)
Rectangle(float pX, float pY, float pWidth, float pHeight, Rectangle.IRectangleVertexBufferObject pRectangleVertexBufferObject)
Public Methods
Rectangle.IRectangleVertexBufferObject getVertexBufferObject()
Protected Methods
void draw(GLState pGLState, Camera pCamera)
void onUpdateColor()
void onUpdateVertices()
void postDraw(GLState pGLState, Camera pCamera)
void preDraw(GLState pGLState, Camera pCamera)
[Expand]
Inherited Methods
From class org.andengine.entity.shape.RectangularShape
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

Constants

public static final int COLOR_INDEX

Constant Value: 2 (0x00000002)

public static final int RECTANGLE_SIZE

Constant Value: 12 (0x0000000c)

public static final int VERTEX_INDEX_X

Constant Value: 0 (0x00000000)

public static final int VERTEX_INDEX_Y

Constant Value: 1 (0x00000001)

public static final int VERTEX_SIZE

Constant Value: 3 (0x00000003)

public static final int VERTICES_PER_RECTANGLE

Constant Value: 4 (0x00000004)

Fields

public static final VertexBufferObjectAttributes VERTEXBUFFEROBJECTATTRIBUTES_DEFAULT

protected final Rectangle.IRectangleVertexBufferObject mRectangleVertexBufferObject

Public Constructors

public Rectangle (float pX, float pY, float pWidth, float pHeight, VertexBufferObjectManager pVertexBufferObjectManager)

public Rectangle (float pX, float pY, float pWidth, float pHeight, VertexBufferObjectManager pVertexBufferObjectManager, VertexBufferObject.DrawType pDrawType)

public Rectangle (float pX, float pY, float pWidth, float pHeight, Rectangle.IRectangleVertexBufferObject pRectangleVertexBufferObject)

Public Methods

public Rectangle.IRectangleVertexBufferObject getVertexBufferObject ()

Protected Methods

protected void draw (GLState pGLState, Camera pCamera)

Parameters
pGLState the currently active GLState i.e. to apply transformations to.
pCamera the currently active Camera i.e. to be used for culling.

protected void onUpdateColor ()

protected void onUpdateVertices ()

protected void postDraw (GLState pGLState, Camera pCamera)

Parameters
pGLState the currently active GLState i.e. to apply transformations to.
pCamera the currently active Camera i.e. to be used for culling.

protected void preDraw (GLState pGLState, Camera pCamera)

Parameters
pGLState the currently active GLState i.e. to apply transformations to.
pCamera the currently active Camera i.e. to be used for culling.