|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdata.Sprite
public class Sprite
Constructor Summary | |
---|---|
Sprite(Vector2 pos,
Vector2 size,
java.lang.String filePath)
|
Method Summary | |
---|---|
boolean |
draw(javax.media.opengl.GL gl)
draws an object in OpenGL context |
Vector2 |
getPosition()
returns the position of the Sprite (middle) |
boolean |
init(javax.media.opengl.GL gl)
initializes the Drawable in OpenGL context |
static void |
loadTexture(java.lang.String textureFilePath)
loads a texture using. |
void |
setImageFile(java.lang.String filePath)
sets the image file an inits the sprite new |
void |
setPosition(float x,
float y)
sets the position of the Sprite (middle) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Sprite(Vector2 pos, Vector2 size, java.lang.String filePath)
Method Detail |
---|
public boolean draw(javax.media.opengl.GL gl)
Drawable
draw
in interface Drawable
gl
- GL-context
public static void loadTexture(java.lang.String textureFilePath)
textureFilePath
- public void setPosition(float x, float y)
x
- y
- public Vector2 getPosition()
public void setImageFile(java.lang.String filePath)
filePath
- public boolean init(javax.media.opengl.GL gl)
Drawable
init
in interface Drawable
gl
- gl context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |