|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpslib.GenericParticle
pslib.DynamicParticle
pslib.BufferedParticle
pslib.RibbonParticle
public class RibbonParticle
Ribbon Class
The Ribbon object extends the functionality of the buffered particle, by incorporating ribbon rendering functionality.
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/.
Field Summary |
---|
Fields inherited from interface pslib.PSConstants |
---|
CAM2D_LOOK, CAM2D_RIGHT, CAM2D_UP, CORNER, INVERSE, INVERSE_TRIANGULAR, LEADING, LINEAR, MIDPOINT, NONE, STATIC, TRAILING, TRIANGULAR |
Constructor Summary | |
---|---|
RibbonParticle(int b)
Create a new object instance with the specified buffer size |
|
RibbonParticle(int b,
int d)
Create a new object instance with the specified buffer size and decay |
Method Summary | |
---|---|
RibbonParticle |
copy()
Return a copy of this particle |
protected PSVertex[] |
getRibbonVertices(PSVector cpv)
Calculate the ribbon vertices and return as an array of PSVertex objects |
void |
map(RibbonParticle p)
Map the properties of this particle to that specified preserving references |
void |
render(processing.opengl.PGraphicsOpenGL pgl)
Render the ribbon to the specified OpenGL renderer |
void |
render(processing.opengl.PGraphicsOpenGL pgl,
PSVector cpv,
PSVector ctv,
PSVector cuv)
Render the ribbon to the specified OpenGL renderer |
void |
setAlphaTaper(float t)
Set the ribbon alpha taper value |
void |
setAlphaTaperCurve(float c)
Set the ribbon alpha taper curve |
void |
setCapSize(float l)
Set the cap length multiplier |
void |
setSizeTaper(float t)
Set the ribbon size taper value |
void |
setSizeTaperCurve(float c)
Set the ribbon size taper curve |
Methods inherited from class pslib.BufferedParticle |
---|
getBuffer, getBufferSize, getCumulativeLength, getCumulativePositions, getRelativePositions, getTaperValues, initialiseBuffer, isInitialised, map, resizeBuffer, setPosition, setSpacing |
Methods inherited from class pslib.DynamicParticle |
---|
clearBehaviour, debug, debug, getBehaviour, getDecay, getDecayTime, getInitialDecayTime, getMass, getRenderAlpha, getRenderSize, getSnapshot, isDead, isDynamic, map, setAlphaEnvelope, setBehaviour, setBehaviour, setDecayTime, setMass, setSizeEnvelope, update |
Methods inherited from class pslib.GenericParticle |
---|
getAlpha, getColour, getPosition, getSize, getVelocity, setAlpha, setColour, setColour, setSize, setVelocity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RibbonParticle(int b)
b
- buffer sizepublic RibbonParticle(int b, int d)
b
- buffer sized
- decay (ms)Method Detail |
---|
public final void setSizeTaper(float t)
Default = 1.0
t
- taperpublic final void setSizeTaperCurve(float c)
Default = 1.0
c
- curvepublic final void setAlphaTaper(float t)
Default = 1.0
t
- taperpublic final void setCapSize(float l)
Default = 0.25
l
- lengthpublic final void setAlphaTaperCurve(float c)
Default = 1.0
c
- curvepublic void render(processing.opengl.PGraphicsOpenGL pgl)
render
in class DynamicParticle
pgl
- OpenGL rendererpublic void render(processing.opengl.PGraphicsOpenGL pgl, PSVector cpv, PSVector ctv, PSVector cuv)
render
in class DynamicParticle
pgl
- OpenGL renderercpv
- camera position vectorctv
- camera target vectorcuv
- camera up vectorpublic RibbonParticle copy()
The returned copy will use the size and alpha taper variables of the source
particle and will adhere to the rules defined in both BufferedParticle.map()
and DynamicParticle.map()
.
copy
in class BufferedParticle
BufferedParticle
,
DynamicParticle
public final void map(RibbonParticle p)
The returned object takes a copy of all ribbon particle variables.
BufferedParticle and DynamicParticle variables are mapped based on the rules
defined in BufferedParticle.map()
and DynamicParticle.map()
respectively.
p
- particleBufferedParticle
,
DynamicParticle
protected final PSVertex[] getRibbonVertices(PSVector cpv)
cpv
- camera position vector
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |