public class Sprite2d
extends java.lang.Object
Constructor and Description |
---|
Sprite2d(Drawable2d drawable) |
Modifier and Type | Method and Description |
---|---|
void |
draw(FlatShadedProgram program,
float[] projectionMatrix)
Draws the rectangle with the supplied program and projection matrix.
|
void |
draw(Texture2dProgram program,
float[] projectionMatrix)
Draws the rectangle with the supplied program and projection matrix.
|
void |
draw(Texture2dProgram program,
float[] projectionMatrix,
float[] texMatrix)
Draws the rectangle with the supplied program and projection matrix and texture matrix.
|
float[] |
getColor()
Returns the color.
|
float[] |
getModelViewMatrix()
Returns the model-view matrix.
|
float |
getPositionX()
Returns the position on the x axis.
|
float |
getPositionY()
Returns the position on the y axis.
|
float |
getRotation()
Gets the sprite rotation angle, in degrees.
|
float |
getScaleX()
Returns the sprite scale along the x axis.
|
float |
getScaleY()
Returns the sprite scale along the y axis.
|
void |
setColor(float red,
float green,
float blue)
Sets color to use for flat-shaded rendering.
|
void |
setPosition(float posX,
float posY)
Sets the sprite position.
|
void |
setRotation(float angle)
Sets the sprite rotation angle, in degrees.
|
void |
setScale(float scaleX,
float scaleY)
Sets the sprite scale (size).
|
void |
setTexture(int textureId)
Sets texture to use for textured rendering.
|
java.lang.String |
toString() |
public Sprite2d(Drawable2d drawable)
public float getScaleX()
public float getScaleY()
public void setScale(float scaleX, float scaleY)
public float getRotation()
public void setRotation(float angle)
public float getPositionX()
public float getPositionY()
public void setPosition(float posX, float posY)
public float[] getModelViewMatrix()
public void setColor(float red, float green, float blue)
public void setTexture(int textureId)
public float[] getColor()
public void draw(FlatShadedProgram program, float[] projectionMatrix)
public void draw(Texture2dProgram program, float[] projectionMatrix)
public void draw(Texture2dProgram program, float[] projectionMatrix, float[] texMatrix)
public java.lang.String toString()
toString
in class java.lang.Object
© 2016 - 2018 Wowza Media Systems, LLC. All rights reserved. Terms | Privacy | Trademarks | Legal