this class adds tunable color to a particle. Can be added using public multiple inheritance More...
#include <ps_particle_basic.h>
Inherited by NL3D::CPSConstraintMesh, NL3D::CPSDot, NL3D::CPSFanLight, NL3D::CPSQuad, NL3D::CPSRibbon, NL3D::CPSRibbonLookAt, NL3D::CPSShockWave, and NL3D::CPSTailDot.
Public Member Functions | |
| void | setColorScheme (CPSAttribMaker< CRGBA > *col) |
| Set an attribute maker that produce a color It must have been allocated by new It will be deleted by this object. | |
| CPSAttribMaker< CRGBA > * | getColorScheme (void) |
| get the color scheme (NULL if none) | |
| const CPSAttribMaker< CRGBA > * | getColorScheme (void) const |
| get the color scheme (NULL if none) const version | |
| void | setColor (NLMISC::CRGBA col) |
| Set a constant color for the particles. remove any previous scheme. | |
| NLMISC::CRGBA | getColor (void) const |
| Get the color. | |
| CPSColoredParticle () | |
| ctor : default are white particles (constant color) | |
| virtual | ~CPSColoredParticle () |
| dtor | |
| void | serialColorScheme (NLMISC::IStream &f) throw (NLMISC::EStream) |
| serialization. | |
Protected Member Functions | |
| virtual CPSLocated * | getColorOwner (void)=0 |
| deriver must return their owner there | |
| virtual void | updateMatAndVbForColor (void)=0 |
| Update the material and the vb and the like so that they match the color scheme. | |
| void | newColorElement (const CPSEmitterInfo &info) |
| void | deleteColorElement (uint32 index) |
| void | resizeColor (uint32 size) |
Protected Attributes | |
| CRGBA | _Color |
| CPSAttribMaker< CRGBA > * | _ColorScheme |
this class adds tunable color to a particle. Can be added using public multiple inheritance
Definition at line 191 of file ps_particle_basic.h.
| NL3D::CPSColoredParticle::CPSColoredParticle | ( | ) |
ctor : default are white particles (constant color)
Definition at line 146 of file ps_particle_basic.cpp.
References NL_PS_FUNC.
| NL3D::CPSColoredParticle::~CPSColoredParticle | ( | ) | [virtual] |
| void NL3D::CPSColoredParticle::deleteColorElement | ( | uint32 | index | ) | [inline, protected] |
Definition at line 237 of file ps_particle_basic.h.
References _ColorScheme, NL3D::CPSAttribMaker< T >::deleteElement(), and NL3D::CPSAttribMaker< T >::hasMemory().
Referenced by NL3D::CPSTailDot::deleteElement(), NL3D::CPSShockWave::deleteElement(), NL3D::CPSRibbonLookAt::deleteElement(), NL3D::CPSRibbon::deleteElement(), NL3D::CPSConstraintMesh::deleteElement(), NL3D::CPSFanLight::deleteElement(), NL3D::CPSDot::deleteElement(), and NL3D::CPSQuad::deleteElement().
| NLMISC::CRGBA NL3D::CPSColoredParticle::getColor | ( | void | ) | const [inline] |
| virtual CPSLocated* NL3D::CPSColoredParticle::getColorOwner | ( | void | ) | [protected, pure virtual] |
deriver must return their owner there
Implemented in NL3D::CPSDot, NL3D::CPSFanLight, NL3D::CPSConstraintMesh, NL3D::CPSQuad, NL3D::CPSRibbon, NL3D::CPSRibbonLookAt, NL3D::CPSShockWave, and NL3D::CPSTailDot.
Referenced by resizeColor(), and setColorScheme().
| const CPSAttribMaker<CRGBA>* NL3D::CPSColoredParticle::getColorScheme | ( | void | ) | const [inline] |
get the color scheme (NULL if none) const version
Definition at line 205 of file ps_particle_basic.h.
References _ColorScheme.
| CPSAttribMaker<CRGBA>* NL3D::CPSColoredParticle::getColorScheme | ( | void | ) | [inline] |
get the color scheme (NULL if none)
Definition at line 202 of file ps_particle_basic.h.
References _ColorScheme.
| void NL3D::CPSColoredParticle::newColorElement | ( | const CPSEmitterInfo & | info | ) | [inline, protected] |
Definition at line 233 of file ps_particle_basic.h.
References _ColorScheme, NL3D::CPSAttribMaker< T >::hasMemory(), and NL3D::CPSAttribMaker< T >::newElement().
Referenced by NL3D::CPSTailDot::newElement(), NL3D::CPSShockWave::newElement(), NL3D::CPSRibbonLookAt::newElement(), NL3D::CPSRibbon::newElement(), NL3D::CPSConstraintMesh::newElement(), NL3D::CPSFanLight::newElement(), NL3D::CPSDot::newElement(), and NL3D::CPSQuad::newElement().
| void NL3D::CPSColoredParticle::resizeColor | ( | uint32 | size | ) | [inline, protected] |
Definition at line 241 of file ps_particle_basic.h.
References _ColorScheme, getColorOwner(), NL3D::CPSAttribMaker< T >::hasMemory(), nlassert, and NL3D::CPSAttribMaker< T >::resize().
Referenced by NL3D::CPSTailDot::resize(), NL3D::CPSShockWave::resize(), NL3D::CPSRibbonLookAt::resize(), NL3D::CPSRibbon::resize(), NL3D::CPSQuad::resize(), NL3D::CPSConstraintMesh::resize(), NL3D::CPSFanLight::resize(), and NL3D::CPSDot::resize().
| void NL3D::CPSColoredParticle::serialColorScheme | ( | NLMISC::IStream & | f | ) | throw (NLMISC::EStream) |
serialization.
Definition at line 159 of file ps_particle_basic.cpp.
References NL_PS_FUNC.
Referenced by NL3D::CPSTailDot::serial(), NL3D::CPSShockWave::serial(), NL3D::CPSRibbonLookAt::serial(), NL3D::CPSRibbon::serial(), NL3D::CPSQuad::serial(), NL3D::CPSConstraintMesh::serial(), NL3D::CPSFanLight::serial(), and NL3D::CPSDot::serial().
| void NL3D::CPSColoredParticle::setColor | ( | NLMISC::CRGBA | col | ) |
Set a constant color for the particles. remove any previous scheme.
Definition at line 136 of file ps_particle_basic.cpp.
References _Color, _ColorScheme, NL_PS_FUNC, and updateMatAndVbForColor().
| void NL3D::CPSColoredParticle::setColorScheme | ( | CPSAttribMaker< CRGBA > * | col | ) |
Set an attribute maker that produce a color It must have been allocated by new It will be deleted by this object.
Definition at line 125 of file ps_particle_basic.cpp.
References _ColorScheme, getColorOwner(), NL3D::CPSAttribMaker< T >::hasMemory(), NL_PS_FUNC, nlassert, NL3D::CPSAttribMaker< T >::resize(), and updateMatAndVbForColor().
| virtual void NL3D::CPSColoredParticle::updateMatAndVbForColor | ( | void | ) | [protected, pure virtual] |
Update the material and the vb and the like so that they match the color scheme.
Implemented in NL3D::CPSDot, NL3D::CPSFanLight, NL3D::CPSConstraintMesh, NL3D::CPSQuad, NL3D::CPSRibbon, NL3D::CPSRibbonLookAt, NL3D::CPSShockWave, and NL3D::CPSTailDot.
Referenced by setColor(), and setColorScheme().
CRGBA NL3D::CPSColoredParticle::_Color [protected] |
Definition at line 226 of file ps_particle_basic.h.
Referenced by NL3D::CPSShockWave::draw(), NL3D::CPSDot::draw(), getColor(), setColor(), NL3D::CPSTailDot::setupGlobalColor(), NL3D::CPSFanLight::setupMaterial(), NL3D::CPSConstraintMesh::setupMaterialColor(), NL3D::CPSRibbon::setupTexturedGlobalColor(), NL3D::CPSRibbon::setupUntexturedGlobalColor(), and NL3D::CPSQuad::updateMatBeforeRendering().
CPSAttribMaker<CRGBA>* NL3D::CPSColoredParticle::_ColorScheme [protected] |
Definition at line 228 of file ps_particle_basic.h.
Referenced by NL3D::CPSConstraintMesh::computeColors(), deleteColorElement(), NL3D::CPSTailDot::displayRibbons(), NL3D::CPSRibbonLookAt::displayRibbons(), NL3D::CPSRibbon::displayRibbons(), NL3D::CPSShockWave::draw(), NL3D::CPSDot::draw(), NL3D::CPSFaceHelper::drawFaces(), NL3D::CPSFanLightHelper::drawFanLight(), NL3D::CPSFaceLookAtHelper::drawLookAt(), NL3D::CPSFaceLookAtHelper::drawLookAtAlignOnMotion(), NL3D::CPSConstraintMeshHelper::drawMeshs(), NL3D::CPSConstraintMeshHelper::drawPrerotatedMeshs(), NL3D::CPSShockWaveHelper::drawShockWave(), getColorScheme(), NL3D::CPSQuad::getNeededVB(), NL3D::CPSFanLight::getVBnIB(), NL3D::CPSTailDot::getVBnPB(), NL3D::CPSShockWave::getVBnPB(), NL3D::CPSRibbonLookAt::getVBnPB(), NL3D::CPSRibbon::getVBnPB(), newColorElement(), resizeColor(), NL3D::CPSConstraintMesh::restoreMaterials(), setColor(), setColorScheme(), NL3D::CPSTailDot::setupGlobalColor(), NL3D::CPSFanLight::setupMaterial(), NL3D::CPSConstraintMesh::setupMaterialColor(), NL3D::CPSConstraintMesh::setupRenderPasses(), NL3D::CPSRibbon::setupTexturedGlobalColor(), NL3D::CPSRibbon::setupTextureMatrix(), NL3D::CPSRibbon::setupUntexturedGlobalColor(), NL3D::CPSQuad::updateMatBeforeRendering(), NL3D::CPSTailDot::updateMaterial(), NL3D::CPSRibbon::updateTexturedMaterial(), NL3D::CPSRibbon::updateUntexturedMaterial(), NL3D::CPSShockWave::updateVbColNUVForRender(), NL3D::CPSQuad::updateVbColNUVForRender(), and ~CPSColoredParticle().
1.6.1