|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsimogl.effect.particle.AbstractParticle
public abstract class AbstractParticle
This class represents an abstract particle
| Constructor Summary | |
|---|---|
AbstractParticle(float posX,
float posY,
float posZ,
float velX,
float velY,
float velZ,
long maxAge)
Creates a new particle |
|
AbstractParticle(float size,
Point3D position,
Point3D velocity,
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 RGBA color of the fog as an array of four values |
long |
getCurrentAge()
Returns the current age of the particle |
Face |
getFace()
Returns the face that represents this particle in the scene |
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 |
float |
getSize()
Returns the designated size of the particle |
Point3D |
getVelocity()
Returns the velocity of the particle as a directional vector |
void |
setAlpha(float alpha)
Set the alpha value of the particle to the specified parameter. |
void |
setColor(float red,
float green,
float blue,
float alpha)
Sets the RGBA color of the particle to the specified values |
void |
setCurrentAge(long age)
Sets the current particle age to the specified value |
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 |
setSize(float size)
Sets the particle size to the specified value |
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,
Point3D position,
Point3D velocity,
long maxAge)
size - size of the particleposition - particle's positionvelocity - particle's velocitymaxAge - maximum age the particle can reach (in miliseconds)
public AbstractParticle(float posX,
float posY,
float posZ,
float velX,
float velY,
float velZ,
long maxAge)
posX - x-coordinateposY - y-coordinateposZ - z-coordinatevelX - x-velocityvelY - y-velocityvelZ - z-velocitymaxAge - maximum age the particle can reach (in miliseconds)| Method Detail |
|---|
public void setColor(float red,
float green,
float blue,
float alpha)
red - amount of redgreen - amount of greenblue - amount of bluealpha - alpha valuepublic 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 Face getFace()
public 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 position
public 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 velocity
public void setVelocity(float x,
float y,
float z)
x - x-velocityy - y-velocityz - z-velocity
public 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 | |||||||||