Particle Universe  1.2
ParticleUniverse::LightRenderer Class Reference

#include <ParticleUniverseLightRenderer.h>

Inheritance diagram for ParticleUniverse::LightRenderer:

Public Member Functions

 LightRenderer (void)
 
virtual ~LightRenderer (void)
 
Ogre::Light::LightTypes getLightType (void) const
 
void setLightType (Ogre::Light::LightTypes lightType)
 
const ColourValuegetSpecularColour (void) const
 
void setSpecularColour (const ColourValue &specularColour)
 
Real getAttenuationRange (void) const
 
void setAttenuationRange (Real attenuationRange)
 
Real getAttenuationConstant (void) const
 
void setAttenuationConstant (Real attenuationConstant)
 
Real getAttenuationLinear (void) const
 
void setAttenuationLinear (Real attenuationLinear)
 
Real getAttenuationQuadratic (void) const
 
void setAttenuationQuadratic (Real attenuationQuadratic)
 
const RadiangetSpotlightInnerAngle (void) const
 
void setSpotlightInnerAngle (const Radian &spotlightInnerAngle)
 
const RadiangetSpotlightOuterAngle (void) const
 
void setSpotlightOuterAngle (const Radian &spotlightOuterAngle)
 
Real getSpotlightFalloff (void) const
 
void setSpotlightFalloff (Real spotlightFalloff)
 
Real getPowerScale (void) const
 
void setPowerScale (Real powerScale)
 
Real getFlashFrequency (void) const
 
void setFlashFrequency (Real flashFrequency)
 
Real getFlashLength (void) const
 
void setFlashLength (Real flashLength)
 
bool isFlashRandom (void) const
 
void setFlashRandom (bool flashRandom)
 
void _destroyAll (void)
 
virtual void _prepare (ParticleTechnique *technique)
 
virtual void _unprepare (ParticleTechnique *technique)
 
virtual void _processParticle (ParticleTechnique *particleTechnique, Particle *particle, Real timeElapsed, bool firstParticle)
 
virtual void _setMaterialName (const String &materialName)
 
virtual void _notifyCurrentCamera (Camera *cam)
 
virtual void _notifyAttached (Ogre::Node *parent, bool isTagPoint=false)
 
virtual void _notifyParticleQuota (size_t quota)
 
virtual void _notifyDefaultDimensions (Real width, Real height, Real depth)
 
virtual void _notifyParticleResized (void)
 
virtual SortMode _getSortMode (void) const
 
virtual void copyAttributesTo (ParticleRenderer *renderer)
 
- Public Member Functions inherited from ParticleUniverse::ParticleRenderer
 ParticleRenderer (void)
 
virtual ~ParticleRenderer (void)
 
const StringgetRendererType (void) const
 
void setRendererType (String rendererType)
 
ParticleTechniquegetParentTechnique (void) const
 
void setParentTechnique (ParticleTechnique *parentTechnique)
 
bool isRendererInitialised (void) const
 
void setRendererInitialised (bool rendererInitialised)
 
virtual void _notifyStart (void)
 
virtual void _notifyStop (void)
 
virtual void _notifyRescaled (const Vector3 &scale)
 
virtual void setVisible (bool visible=true)
 
bool getUseSoftParticles (void) const
 
void setUseSoftParticles (bool useSoftParticles)
 
Real getSoftParticlesContrastPower (void) const
 
Real getSoftParticlesScale (void) const
 
Real getSoftParticlesDelta (void) const
 
void setSoftParticlesContrastPower (Real softParticlesContrastPower)
 
void setSoftParticlesScale (Real softParticlesScale)
 
void setSoftParticlesDelta (Real softParticlesDelta)
 
virtual void _updateRenderQueue (Ogre::RenderQueue *queue, ParticlePool *pool)
 
virtual void _notifyParticleZRotated (void)
 
virtual void setRenderQueueGroup (uint8 queueId)
 
virtual uint8 getRenderQueueGroup (void) const
 
const bool isSorted (void) const
 
void setSorted (bool sorted)
 
const uchar getTextureCoordsRows (void) const
 
void setTextureCoordsRows (uchar const textureCoordsRows)
 
const uchar getTextureCoordsColumns (void) const
 
void setTextureCoordsColumns (uchar const textureCoordsColumns)
 
size_t getNumTextureCoords (void)
 
virtual void copyParentAttributesTo (ParticleRenderer *renderer)
 
void addTextureCoords (const Real u, const Real v, const Real width, const Real height)
 
const vector< Ogre::FloatRect * > & getTextureCoords (void) const
 
- Public Member Functions inherited from ParticleUniverse::IAlias
 IAlias (void)
 
virtual ~IAlias (void)
 
const StringgetAliasName (void) const
 
void setAliasName (String aliasName)
 
const AliasType getAliasType (void) const
 
void setAliasType (AliasType aliasType)
 
- Public Member Functions inherited from ParticleUniverse::IElement
 IElement (void)
 
virtual ~IElement (void)
 

Static Public Attributes

static const Ogre::Light::LightTypes DEFAULT_LIGHT_TYPE
 
static const ColourValue DEFAULT_DIFFUSE
 
static const ColourValue DEFAULT_SPECULAR
 
static const Real DEFAULT_ATT_RANGE
 
static const Real DEFAULT_ATT_CONSTANT
 
static const Real DEFAULT_ATT_LINEAR
 
static const Real DEFAULT_ATT_QUADRATIC
 
static const Radian DEFAULT_SPOT_INNER_ANGLE
 
static const Radian DEFAULT_SPOT_OUTER_ANGLE
 
static const Real DEFAULT_FALLOFF
 
static const Real DEFAULT_POWER_SCALE
 
- Static Public Attributes inherited from ParticleUniverse::ParticleRenderer
static const uint8 DEFAULT_RENDER_QUEUE_GROUP
 
static const bool DEFAULT_SORTED
 
static const uchar DEFAULT_TEXTURECOORDS_ROWS
 
static const uchar DEFAULT_TEXTURECOORDS_COLUMNS
 
static const bool DEFAULT_USE_SOFT_PARTICLES
 
static const Real DEFAULT_SOFT_PARTICLES_CONTRAST_POWER
 
static const Real DEFAULT_SOFT_PARTICLES_SCALE
 
static const Real DEFAULT_SOFT_PARTICLES_DELTA
 

Protected Member Functions

void _makeNodesVisible (bool visible)
 
- Protected Member Functions inherited from ParticleUniverse::ParticleRenderer
void _createSoftMaterial (void)
 
void _stripNameFromSoftPrefix (String &name)
 

Protected Attributes

String mLightName
 
vector< LightRendererVisualData * > mAllVisualData
 
vector< LightRendererVisualData * > mVisualData
 
vector< Ogre::Light * > mLights
 
size_t mQuota
 
Ogre::Light::LightTypes mLightType
 
ColourValue mSpecularColour
 
Real mAttenuationRange
 
Real mAttenuationConstant
 
Real mAttenuationLinear
 
Real mAttenuationQuadratic
 
Radian mSpotlightInnerAngle
 
Radian mSpotlightOuterAngle
 
Real mSpotlightFalloff
 
Real mPowerScale
 
Real mFlashFrequency
 
Real mFlashLength
 
bool mFlashRandom
 
- Protected Attributes inherited from ParticleUniverse::ParticleRenderer
ParticleTechniquemParentTechnique
 
Ogre::BillboardSetmBillboardSet
 
String mRendererType
 
bool mCullIndividual
 
Real mHeight
 
Real mWidth
 
Real mDepth
 
bool mSorted
 
uint8 mQueueId
 
bool mRendererInitialised
 
Vector3 _mRendererScale
 
vector< Ogre::FloatRect * > mUVList
 
uchar mTextureCoordsRows
 
uchar mTextureCoordsColumns
 
bool mTextureCoordsRowsAndColumnsSet
 
bool mTextureCoordsSet
 
bool mUseSoftParticles
 
Real mSoftParticlesContrastPower
 
Real mSoftParticlesScale
 
Real mSoftParticlesDelta
 
bool mNotifiedDepthMap
 
bool mVisible
 
bool mDepthCheckEnabled
 
bool mDepthWriteEnabled
 
- Protected Attributes inherited from ParticleUniverse::IAlias
String mAliasName
 
AliasType mAliasType
 

Additional Inherited Members

- Public Types inherited from ParticleUniverse::IAlias
enum  AliasType {
  AT_UNDEFINED, AT_TECHNIQUE, AT_RENDERER, AT_EMITTER,
  AT_AFFECTOR, AT_OBSERVER, AT_EXTERN, AT_HANDLER,
  AT_BEHAVIOUR
}
 
- Public Attributes inherited from ParticleUniverse::ParticleRenderer
bool autoRotate
 

Detailed Description

The LightRenderer class is responsible to render particles as a light.

Remarks
Note, that the diffuse colour cannot be set. This is, because the light inherits its diffuse colour from the particle. This makes it possible to manipulate the colour (for instance, using a Colour Affector).

Constructor & Destructor Documentation

ParticleUniverse::LightRenderer::LightRenderer ( void  )
virtual ParticleUniverse::LightRenderer::~LightRenderer ( void  )
virtual

Member Function Documentation

void ParticleUniverse::LightRenderer::_destroyAll ( void  )

Deletes all ChildSceneNodes en Lights.

virtual SortMode ParticleUniverse::LightRenderer::_getSortMode ( void  ) const
virtual

Gets the particles sort mode

Implements ParticleUniverse::ParticleRenderer.

void ParticleUniverse::LightRenderer::_makeNodesVisible ( bool  visible)
protected

Make all nodes to which the entities are attached visible or invisible.

virtual void ParticleUniverse::LightRenderer::_notifyAttached ( Ogre::Node parent,
bool  isTagPoint = false 
)
virtual
virtual void ParticleUniverse::LightRenderer::_notifyCurrentCamera ( Camera cam)
virtual
virtual void ParticleUniverse::LightRenderer::_notifyDefaultDimensions ( Real  width,
Real  height,
Real  depth 
)
virtual

The particle default size has changed

Implements ParticleUniverse::ParticleRenderer.

virtual void ParticleUniverse::LightRenderer::_notifyParticleQuota ( size_t  quota)
virtual

The particle quota has changed

Implements ParticleUniverse::ParticleRenderer.

virtual void ParticleUniverse::LightRenderer::_notifyParticleResized ( void  )
virtual

Callback when particles are resized

Implements ParticleUniverse::ParticleRenderer.

virtual void ParticleUniverse::LightRenderer::_prepare ( ParticleTechnique technique)
virtual

To make currently displayed objects visible or not. Prepare the renderer before it can be used.

Implements ParticleUniverse::ParticleRenderer.

virtual void ParticleUniverse::LightRenderer::_processParticle ( ParticleTechnique particleTechnique,
Particle particle,
Real  timeElapsed,
bool  firstParticle 
)
inlinevirtual

Updates the renderqueue

Remarks
The subclass must update the render queue using whichever Renderable instance(s) it wishes. Entry point for processing an individual particle.
Some renderers provide additional functionality besides rendering particles only. This function makes it possible to perform activities that cannot be done in the updateRenderQueue() function. There is no default behaviour.

Reimplemented from ParticleUniverse::ParticleRenderer.

virtual void ParticleUniverse::LightRenderer::_setMaterialName ( const String materialName)
virtual

Sets the material this renderer must use; called by ParticleTechnique.

Implements ParticleUniverse::ParticleRenderer.

virtual void ParticleUniverse::LightRenderer::_unprepare ( ParticleTechnique technique)
virtual

Reverse the actions from the _prepare.

Reimplemented from ParticleUniverse::ParticleRenderer.

virtual void ParticleUniverse::LightRenderer::copyAttributesTo ( ParticleRenderer renderer)
virtual

Copy attributes to another renderer.

Reimplemented from ParticleUniverse::ParticleRenderer.

Real ParticleUniverse::LightRenderer::getAttenuationConstant ( void  ) const
Real ParticleUniverse::LightRenderer::getAttenuationLinear ( void  ) const
Real ParticleUniverse::LightRenderer::getAttenuationQuadratic ( void  ) const
Real ParticleUniverse::LightRenderer::getAttenuationRange ( void  ) const
Real ParticleUniverse::LightRenderer::getFlashFrequency ( void  ) const
Real ParticleUniverse::LightRenderer::getFlashLength ( void  ) const
Ogre::Light::LightTypes ParticleUniverse::LightRenderer::getLightType ( void  ) const

Return the type of light that is emitted.

Real ParticleUniverse::LightRenderer::getPowerScale ( void  ) const
const ColourValue& ParticleUniverse::LightRenderer::getSpecularColour ( void  ) const
Real ParticleUniverse::LightRenderer::getSpotlightFalloff ( void  ) const
const Radian& ParticleUniverse::LightRenderer::getSpotlightInnerAngle ( void  ) const
const Radian& ParticleUniverse::LightRenderer::getSpotlightOuterAngle ( void  ) const
bool ParticleUniverse::LightRenderer::isFlashRandom ( void  ) const
void ParticleUniverse::LightRenderer::setAttenuationConstant ( Real  attenuationConstant)
void ParticleUniverse::LightRenderer::setAttenuationLinear ( Real  attenuationLinear)
void ParticleUniverse::LightRenderer::setAttenuationQuadratic ( Real  attenuationQuadratic)
void ParticleUniverse::LightRenderer::setAttenuationRange ( Real  attenuationRange)
void ParticleUniverse::LightRenderer::setFlashFrequency ( Real  flashFrequency)
void ParticleUniverse::LightRenderer::setFlashLength ( Real  flashLength)
void ParticleUniverse::LightRenderer::setFlashRandom ( bool  flashRandom)
void ParticleUniverse::LightRenderer::setLightType ( Ogre::Light::LightTypes  lightType)

Set the type of light that is emitted.

void ParticleUniverse::LightRenderer::setPowerScale ( Real  powerScale)
void ParticleUniverse::LightRenderer::setSpecularColour ( const ColourValue specularColour)
void ParticleUniverse::LightRenderer::setSpotlightFalloff ( Real  spotlightFalloff)
void ParticleUniverse::LightRenderer::setSpotlightInnerAngle ( const Radian spotlightInnerAngle)
void ParticleUniverse::LightRenderer::setSpotlightOuterAngle ( const Radian spotlightOuterAngle)

Member Data Documentation

const Real ParticleUniverse::LightRenderer::DEFAULT_ATT_CONSTANT
static
const Real ParticleUniverse::LightRenderer::DEFAULT_ATT_LINEAR
static
const Real ParticleUniverse::LightRenderer::DEFAULT_ATT_QUADRATIC
static
const Real ParticleUniverse::LightRenderer::DEFAULT_ATT_RANGE
static
const ColourValue ParticleUniverse::LightRenderer::DEFAULT_DIFFUSE
static
const Real ParticleUniverse::LightRenderer::DEFAULT_FALLOFF
static
const Ogre::Light::LightTypes ParticleUniverse::LightRenderer::DEFAULT_LIGHT_TYPE
static
const Real ParticleUniverse::LightRenderer::DEFAULT_POWER_SCALE
static
const ColourValue ParticleUniverse::LightRenderer::DEFAULT_SPECULAR
static
const Radian ParticleUniverse::LightRenderer::DEFAULT_SPOT_INNER_ANGLE
static
const Radian ParticleUniverse::LightRenderer::DEFAULT_SPOT_OUTER_ANGLE
static
vector<LightRendererVisualData*> ParticleUniverse::LightRenderer::mAllVisualData
protected
Real ParticleUniverse::LightRenderer::mAttenuationConstant
protected
Real ParticleUniverse::LightRenderer::mAttenuationLinear
protected
Real ParticleUniverse::LightRenderer::mAttenuationQuadratic
protected
Real ParticleUniverse::LightRenderer::mAttenuationRange
protected
Real ParticleUniverse::LightRenderer::mFlashFrequency
protected
Real ParticleUniverse::LightRenderer::mFlashLength
protected
bool ParticleUniverse::LightRenderer::mFlashRandom
protected
String ParticleUniverse::LightRenderer::mLightName
protected
vector<Ogre::Light*> ParticleUniverse::LightRenderer::mLights
protected
Ogre::Light::LightTypes ParticleUniverse::LightRenderer::mLightType
protected
Real ParticleUniverse::LightRenderer::mPowerScale
protected
size_t ParticleUniverse::LightRenderer::mQuota
protected
ColourValue ParticleUniverse::LightRenderer::mSpecularColour
protected
Real ParticleUniverse::LightRenderer::mSpotlightFalloff
protected
Radian ParticleUniverse::LightRenderer::mSpotlightInnerAngle
protected
Radian ParticleUniverse::LightRenderer::mSpotlightOuterAngle
protected
vector<LightRendererVisualData*> ParticleUniverse::LightRenderer::mVisualData
protected

The documentation for this class was generated from the following file: