#include <ParticleShader.h>
Inheritance diagram for ParticleShader:


Definition at line 17 of file ParticleShader.h.
Public Member Functions | |
| ParticleShader (Particles *ps=NULL, std::string &name=std::string("ParticleShader")) | |
| default constructor | |
| virtual void | attachAttributes () |
| virtual | ~ParticleShader () |
| virtual void | addMeTo (Particles *new_ps) |
| Add shader to a particle system. | |
| virtual void | setParticleSystem (Particles *new_ps) |
| Set the particle system the ParticleStuff points to. | |
| virtual void | removeMe () |
| Remove the shader from the current particle system. | |
| virtual void | draw () |
| each shader knows how to draw all the particles based on its attributes | |
| virtual void | drawParticle (int i) |
| each shader knows how to draw a particle based on its attributes | |
| virtual void | applyTransformations (int i) |
| typically done for all shader that needs to draw each particle. | |
| virtual void | drawShape (int i) |
| each shader simply make a shape call for each particle | |
| virtual void | setColor (int i) |
| determine the color | |
| virtual void | clear () |
Public Attributes | |
| ParticlePosition * | position |
| ParticleOrientation * | orient |
| ParticleMaterial * | material |
|
||||||||||||
|
default constructor
Definition at line 17 of file ParticleShader.cpp. |
|
|
Definition at line 31 of file ParticleShader.h. |
|
|
Add shader to a particle system.
Implements ParticleStuff. Definition at line 67 of file ParticleShader.cpp. References attachAttributes(), and Particles::shaders. Referenced by setParticleSystem(). |
|
|
typically done for all shader that needs to draw each particle.
Definition at line 134 of file ParticleShader.cpp. References dot(), ParticlePosition::getPosition(), ParticleOrientation::gravity, M_PI, ParticleOrientation::n, orient, and position. Referenced by drawParticle(). |
|
|
Reimplemented in ParticleShaderCluster, ParticleShaderCurvature, ParticleShaderDisk, ParticleShaderGradientField, and ParticleShaderTriangle. Definition at line 34 of file ParticleShader.cpp. References ParticleStuff::attachAttribute(), Particles::getAttribute(), material, orient, position, and ParticleStuff::ps. Referenced by addMeTo(), ParticleShaderTriangle::attachAttributes(), ParticleShaderGradientField::attachAttributes(), ParticleShaderDisk::attachAttributes(), ParticleShaderCurvature::attachAttributes(), and ParticleShaderCluster::attachAttributes(). |
|
|
Definition at line 56 of file ParticleShader.h. |
|
|
each shader knows how to draw all the particles based on its attributes
Reimplemented in ParticleShaderChain, ParticleShaderCluster, ParticleShaderGradientField, ParticleShaderLink, ParticleShaderStroke, and ParticleShaderTriangle. Definition at line 79 of file ParticleShader.cpp. References drawParticle(), ParticleStuff::ps, and Particles::size(). |
|
|
each shader knows how to draw a particle based on its attributes
Definition at line 107 of file ParticleShader.cpp. References applyTransformations(), drawShape(), ParticleStuff::ps, Particles::selectedParticle, and setColor(). Referenced by draw(). |
|
|
each shader simply make a shape call for each particle
Reimplemented in ParticleShaderConstMaterial, ParticleShaderCurvature, ParticleShaderCylinder, ParticleShaderDisk, ParticleShaderSphere, and ParticleShaderTeapot. Definition at line 51 of file ParticleShader.h. Referenced by drawParticle(). |
|
|
Remove the shader from the current particle system.
Implements ParticleStuff. Definition at line 50 of file ParticleShader.cpp. References ParticleStuff::name, ParticleStuff::ps, and Particles::shaders. |
|
|
determine the color
Definition at line 89 of file ParticleShader.cpp. References ParticleMaterial::color, ParticleMaterial::getDiffuseBack(), ParticleMaterial::getDiffuseFront(), and material. Referenced by drawParticle(). |
|
|
Set the particle system the ParticleStuff points to. Also adds the ParticleStuff to the particle system. If this is a new particle system, this deletes the ParticleStuff from the existing particle system. 2002-10-26 Wen Pure virtual function at the ParticleStuff level. Made concrete in ParticleAttribute, ParticleBehavior, etc. Not pure any more, since all the children do the same thing, it is easier just to inherent this one. 2003-11-05 Wen Very important, every one MUST call this before using this class. This is used to initialize the system. Since the factory can create a ParticleStuff with a ps=NULL, we must handle initialization step as a separate function, in order to not calling the same code twice I decided not to call this function in all the constructors. Reimplemented from ParticleStuff. Definition at line 26 of file ParticleShader.cpp. References addMeTo(), and ParticleStuff::ps. |
|
|
Definition at line 24 of file ParticleShader.h. Referenced by attachAttributes(), ParticleShaderCurvature::drawShape(), ParticleShaderConstMaterial::drawShape(), ParticleShader(), ParticleShaderCurvature::ParticleShaderCurvature(), and setColor(). |
|
|
Definition at line 23 of file ParticleShader.h. Referenced by applyTransformations(), attachAttributes(), ParticleShaderStroke::draw(), and ParticleShader(). |
|
1.3.4