|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.effect.particle.AbstractParticle
public abstract class AbstractParticle
This class represents an abstract particle
Constructor Summary | |
---|---|
AbstractParticle(float size,
long maxAge)
Creates a new particle |
Method Summary | |
---|---|
abstract void |
draw(javax.media.opengl.GL gl,
float x,
float y,
float z,
com.sun.opengl.util.texture.Texture texture)
Draws the particle to the scene |
float |
getAplha()
Returns the alpha value of the particle |
float[] |
getColor()
Returns the current RGBA color of the particle as an array of four values |
long |
getCurrentAge()
Returns the current age of the particle |
float[] |
getEndColor()
Returns the RGBA end color of the particle as an array of four values |
float |
getMass()
Returns the mass value for the particle |
long |
getMaximumAge()
Returns the maximum age of the particle |
Point3D |
getPosition()
Returns the current position of the particle |
Point3D |
getRotation()
Returns the rotation of the particle. |
float |
getSize()
Returns the designated size of the particle |
float[] |
getStartColor()
Returns the RGBA start color of the particle as an array of four values |
Point3D |
getVelocity()
Returns the velocity of the particle as a directional vector |
void |
setAlpha(float alpha)
Set the current alpha value of the particle to the specified parameter. |
void |
setColor(float red,
float green,
float blue,
float alpha)
|
void |
setCurrentAge(long age)
Sets the current particle age to the specified value |
void |
setEndColor(float red,
float green,
float blue,
float alpha)
Sets the RGBA end color of the particle to the specified values |
void |
setMass(float mass)
Sets the particle's mass to the specified value |
void |
setMaximumAge(long maxAge)
Sets the maximum age of the particle to the specified value |
void |
setPosition(float x,
float y,
float z)
Sets the particle to the specified coordinates |
void |
setPosition(Point3D position)
Sets the particle to the specified coordinates |
void |
setRotation(float x,
float y,
float z)
Sets the particle's rotation to the specified values |
void |
setRotation(Point3D rot)
Sets the particle's rotation to the specified values |
void |
setRotationFactor(Point3D factor)
Sets the rotation factor for the particle. |
void |
setSize(float size)
Sets the particle size to the specified value |
void |
setStartColor(float red,
float green,
float blue,
float alpha)
Sets the RGBA start color of the particle to the specified values |
void |
setVelocity(float x,
float y,
float z)
Sets the particle's velocity to the specified values |
void |
setVelocity(Point3D velocity)
Sets the particle's velocity to the specified values |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractParticle(float size, long maxAge)
size
- size of the particlemaxAge
- maximum age the particle can reach (in miliseconds)Method Detail |
---|
public void setStartColor(float red, float green, float blue, float alpha)
red
- amount of redgreen
- amount of greenblue
- amount of bluealpha
- alpha valuepublic float[] getStartColor()
public void setEndColor(float red, float green, float blue, float alpha)
red
- amount of redgreen
- amount of greenblue
- amount of bluealpha
- alpha valuepublic float[] getEndColor()
public void setColor(float red, float green, float blue, float alpha)
public float[] getColor()
public void setAlpha(float alpha)
alpha
- new alpha valuepublic float getAplha()
public float getSize()
public void setSize(float size)
size
- particle's sizepublic long getCurrentAge()
public void setCurrentAge(long age)
age
- the new current particle agepublic float getMass()
public void setMass(float mass)
mass
- new particle masspublic long getMaximumAge()
public void setMaximumAge(long maxAge)
maxAge
- new maximum age of the particlepublic Point3D getPosition()
public void setPosition(Point3D position)
position
- new particle positionpublic void setPosition(float x, float y, float z)
x
- x-coordinatey
- y-coordinatez
- z-coordinatepublic Point3D getVelocity()
public void setVelocity(Point3D velocity)
velocity
- new particle velocitypublic void setVelocity(float x, float y, float z)
x
- x-velocityy
- y-velocityz
- z-velocitypublic Point3D getRotation()
public void setRotation(Point3D rot)
rot
- new particle rotation vectorpublic void setRotation(float x, float y, float z)
x
- x-rotationy
- y-rotationz
- z-rotationpublic void setRotationFactor(Point3D factor)
factor
- rotation factorpublic abstract void draw(javax.media.opengl.GL gl, float x, float y, float z, com.sun.opengl.util.texture.Texture texture)
gl
- x
- x-coordinatey
- y-coordinatez
- z-coordinatetexture
- texture to assign to the particle
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |