|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpslib.GenericParticle
public class GenericParticle
GenericParticle Class
The GenericParticle class allows the creation of a particle with position, velocity, colour, size and alpha variables. The class is primarily designed to be extended with custom rendering routines.
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library. If not, see http://www.gnu.org/licenses/.
Constructor Summary | |
---|---|
GenericParticle()
Create a new object instance with default values |
Method Summary | |
---|---|
float |
getAlpha()
Return the particle alpha multiplier |
PSColour |
getColour()
Return the current particle colour |
PSVector |
getPosition()
Return a reference to the particle position vector |
float |
getSize()
Return the current particle size |
PSVector |
getVelocity()
Return a reference to the particle velocity vector |
void |
render(processing.opengl.PGraphicsOpenGL pgl)
Render the particle within two-dimensional space to the specified rendering context |
void |
render(processing.opengl.PGraphicsOpenGL pgl,
PSVector cpv,
PSVector ctv,
PSVector cuv)
Render the particle within three-dimensional space to the specified rendering context |
void |
setAlpha(float alpha)
Set the particle alpha |
void |
setColour(PSColour colour)
Set the particle colour |
void |
setColour(PSColour colour,
int time)
Set the particle colour |
void |
setPosition(PSVector position)
Set the particle position |
void |
setSize(float size)
Set the particle size |
void |
setVelocity(PSVector velocity)
Set the particle velocity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GenericParticle()
Method Detail |
---|
public PSVector getPosition()
public void setPosition(PSVector position)
position
- positionpublic PSVector getVelocity()
public void setVelocity(PSVector velocity)
velocity
- velocitypublic float getSize()
public void setSize(float size)
size
- sizepublic PSColour getColour()
public void setColour(PSColour colour)
colour
- colourpublic void setColour(PSColour colour, int time)
colour
- colourtime
- transform durationpublic void setAlpha(float alpha)
alpha
- alphapublic float getAlpha()
public void render(processing.opengl.PGraphicsOpenGL pgl)
pgl
- OpenGL rendererpublic void render(processing.opengl.PGraphicsOpenGL pgl, PSVector cpv, PSVector ctv, PSVector cuv)
pgl
- OpenGL renderercpv
- camera position vectorctv
- camera target vectorcuv
- camera up vector
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |